XSLT Mapping issue

Hello Friends,
I have got one scenario in which XSLT mapping is used.The third party file is mapped to IDoc INVOIC01.After the development of the mapping code,I got the result as below in the XML Spy
<E1EDP01 SEGMENT="1">* first segment
               <POSEX>0</POSEX>
               <E1EDP02 SEGMENT="1"> Subsegment1
                    <QUALF>001</QUALF>
               </E1EDP02>
               <E1EDP04 SEGMENT="1"> Subsegment2
                    <MWSKZ></MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>6.660</MWSBT>
               </E1EDP04>
               <E1EDP04 SEGMENT="1">Subsegment2
                    <MWSKZ></MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>13.330</MWSBT>
               </E1EDP04>
          </E1EDP01>
          <E1EDP01 SEGMENT="1">
               <POSEX>0</POSEX>
               <E1EDP02 SEGMENT="1">
                    <QUALF>001</QUALF>
               </E1EDP02>
               <E1EDP04 SEGMENT="1">
                    <MWSKZ></MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>6.660</MWSBT>
               </E1EDP04>
               <E1EDP04 SEGMENT="1">
                    <MWSKZ></MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>13.330</MWSBT>
               </E1EDP04>
          </E1EDP01>
But the expected result is as below:
                            <E1EDP01 SEGMENT="1">
               <POSEX>0</POSEX>
               <E1EDP02 SEGMENT="1">
                    <QUALF>001</QUALF>
               </E1EDP02>
               <E1EDP04 SEGMENT="1">
                    <MWSKZ></MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>6.660</MWSBT>
               </E1EDP04>
          </E1EDP01>
          <E1EDP01 SEGMENT="1">
               <POSEX>0</POSEX>
               <E1EDP02 SEGMENT="1">
                    <QUALF>001</QUALF>
               </E1EDP02>
               <E1EDP04 SEGMENT="1">
                    <MWSKZ></MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>13.330</MWSBT>
               </E1EDP04>
          </E1EDP01>
ie For each E1EDP01 segment,there should be only one E1EDP04 segment.
Please help me in this regard how to code the xslt map for this...
Thank you
Sam
Edited by: Guest on Apr 4, 2008 1:00 PM

Hello Ashish,
Thanks for your reply.
The third party system is th sender and sends XSD file which contains header detail (with multiple tax details in it) and multiple line Item details (which contains one tax details per lineitem).
ie if there are two line items then each line item should have one tax details (1st tax detail in header should match with 1st tax details of linitem, and 2nd should match with second line item tax details..etc)
<?xml version="1.0" encoding="UTF-8"?>
<INVOIC01 xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <IDOC BEGIN="1">
          <E1EDK04 SEGMENT="1">
               <MWSKZ>VAT</MWSKZ>
               <MSATZ>22.00</MSATZ>
               <MWSBT>6.660</MWSBT>
          </E1EDK04>
          <E1EDK04 SEGMENT="1">
               <MWSKZ>VAT</MWSKZ>
               <MSATZ>22.00</MSATZ>
               <MWSBT>13.330</MWSBT>
          </E1EDK04>
          <E1EDP01 SEGMENT="1">
               <POSEX>0</POSEX>
               <E1EDP04 SEGMENT="1">
                    <MWSKZ>VAT</MWSKZ>
                    <MSATZ>22.00</MSATZ>
                    <MWSBT>6.660</MWSBT>
               </E1EDP04>
          </E1EDP01>
          <E1EDP01 SEGMENT="1">
               <POSEX>0</POSEX>
               <E1EDP04 SEGMENT="1">
                               <MWSKZ>VAT</MWSKZ>
                               <MSATZ>22.00</MSATZ>
                               <MWSBT>13.330</MWSBT>
               </E1EDP04>
          </E1EDP01>
     </IDOC>
</INVOIC01>
I thinks this is like a copying th header segment details in the item details.
Please help me in ths regard
Thank you
Sam

Similar Messages

  • XSLT mapping issue in parent child relation

    Hi Guys,
    i have one XSLT mapping issue. Mapping scenario is from IDoc to file.
    IDoc structure is as below
    <ZLOIPRO1>
      <E1AFKOL>
         <A></A>
         <B></B>
         <E1RESBL>
             <MATNR>1</MATNR>
             <CHARG>1</CHARG>
             <ZSBL>
                 <MTART>ABC</MTART>
             </ZSB>
         </E1RESBL>
         <E1RESBL>
             <MATNR>2</MATNR>
             <CHARG>2</CHARG>
             <ZSBL>
                 <MTART>ZHA1</MTART>
             </ZSB>
         </E1RESBL>
         <E1RESBL>
             <MATNR>3</MATNR>
             <CHARG>3</CHARG>
             <ZSBL>
                 <MTART>ZHA1</MTART>
             </ZSB>
         </E1RESBL>
      </E1AFKOL>
    </ZLOIPRO1>
    As you can see 'E1RESBL' is repeatative. Now my issue is i need to select 'MATNR' and 'CHARG' from 'E1RESBL' segment when first occurance of 'ZSBL/MTART' with value 'ZHA1' appears. i.e. my output would be MATNR = 2 and CHARG = 2.
    I hope i am clear. Please let me know if any solution for this.

    Hi,
    Try this
    <xsl:if test="./ZSBL/MTART == 'ZHA1'">
    <xsl:for-each select="./E1RESBL">
      <MATNR>
       <xsl:value-of select="./MATNR"/>
      </MATNR>
      <BATCH>
       <xsl:value-of select="./CHARG"/>
      </BATCH>
    </xsl:for-each>
    </xsl:if>
    You might need to do some changes in the above.
    Thanks,
    Prakash

  • SOAP Response XSLT mapping issue

    Hi,
    Source XML.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Create__CompIntfc__APC_WORKER2_CIResponse xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI">
       <ns0:notification>y</ns0:notification>
       <ns0:detail>
          <ns0:keyinformation>
             <ns0:PERSON_ID/>
             <ns0:SUBMIT_DATE/>
             <ns0:ACTION/>
          </ns0:keyinformation>
          <ns0:messages>
             <ns0:type/>
             <ns0:messagesetnumber/>
             <ns0:messagenumber/>
             <ns0:messagetext/>
             <ns0:explaintext/>
          </ns0:messages>
       </ns0:detail>
    </ns0:Create__CompIntfc__APC_WORKER2_CIResponse>
    Target XML
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><SUCCESS>y</SUCCESS></ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
    XSLT Mapping
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns1="http://authserv.apc.com/peoplesoft">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
      <xsl:template match="/">
        <ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
          <SUCCESS>
            <xsl:value-of select="soap:Create__CompIntfc__APC_WORKER2_CIResponse/a:notification" />
          </SUCCESS>
        </ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
      </xsl:template>
    </xsl:stylesheet>
    Can somebody help to figure out the issue in higlighted area of XSLT mapping.
    We just need to move "notification" value to "SUCCESS" value of RFC.
    thanks.
    santosh,.

    Hi Santosh,
    add the source namespace with a prefix:
    xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI"
    do it most simple generic without path
    do not forget the prefix
    ns0:
    use xsl:value-of:
    xsl:value-of select="//ns0:notification"
    Regards,
    Udo

  • XSLT Mapping issue. If condition.

    Hi,
    A and B are in Source Structure.   "C" is in Target Structure.
    If "A"  value has between 5001 and 6999 then pass "B" to C.
    How to do this in XSLT map?
    Thanks
    Deepthi

    Code:
    - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    - <xsl:for-each select="POS/Detail">
    - <xsl:if test="(POS/Detail/FieldA > 5000) and (POS/Detail/FieldA < 7000)">
    - <xsl:call-template name="insert_E1WPF02">
      <xsl:with-param name="ReferenceNo" />
      <xsl:with-param name="ItemNo" />
      <xsl:with-param name="Amount" />
      </xsl:call-template>
      </xsl:if>
      </xsl:for-each>
    - <xsl:template name="insert_E1WPF02" match="/">
      <xsl:param name="ItemNo" />
      <xsl:param name="Amount" />
      <xsl:param name="RefernceNo" select="POS/Detail/FieldB" />
    - <ZUONR>
      <xsl:value-of select="$ReferenceNo" />
      </ZUONR>
    - <POSNR>
      <xsl:value-of select="$ItemNo" />
      </POSNR>
    - <WRBTR>
      <xsl:value-of select="$Ammount" />
      </WRBTR>
      </xsl:template>
      </xsl:stylesheet>
    I Cannot use  <xsl:template name="insert_E1WPF02> twice because it is creating 2 E1WPF02 Segments in Idoc for each transaction which is not correct.

  • Xslt map issue

    Hi ,
    any one help me , i need add one text to map  for each output .
     as per need add sample, befor generating output.
    as per  script my generate wrong out put 
    <xsl:template name ="tText">
        <xsl:param name="paramone"/>
        <xsl:variable name="text2" select="$paramone"/>
        <xsl:if test="$paramone !=''">
          <xsl:element name="ghf" >
            <xsl:value-of select="concat('sample',$text2)"/>
          </xsl:element>
        </xsl:if>
    input file:
    <F>
      <S>
            <a >sample1</a>
             <a >sample2</a>
     </s>
    </F>
     output:
    i want output like :      sample 
                                         sample1
                                         sample2
    wrong ouput :                       sample  sample1
                                                  sample  sample2

    Your sample input is not valid XML! The closing tag </s> does not match the opening tag <S>. 
    If you use the following input:
    <F>
    <S>
    <a>sample1</a>
    <a>sample2</a>
    </S>
    </F>
    And apply the following custom XSLT:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:int="http://atea.com/schemas/v10" exclude-result-prefixes="xsl int var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="F">
    <sample>
    <xsl:for-each select="S/a">
    <xsl:element name="{.}" />
    </xsl:for-each>
    </sample>
    </xsl:template>
    </xsl:stylesheet>
    You get the following output:
    <sample>
    <sample1 />
    <sample2 />
    </sample>
    If however you want this output (I'm not sure by your description):
    <sample>
    <ghf>sample1</ghf>
    <ghf>sample2</ghf>
    </sample>
    You can use this custom XSLT:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:int="http://atea.com/schemas/v10" exclude-result-prefixes="xsl int var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="F">
    <sample>
    <xsl:for-each select="S/a">
    <ghf>
    <xsl:value-of select="." />
    </ghf>
    </xsl:for-each>
    </sample>
    </xsl:template>
    </xsl:stylesheet>
    Morten la Cour

  • Error while trying to load the xslt mapping

    Hi,
    while testing the xslt mapping, the following error is encountered:
    "TransformerConfigurationException occurred when loading MAP.xsl; details: Could not compile stylesheet"
    Please help me in the resolving this.
    Regards,
    Meenakshi

    Hi Meenakshi,
      Select XMLTOOLKIT option in operation mapping,and execute your XSLT Mapping.....
    Check this thread for more help...
    XSLT mapping issue
    Regds,
    Pinangshuk.

  • Issue in tranforming Idoc structure using XSLT mapping

    Hi,
    I am working on the XSLT Mapping to transform the IDoc xml to the desired format.
    Source structure single Idoc:
    EDI_DC40 record
    E1EDKxx records
    E1EDPxx records
    E1EDSxx records
    suppose I have 4 E1EDP01 records, of which 2 are Original and next two are corresponding Correction E1EDP01 records.
    I want the target Idoc to be:
    EDI_DC40 record
    E1EDKxx records and for (E1EDK14/ORGID = G2O)
    E1EDPxx records  (1st Original E1EDP01 segment)
    E1EDSxx records
    E1EDKxx records for (E1EDK14/ORGID = G2)
    E1EDPxx records  (1st corresponding correction E1EDP01 segment)
    E1EDSxx records
    E1EDKxx records for (E1EDK14/ORGID = G2O)
    E1EDPxx records  (2nd Original E1EDP01 segment)
    E1EDSxx records
    E1EDKxx records for (E1EDK14/ORGID = G2)
    E1EDPxx records  (2nd Corresponding correction E1EDP01segment)
    E1EDSxx records
    so correction segments follows original segments.
    All the E1EDSxx records are identical. remaining all the other segments are Idential except the above changes.
    correlate original and correction E1EDP01 segments is through POSEX of Original = HIPOS of Correction..
    bold segments represents Original records
    Italic segments represents correction records
    How to achieve the above scenario. I am finding issue in generating and correlating the E1EDP01 segments using <key> element. and changing the vales in E1EDK14
    Also does XSLT supports Dynamic Configuration for File Name ?
    Regards
    Edited by: Varun Reddy on Jul 7, 2011 12:44 PM

    Also does XSLT supports Dynamic Configuration for File Name ?=   Yes.
    refer - http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm

  • Issue with XSLT Mapping

    Hi Team,
    I have one requirements which I am explaining below:
    Source structure should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Student xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <Data>
          <FName>
          <LName>     
          <Marks>                            Here Data fiels is 0......Unbounded.
                    <Maths>
                    <Science>        
    </ns0:MT_Student>
    and Target structure must be like below:
    <MT_Student_Result>
    <Data>
          <Name>                         Here data field is 0......Unbounded.
          <Marks>
                   <Total_Marks>
    In the target structure Filed "Name" is obtained by concating "FName" and "LName" in the source structure
    and the field "Total_Marks" is the sum of field "Maths" and "Science" in the source structure.
    I have used XSLT mapping to obtain this.I have got the value of the "Name" field in the Target structure as required but I am not getting the value of the field "Total_Marks" in the target structure as required.Every time I am putting any value the result is comming as "NaN" as a value of the field "Total_Marks".Can you explain what is the issue?I am providing the code that I have done
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:fo="urn:bp:xi:hr:edm:test:100" xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    <xsl:template match="/">
    <MT_Student_Result>
    <xsl:for-each select="ns0:MT_Student/Data">
    <xsl:variable name="name" select="FName"/>
    <xsl:variable name="surname" select="LName"/>
    <Data>
    <Name>
    <xsl:value-of select="concat($name,'',$surname)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:variable name="maths" select="ns0:MT_Student/Data/Marks/Maths"/>
    <xsl:variable name="science" select="ns0:MT_Student/Data/Marks/Science"/>
    <xsl:value-of select="($maths+$science)" />
    </Total_Marks>
    </Marks>
    </Data>
    </xsl:for-each>
    </MT_Student_Result>
    </xsl:template>
    </xsl:transform>
    Edited by: ATANU1 on Mar 17, 2011 1:40 PM

    Hei,
    you have to add the namespace prefix to each element of the path (and of course: check out if the hierarchy is matching)
    ns0:MT_Student/ns0:Data/ns0:Marks/ns0:Science
    Regards,
    Udo

  • MIAL RECIEVER CC -- ISSUE USED XSLT MAPPING

    Hi All,
    I have a Scenario   in which  IDOC  is a sender and Mail Adaptert  is reciever .The Xi is supposed to sent the Email notification to the client . Mail adapter is SMTP configured correctly ,Reciever  Mail CC is up and running but Error  is :Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    The Mapping here is used is XSLT mapping and in SXMB_MONITOR , Error shown is :
    SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_CONF_EX</SAP:Code>
    Could you plesae help  me this  Issue asap .
    Thanks,
    Vara

    Hi Abhi ,
    I checked in ATOVA SPY XML Check , it seems to be the issue in XSLT mapping .
    Part of XSLT mapping  Error line:
    when test="//IDOC/EDI_DC40/RCVLAD = '3157411730014'">   --There was a single  qoute missing
    Tested in Atova with payload , it worked
    Thanks for your  supprt as well.
    Best Regards,
    Vara

  • XSLT & JAVA Mapping issue.

    is there any situation,
    where we should definately go for XSLT mapping..
    where we should definately go for JAVA mapping..
    can anyone brief me plz....
    Cheers,
    Raghavesh

    No hard and fast rules.
    There never can be specific rules.
    1. Java Mapping should be used when the input is NON XML for sure. As the input is a InputSTream, you can convert it to a string and do the needful programmic logic etc.
    2. XSL can be used with HTML source etc.
    Regards
    Bhavesh

  • XSLT Mapping and Namespace Issues

    I have been reading through similar threads on this topic, but have not found the right combination for my problem.  I am doing an XSLT map and it works fine in Stylus Studio.  When I take it to PI, I get a "Prefix 'ns0' is not mapped to a namespace" error.  I have a namespace that is within the XSD files I received from my partner (http://www.ups.com/XMLSchema/EBR/Billing/v1).  I also have the namespace I made in PI for the source (http://graybar.com/upsbilling/) and a different namespace in PI for the destination (http://graybar.com/cold/invoice/).
    <u><b>XSLT:</b></u>
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.ups.com/XMLSchema/EBR/Billing/v1" xmlns:ns1="http://graybar.com/cold/invoice/">
    <xsl:template match="/">
    <ns1:ColdInvoiceData>
      <Header>
      <RecordID>HDR</RecordID>
      <InvoiceDate>
      <xsl:value-of select="ns0:UPS_EBR_BILL/ns0:InvoiceDetails/ns0:Invoice/ns0:InvoiceDateCCYYMMDD"/>
      </InvoiceDate>
    <u><b>Source XML</b></u>
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <UPS_EBR_BILL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ups.com/XMLSchema/EBR/Billing/v1" xsi:schemaLocation="http://www.ups.com/XMLSchema/EBR/Billing/v1 Billing_XML_Schema.xsd">
    <XMLBillFileVersion>1.0.1</XMLBillFileVersion>
    <Recipient>
    When I change the XSLT namespace from http://www.ups.com/XMLSchema/EBR/Billing/v1 to http://graybar.com/upsbilling/, the TransfromerException in PI goes away, but none of my referenced mappings work either (just my text hardcodes).
    Can someone tell me why this works in Stylus Studio, but not in PI?  Do I have too many namespaces?
    Message was edited by:
            Keith Wendel (to uncomment xsl:stylesheet line)

    > <ns1:ColdInvoiceData xmlns:ns1="http://graybar.com/cold/invoice/">
    This change did not affect anything.  Still works in Stylus Studio though.
    Did you mean to show any changes at the <xsl:value-of select> line?  I did not notice anything there.
    Can anyone explain what "not mapped to a namespace" means?  I have the declaration of ns0 at the top, so I don't see what else needs to be mapped.  Do I have to have my PI namespace where I store the partner's XSDs set as "http://www.ups.com/XMLSchema..." (partner's namespace)?

  • XSLT Mapping error

    Hi All
    I am working on PI 7.1 where I have customized standard XSLT mapping according to my requirement.
    I have to add 2 fields in the standard data type ReplenishmentOrder_Notfication from SNC 7.0 SWCV.
    In standard scenario once IDOC STPPOD.DELVRY03 is released from ECC the PI scenario send this to SNC Proxy ReplenishmentOrderNotification_In.
    In my requirement I have to send XML file generated from IDOC to one of Application Folder. I have customized data type, message type, operation mapping, service interface by coping standard things.
    So the changes I have done in standard XSLT mapping are just changin name of data type and not added any mapping for the two new fields I have added to the data type as its not require at the moment.
    When I am running test I am getting follwoing error in Trace. Here please notice that its mentioning standard xslt mapping program name only though on the top you see customized names.
    Please give your inputs to resolve the issue. Thanks.
    Operation Mapping
    StppodDelvry03_MT_ReceivedDeliveryNotification_01
    Name
    StppodDelvry03_MT_ReceivedDeliveryNotification_01
    Namespace
    http://sap.com/xi/SNC/Global
    Runtime error
    TransformerException occurred during XSLT mapping StppodDelvry03_ReceivedDeliveryNotification_01 (http://sap.com/xi/SNC/Global, 46c20a71-248e-11dc-c4be-dd500a115642, -1)
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace> <Trace level="1" type="T">Interface Mapping http://sap.com/xi/SNC/Global StppodDelvry03_ReceivedDeliveryNotification_01 </Trace> <Trace level="1" type="T">TransfromerException during XSLT processing: Thrown: javax.xml.transform.TransformerException: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(, row:1, col:8)(, row=1, col=8) -&gt; com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(, row:1, col:8) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer.transform(AbstractMappingTransfor
    Edited by: Amol on May 22, 2009 3:26 PM

    Hi Amol
    for the error CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace> <Trace level="1" type="T">
    just check this Thread issue is solved by restarting  the service verifySenderAgreement
    at thread
    Re: Wrong Sender Agreement
    Thanks
    Abhishek

  • XSLT mapping sorting against an output field

    Hi, all
    I am testing my XSLT mapping. Here is the output message type defintion:
    I want to sort f2 in my xslt mapping. Here is my mapping:
    <?xml version="1.0" encoding="UTF-8" ?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://fileconversion" xmlns:ns1="http://fileconversion">
        <xsl:template match="/">
          <ns1:TESTOUTPUT_MT>
            <Msg>
            <xsl:for-each select="ns0:TESTDATA_MT/Trans/Detail">
            <xsl:sort select="Transaction/Data/f2" />
              <Transaction>
                <Data>
                  <f1>
                    <xsl:value-of select="PERNR" />
                  </f1>
                  <f2>
                    <xsl:value-of select="POSITION" />
                  </f2>
                  <f3>
                    <xsl:value-of select="TEL" />
                  </f3>
                  <f4>
                    <xsl:value-of select="concat(concat(STREET,' '),CITY)" />
                  </f4>
                </Data>
              </Transaction>
                </xsl:for-each>
            </Msg>
          </ns1:TESTOUTPUT_MT>
        </xsl:template>
      </xsl:stylesheet>
    The sorting did not execute on field "f2" and the data is in the same order as the input.
    Note that I can do <xsl:sort select="POSITION " /> instead and it will work. But I am trying to test on sorting against output field as this is the requirement in the real interface.
    What did I do wrong? Please advise.
    Thanks,
    Jonathan.

    Hi Jon - You can sort the source values. If you use "sort select="Transaction/Data/f2" i don't think it has got some effect.
    You can use <xsl:sort select="POSITION " /> Any issues with that?
    Just to add - when you map Position with F2... how does the sorting will be different when you execute it on F2 or Position?
    If you are doing some calculation for F2 then should handle the Sort function accordingly..

  • How to use standard java functions in a XSLT mapping

    Hi All,
    I wish to use a standard java function in a XSLT mapping, The issue is either i am giving incorrect namespace which is used to invoke the function or the signature of the function call is incorrect, I have read all the links in http://help.sap.com, and i know <b> one can enhance a XSLT mapping by writing one's own java code and thereby using java standard functions </b>, but the requirement is such that i need to try and use java standard function in XSLT mapping itself.
    Please refer to the sample code below:
    <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0"  
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:javamap="java:java.lang.String">
    <xsl:output method="text"/>
    <xsl:template match="/">
    <xsl:variable name="input" select="Title">
    <xsl:if test="function-available('javamap:toUpperCase')">
    <xsl:value-of select="javamap:toUpperCase($input)"/>
    </xsl:if>
    Author:<xsl:value-of select="Author"/>
    </xsl:template>
    </xsl:stylesheet>
    error encountered is: Illegal number or type of arguments.
    please reply if you have tried a similar scenario in SAP XI.
    Thanks & Regards,
    Varun

    Hi Varun,
        First of all i want to tell you that as per the documentation you can only call the static function inside xslt mapping. Your toUpperCase method is a non static function.
    What i am getting is that you have an element called Author and you want to convert its value into uppercase.
    you can write your own user defined function which is static.
    Signature of your java method :
    public static string toUpperCase(String Author,Map inputparam)
    try this xslt map.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:JavaProgram">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="Author">
                 <xsl:value-of select="//Author_name"/>
         </xsl:param>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <Author>
                 <xsl:if test="function-available('javamap:toUpperCase')">
                  <xsl:value-of select="javamap:toUpperCase($Author,$inputparam)"/>
                 </xsl:if>
         </Author>
         </xsl:template>
    </xsl:stylesheet>
    Hope this will work.
    Thanks and Regards
    Vishal Kumar

  • ERROR WHILE USING XSLT MAPPING IN INTERFACE MAPPING

    Hi,
      We are using an xslt mapping in our scenario but while i load the XSLT mapping in the interface mapping i get a message :
    Transformer configuration exception occurred when loading XSLT
    sorce interface :outbound and asyncronous.
    mapping : XSLT mapping (imported as a zip file)
    target interface: abstract,asyncronous.
    The xslt runs well in standalone and its well formed and there is no name space issue.
    please help if any one has faced such a situation while using XSLT mapping.
    regards,
    Anirban.

    Hi Anirban
    When you say it runs well <i>standalone</i> what exactly do you mean? Which XSLT processor are you using to run it? There are subtle difference between XSTL processors that can sometimes result in incompatibilities. For instance, I have seen XSLTs run correctly in XMLSpy but incorrectly (or at least slightly differently) in XI.
    Regards,
    Thorsten

Maybe you are looking for

  • G5 20" PPC will not boot up

    Hello Friend gave me the G5 20" iMac PPC Model Identifier PowerMac 12.1 w/1gig RAM. OS 10.5.8, 2.1 Ghz PPC G5, The first time it powered up fine.  Turned it off and later had the issue below. Powers up as follows: Gray screen with Apple logo Apple lo

  • Write the syntax for declaring table control in dialog programming?

    1) Write the syntax for declaring table control in dialog programming? 2) Write the syntax to call a selection screen in a modal dialog box?

  • Jtree level!

    i have a jtree, and i want to show some data depending on the level of the tree, for example when i am on level 4 i want to show a comment or when i am on level 2 i want get some data from the database, the issue is the getLevel() function Returns th

  • FM to create equipment task group counter by copying the existing one.

    Hi Experts, I need FM to create equipment task group counter by copying the existing one. Manully we do this through the Tcode : IA01 but i want to do this through the Prog... for that i wrote one bdc it is creating some problem. Please let me know a

  • How to import updated version of APEX app without losing saved IR's?

    Oracle XE 11.2 Apex 4.1 Linux Red Hat 5.4 ============ Does anyone have suggestions on how to import updated version of APEX app without losing saved IR's? Also, I want to maintain app id from update to update (from revision to revision). In fact, I