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.

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

    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

  • 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

  • Mapping issue for condition must be  satisfied

    Hi All,
             I am using IDOC ORDERS05 for my interface IDOC to FILE,
    in which i have partner fuction as PARVW , in which i have to AG and LF
    i must must pouplate data if the from the IDOC PARTN if the  PARVW is AG to the VENDORCODE in my target
    i must must pouplate data if the from the IDOC PARTN if the  PARVW is LF to the BUYER in my target
    please help how to do it and what condition i must use for this '
    Thanking you
    Sridhar

    Hi,
    Since you are mapping them on the target side you can use your IDOC variables in multiple palces if you are mapping graphically.
    i.e. 1. VENDOR -> if PARVW is equal to AG then PARTN to VENDORCODE
         2. BUYER -> if PARVW is equal to LF then PARTN to BUYER
    Make sure you set the context for both PARVW & PARTN to its upper level parent & not the immediate level.
    for eg:
         IDOC
               ---E2EDKA1
                       ---PARVW
                      |
                       ---PARTN
    set it to IDOC & not E2EDKA1. if you still have doubts on context you can put your query  back...
    Thanks,
    venkatesh

  • 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

  • Multi Mapping using condition & Dynamic Receiver determination – Used XSLT Mapping

    Dear Experts,
         I am struggling to identify an error on the Technical Routing. Firstly according to my scenario, I receive an XML file with multiple PO's and I have to split the file to 2 different target messages. and also according to the source payload I have to send the file to 2 different receivers. first receiver is ABAP Proxy to the back end system and the 2nd one is to a file location. I have used XSLT to split the message into 2 target message type and I have used a XSLT mapping for receiver determination. Does any one have any idea of what I am doing wrong.
    Note: some time I will only be able to fill in on target message.
    I have attached my XSLT message split mapping with this post, please let me know if you have further question.
    Your help is more appreciated.
    Advance Thanks,
    Pradeep
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:variable name="vFlag"/>
      <xsl:variable name="vPONUM" select="POTRACKING/Lines[1]/PONumber"/>
      <xsl:template match="/">
        <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
          <ns0:Message1>
            <ns1:MT_Tracking xmlns:ns1="http://www.findel-education.co.uk/axapta">
              <xsl:for-each select="POTRACKING/Lines">
                <sap:call-external class="ZCL_VNAP_OBJECTS" method="CHECK_PO_EXIST">
                  <sap:callvalue param="IP_EBELN" select="string(PONumber)"/>
                  <sap:callvariable name="vFlag" param="EP_BOLEAN" type="string"/>
                </sap:call-external>
                <xsl:if test="$vFlag = 0">
                  <Lines>
                    <DDate>
                      <xsl:value-of select="DespatchDate"/>
                    </DDate>
                    <PONumber>
                      <xsl:value-of select="PONumber"/>
                    </PONumber>
                    <POLine>
                      <xsl:value-of select="POLine"/>
                    </POLine>
                    <QTY>
                      <xsl:value-of select="Quantity"/>
                    </QTY>
                    <VendorMaterial>
                      <xsl:value-of select="VendorMaterialNumber"/>
                    </VendorMaterial>
                    <AccountRef>
                      <xsl:value-of select="AccountReference"/>
                    </AccountRef>
                    <ConsignNumber>
                      <xsl:value-of select="ConsignmentNumber"/>
                    </ConsignNumber>
                    <CarrierURL>
                      <xsl:value-of select="CarrierURL"/>
                    </CarrierURL>
                    <ConsignURL>
                      <xsl:value-of select="ConsignmentURL"/>
                    </ConsignURL>
                  </Lines>
                </xsl:if>
              </xsl:for-each>
            </ns1:MT_Tracking>
          </ns0:Message1>
          <ns0:Message2>
            <ns2:MT_Tracking xmlns:ns2="http://www.findel-education.co.uk/ecc/ax/po/ftp">
              <xsl:for-each select="POTRACKING/Lines">
                <sap:call-external class="ZCL_VNAP_OBJECTS" method="CHECK_PO_EXIST">
                  <sap:callvalue param="IP_EBELN" select="string(PONumber)"/>
                  <sap:callvariable name="vFlag" param="EP_BOLEAN" type="string"/>
                </sap:call-external>
                <xsl:if test="$vFlag = 1">
                  <Lines>
                    <DDate>
                      <xsl:value-of select="DespatchDate"/>
                    </DDate>
                    <PONumber>
                      <xsl:value-of select="PONumber"/>
                    </PONumber>
                    <POLine>
                      <xsl:value-of select="POLine"/>
                    </POLine>
                    <QTY>
                      <xsl:value-of select="Quantity"/>
                    </QTY>
                    <VendorMaterial>
                      <xsl:value-of select="VendorMaterialNumber"/>
                    </VendorMaterial>
                    <AccountRef>
                      <xsl:value-of select="AccountReference"/>
                    </AccountRef>
                    <ConsignNumber>
                      <xsl:value-of select="ConsignmentNumber"/>
                    </ConsignNumber>
                    <CarrierURL>
                      <xsl:value-of select="CarrierURL"/>
                    </CarrierURL>
                    <ConsignURL>
                      <xsl:value-of select="ConsignmentURL"/>
                    </ConsignURL>
                  </Lines>
                </xsl:if>
              </xsl:for-each>
            </ns2:MT_Tracking>
          </ns0:Message2>
        </ns0:Messages>
      </xsl:template>
    </xsl:stylesheet>

    Hi Hareesh,
    Please find my determination in the XSLT below, I am using enhanced receiver determination.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:p1="http://sap.com/xi/XI/System" xmlns:ns="urn:sap-com:document:sap:idoc:messages" version="1.0">
      <xsl:variable name="vFlag"/>
      <xsl:variable name="vAX" select="0"/>
      <xsl:variable name="vSAP" select="0"/>
      <xsl:variable name="vBoth" select="0"/>
      <!--  <xsl:variable name="vPONUM" select="POTRACKING/Lines[1]/PONumber"/>-->
      <xsl:template match="/">
        <xsl:for-each select="POTRACKING/Lines">
          <sap:call-external class="ZCL_VNAP_OBJECTS" method="CHECK_PO_EXIST">
            <sap:callvalue param="IP_EBELN" select="string(PONumber)"/>
            <sap:callvariable name="vFlag" param="EP_BOLEAN" type="string"/>
          </sap:call-external>
          <xsl:choose>
            <xsl:when test="$vFlag = 0">
              <!--          <p1:Receivers>
                <Receiver>
                  <Service>
                    <xsl:text>BS_AXAPTA_TST</xsl:text>
                  </Service>
                </Receiver>
              </p1:Receivers>-->
              <xsl:variable name="vAX" select="$vAX + 1"/>
            </xsl:when>
            <xsl:when test="$vFlag = 1">
              <!--          <p1:Receivers>
                <Receiver>
                  <Service>
                    <xsl:text>BS_ECQCLNT300</xsl:text>
                  </Service>
                </Receiver>
              </p1:Receivers>-->
              <xsl:variable name="vSAP" select="$vSAP + 1"/>
            </xsl:when>
          </xsl:choose>
        </xsl:for-each>
        <xsl:if test="$vSAP &gt; 0">
          <xsl:if test="$vAX &gt; 0">
            <xsl:variable name="vBoth" select="$vBoth + 1"/>
            <xsl:variable name="vSAP" select="0"/>
            <xsl:variable name="vAX" select="0"/>
          </xsl:if>
        </xsl:if>
        <xsl:if test="$vBoth &gt; 0">
          <p1:Receivers>
            <Receiver>
              <Service>
                <xsl:text>BS_AXAPTA_TST</xsl:text>
              </Service>
            </Receiver>
            <Receiver>
              <Service>
                <xsl:text>BS_ECQCLNT300</xsl:text>
              </Service>
            </Receiver>
          </p1:Receivers>
        </xsl:if>
        <xsl:if test="$vAX &gt; 0">
          <p1:Receivers>
            <Receiver>
              <Service>
                <xsl:text>BS_AXAPTA_TST</xsl:text>
              </Service>
            </Receiver>
          </p1:Receivers>
        </xsl:if>
        <xsl:if test="$vSAP &gt; 0">
          <p1:Receivers>
            <Receiver>
              <Service>
                <xsl:text>BS_ECQCLNT300</xsl:text>
              </Service>
            </Receiver>
          </p1:Receivers>
        </xsl:if>
      </xsl:template>
    </xsl:transform>

  • 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)?

  • Mapping issue - if value matches on of several conditions

    Hi champs,
    I have a mapping in PI 7.1 of an invoice-xml  to a INVOIC02-idoc.
    I am mapping the invoice sums to E1EDS01-segments and just want to map five of several qualifiers. So I have set up a mapping for the qualifier field SUMID that just maps those five qualifiers, and map the SUMME-field from inbound message as it is.
    Now it shows that our vendors send more than those five qualifiers I have in my mapping. Since I don´t have any control of the SUMME-field all seven values get mapped into the Idoc (generating seven E1EDS01-segments), but only the five segments with my mapped SUMID get the SUMID-field. So I get in total seven E1EDS01 segments in which I get only the SUMME in two of them.
    So my question is: Are there any pretty ways to handle this kind of mapping issues besides using a lot of equalS, if and or?
    I would like to be able to say (in as simple a function as possible)  that if qualifier in field A is X, Y or Z then map the value in field B to SUMME. How do I do that? BTW I am not a java-programmer so advanced java-codes are not a good way for me to handle it.
    regards,
    Glenn

    Write an UDF with this code:
    public void <UDFNAME>(String <FieldName>,Container container){
    If (<FieldName> == "X" || <FieldName> == "Y" || <FieldName> == "Z"){
    return <FieldName>;
    Edited by: spantaleoni on Mar 16, 2011 4:04 PM

  • 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

Maybe you are looking for

  • Display document data in dialog box

    I am using a folder level script to do the following: Get a specific XMP field value from an open PDF file: this.info.InDesignFileName Define a dialog box Create a menu item that calls the dialog box But for the life of me, I cannot get the dialog cr

  • No "Submit to SAP" button, the submit button offered doesn't work

    Hello everyone, I am working with the interactive forms and I have tried going through the PDF about how to use an RFC with the interactive forms.  During the tutorial, they say to add a button called "Submit to SAP", but I don't have one.  I have gr

  • Is there a way to "embed" -Xmx command into program

    Hi fellow members, I have been working on a program to analyze web page structural similarity and has been posting on this forum for some help recently. At the moment I manage to parse html into DOM tree and perform tree edit distance analysis. But I

  • Could not test Bex Analyser in SICF

    I have a aS-ABAP system . I have activated the BEx analyser from SICF, But when i test the service, i am getting a "Page cannot be displayed" message. Pls let me know if there is any other services or programs to be executed for this Pls help

  • Can anyone help with this coding question?

    I was asked to create an artist page for a musician on myspace. I created the whole layout to look awesome but then when I grabbed the code in dreamweaver and placed it into myspace, it said violation of terms. I saw that myspace uses tables and so t