Increment counter in XSLT mapping

Hi Experts,
I am creating xslt mapping by using mapforce tool. I am trying to get increment counter variable in xslt mapping. can you please tell me what would be the code for getting sequence number.
Thanks for your help.
Thanks,
Hari

yes, there is a global variable concept in XI which u can use for your Sequence Number concept.
If you are on SP14 and above, just take a lookat this blog and the GLOBAL Variables Section
XI: New features in SP14
check this thread
Re: Need Help in XSLT Mapping
Re: Sequence Number in XI Mapping

Similar Messages

  • How to Count schedule lines in IDoc ORDERS05 using XSLT Mapping

    Hi Experts,
    In a Scenario where we are sending Purchase order (ORDERS05) to SAP SNC using XSLT Mapping,
    where in we need to count the no. of schedule lines against the Purchase Order line.
    As in Schedule line segment there is no such provision, so it needs to be handle in XSLT mapping to count the schedule lines.
    Can you all please guide me how to go about the same.
    Regards,
    Nitin P

    Hi Satish,
    Thank you very much for the reply,
    as there is only Quantity and other information is maintained against schedule lines how we can count the schedule line repeatation against PO line ? Is that very simple as you suggested or some other consideration also needs to be taken.
    Please clarify the same and let me also know if there are some standard documents also for the same.
    Regards,
    Nitin P

  • Need help for Count function in XSLT Mapping

    Hi All,
    We have a requirement in our project,to do the xslt mapping from OAGIS 9.0 to EDI XML.In the EDI XML we have a SE tag whose value is the count of the no. of complex elements that will be generated in the EDIXML file( which is the target).
    Please do let me know if anybody has done this functionality in the xslt mapping.
    Thanks in Advance.
    Regards,
    Kaavya

    Hi,
    for the Hex-Number-conversion see:
    [url http://psoug.org/snippet/Convert-Hex-to-Decimal-Decimal-to-Hex_78.htm] self-defined Conversion-Functions
    What number format do you have? YYYMMDD
    Or is there a Date corresponding to 1 and a number n represent the date n-1 days after day 1?
    Please describe further.
    Bye
    stratmo

  • MAPPING: Increment counter while creating destination structures

    Hello,
    i have the following source and destination structure:
    <src_struct> (0-n)
        <qualifier>
        <value>
    </src_struct>
    <dest_struct> (0-n)
        <counter>
        <qualifier>
        <value>
    </src_struct>
    only those dest structures have to be created where <qualifier="XX">.
    Thus my mapping on structure level looks like:
    if <qualifier>  equalS "XX" createIf --> <dest_struct>
    This works fine.
    But additionally i need to increment <counter> in the dest_struct. I.e., when i have 10 src_struct where 5 of them has <qualifier="XX"> i need 5 dest_struct with counter 1 to 5.
    I tried this with a UDF which has just a constant as input:
    "MY_COUNTER"  --> UDF:getNextCounter --> <counter>
    This argument is the name under which the last counter was saved in the global container. My expectation was that for each time the field <counter> will be created, my UDF reads the las counter, increments it, saves it back to the container and returns the result.
    but the bahavior is different:
    For example:
    if src_structures 6-10 have <qualifier>="XX" my UFD returns 6-10 in sequnce instead
    of 1-5. The shows me, that my UDF runs 10 times even though just 5 dest_struct are created.
    What do i wrong?
    Her my UDF:
    GlobalContainer gc  = container.getGlobalContainer();
    String counter = new String();
    counter  = (String)  gc.getParameter(MY_COUNTER);
    if(counter==null) {
         counter = "1";
         gc.setParameter(MY_COUNTER,counter);
         return(counter);
    Integer i_counter = new Integer(counter);
    int i = i_counter.intValue() + 1;
    Integer I = new Integer(i);
    counter = I.toString();
    gc.setParameter(ID_TYPE,counter);
    return(counter);

    Hi,
    Why dont you take qualifier as another argument (say b) for the same UDF.
    so that you can check the value of the qualifier and run the logic as you needed.
    as below,
    if (b.equals("XX"))
    GlobalContainer gc = container.getGlobalContainer();
    String counter = new String();
    counter = (String) gc.getParameter(MY_COUNTER);
    if(counter==null) {
    counter = "1";
    gc.setParameter(MY_COUNTER,counter);
    return(counter);
    Integer i_counter = new Integer(counter);
    int i = i_counter.intValue() + 1;
    Integer I = new Integer(i);
    counter = I.toString();
    gc.setParameter(ID_TYPE,counter);
    return(counter);
    Let me know if its not working.
    Hope this helps.
    Prasad Babu.

  • XSLT mapping query

    Hi All
    I have done a XSLT mapping to map a flat file structure to a hierarchical structure. But my 3rd level node is getting repeated for 2nd level node. Please find the details below
    Source Structure - flat file
    Header - 1
    Record - 1....unbound
    Forecast - 1....unbound
    Target Structure
    level1 - MessageHeader - 1
    level1 - ProductActivity  - 1
               level 2 Record  - 1...unbound
                         level 3 Forecast - 1...unbound
    *Sample Format of Source file*
    Header
    Record1
    Forecast1.1
    Forecast1.2
    Record2
    Forecast 2.1
    Forecast 2.2
    Now after execution of XSLT mapping the output I am getting contains all Forecast nodes for every record. For example output of above mentioned format is
    *Sample Format of target structure*
    MessageHeader
    ProductActivity
               Record1
                      Forecast1.1
                      Forecast1.2
                      Forecast2.1
                      Forecast2.2
               Record2
                      Forecast1.1
                      Forecast1.2
                      Forecast2.1
                      Forecast2.2
    Expected Output
    MessageHeader
    ProductActivity
               Record1
                      Forecast1.1
                      Forecast1.2
               Record2
                      Forecast2.1
                      Forecast2.2
    Here is code for forcast row
    <!-- TimeSeries: Net demand forecast(Dynamic replenishment) and Planned Receipt (SNI)-->
    <xsl:if test="$ProcessFlag= 'SM'">
    <OrderForecastTimeSeries>
    <xsl:for-each select="//Forecast">
    <Item>
    <ValidityPeriod>
    <StartDateTime><xsl:value-of select="substring(./ForecastDate, 1,4)"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="substring(./ForecastDate,5,2)"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="substring(./ForecastDate,7,2)"/>
    <xsl:text>T</xsl:text>
    <xsl:text>00:00:00</xsl:text>
    </StartDateTime>
    <EndDateTime>
    <xsl:value-of select="substring(./ForecastDate, 1,4)"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="substring(./ForecastDate,5,2)"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="substring(./ForecastDate,7,2)"/>
    <xsl:text>T</xsl:text>
    <xsl:text>00:00:00</xsl:text>
    </EndDateTime>
    </ValidityPeriod>
    <Quantity>
    <xsl:attribute name="unitCode"><xsl:value-of select="Unit"/></xsl:attribute>
    <xsl:value-of select="Quantity"/>
    </Quantity>
    </Item>
    </xsl:for-each>
    </OrderForecastTimeSeries>
    </xsl:if>
    Edited by: Amol on Jul 21, 2009 3:26 AM

    Hi Amol,
    Try the below mentioned and see if can achieve this:
    Hi Amol,
    Try to do it this way and see if it works:
    In side loop for <xsl:for-each select = "/Record">
    Dont use for-each for ForeCast.
    Take the count of "ForeCast" by using the Count() function. Now use it as a predicate for ForeCast.
    EG: /ForeCast [CountValue - (CountValue-i)]
    Here i should be 1 and every time the loop is incremented, i should also increment by one.
    Just try if you can achieve this.
    Regards,
    Anshul
    Warm Regards,
    Anshul

  • Calling abap method in xslt mapping?

    Hi
    I need to call abap method in my xslt mapping , i tried with
    <sap:external-call >and <sap:external-function> .
    But it is giving short dump error.
    Can anybody give me proper syntax..
    thanks
    Prasad

    Hello,
    Please see the code below.
    This is how u call
      <sap:external-function class="ZTEST_CLASS" kind="class" method="GETRECORDCOUNT" name="ns0:GetRecordCount">
        <sap:argument param="XXXX" type="string"/>
        <sap:argument param="YYYY" type="string"/>
        <sap:result param="ZZZZ" type="string"/>
      </sap:external-function>
      <xsl:template match="/">
        <xsl:param name="Counter">
    *And this is how u call below...
    <xsl:value-of select="ns0:GetRecordCount(A,B)"/>
    </xsl:template>
    </xsl:transform>
    Regards,

  • XSLT mapping not reflected at the receiver

    Hi ,
    I am working on IDoc to proxy scenario . At the receiver i have SNC which uses standard content . The mapping here is XSLT mapping .
    I modified the standard content XSLT mapping according to the requirement . The mappings works fine in the test tool . However on checking the payload at the receiver side the field i mapped is non existent
    this is the XSLT code i used for mapping
    !--TAxcode -->                    
    <xsl:if test="count (./E1EDP04/MWSKZ)!=0">
                                       <xsl:element name="FollowUpInvoice">
                                            <xsl:element name="ProductTaxationCharacteristicsCode">
                                                 <xsl:value-of select="./E1EDP04/MWSKZ"/>
                                                 </xsl:element>
                                       </xsl:element>          
                                  </xsl:if>
    ProductTaxationCharacteristicsCode has 0-1 occurence
    Is there anything i am missing out here ?

    Hi,
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    http://www.w3schools.com/xsl/xsl_languages.asp
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    If we use Altova map force tool, it will automatically generate the code, instead of we manually writing.
    Here we map the mapping like our graphical, internally it generates the corresponding the XSLT code.

  • XSLT Mapping code

    i want to produce correct output, which is mentioned in the the blog /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    i think there was an error in the XSLT coding.
    i modified the code as follows:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
      xmlns:p2="urn://Mapping">
    <xsl:template match="/">
    <p2:MT_STUD>
    <Records>
            <xsl:for-each select="p2:MT_STUD_SORC/Records/Student_ID">                    
                <Student_ID>
                <Name>
                     <xsl:value-of select="concat(concat (p2:MT_STUD_SORC/Records/Student_ID/Fname,' '),p2:MT_STUD_SORC/Records/Student_ID/Lname)"/>
                </Name>
                <Year_Birth>
                    <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,1,4)"/>
                                   </Year_Birth>
                                   <Month_Birth>
                                   <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,5,2)"/>
                                   </Month_Birth>
                                   <Date_Birth>
                                   <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,7,8)"/>
                                   </Date_Birth>
                                   <Marks>
                                          <Science>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Science"/>
                                          </Science>
                                          <Maths>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Maths"/>
                                          </Maths>
                                          <Language>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Language"/>
                                          </Language>
                                           <Total_Marks>
                                           <xsl:value-of select="sum(p2:MT_STUD_SORC/Records/Student_ID/Marks/Sciense, p2:MT_STUD_SORC/Records/Student_ID/Marks/Maths, p2:MT_STUD_SORC/Records/Student_ID/Marks/Language)"/>
                                           </Total_Marks>
                                 </Marks>
                            </Student_ID>
           </xsl:for-each>
                          <No_Students>
                          <xsl:value-of select="count(p2:MT_STUD_SORC/Records/Student_ID)"/>
                          </No_Students>
            </Records>
           </p2:MT_STUD>
      </xsl:template>
    </xsl:transform>
    here inthis i got two errors, one is SUM function have improper arguments,
    and the second one is, i am unable to produce the multiple students at the receiver side.
    can any body modify and correct this code?
    Thanks ,
    kumar

    hi this is the input file at interface mapping testing:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_STUD_SORC xmlns:ns0="urn://Mapping">
       <Records>
          <Student_ID>
             <Fname>a</Fname>
             <Lname>s</Lname>
             <DOB>19961203</DOB>
             <Mail_ID>w</Mail_ID>
             <Marks>
                <Science>23</Science>
                <Maths>34</Maths>
                <Language>45</Language>
             </Marks>
          </Student_ID>
          <Student_ID>
             <Fname>we</Fname>
             <Lname>op</Lname>
             <DOB>19961203</DOB>
             <Mail_ID>w</Mail_ID>
             <Marks>
                <Science>23</Science>
                <Maths>34</Maths>
                <Language>45</Language>
             </Marks>
          </Student_ID>
       </Records>
    </ns0:MT_STUD_SORC>
    but i am not able to see the multiple no of students at out put.
    and it is saying that "sum" function have improper arguments.
    Thanks,
    kumar
    Edited by: kumar kumar on Mar 16, 2009 2:20 PM
    Edited by: kumar kumar on Mar 16, 2009 2:22 PM

  • Xslt mapping can't get date from java

    I am trying to get the current date/time from java in my xsl mapping. I can't seem to get it to work. This is the code I am using in my xsl file.
    <IDField>
      <xsl:template name="currentTime" xmlns:date="java:java.util.Date">
    <xsl:value-of select="date:new()"/>
      </xsl:template>
    </IDField>
    also tried
    <xsl:value-of select="java:java.util.Date:new()"/>
    I simply want to put the current date time in the IDField. What am I doing wrong? I am currently getting back a xslt mapping error. Here's the error....
    Transformer configuration exception occurred when loading XSLT
    I've tried a few different ways, but none have worked. What I'm looking for is the specific code that would display the date/time.
            - Emmett

    I figured it out. The main problem was that I didn't have the following in this line....
    <xsl:stylesheet version="1.0" <b>xmlns:java="http://xml.apache.org/xslt/java" </b>xmlns:xsl="http://www.w3.org/1999/XSL/Transform" .....>
    Once I included xmlns:java="http://xml.apache.org/xslt/java" all the java functions were available. I also found the great date template. In case anyone wants to check it out here it is...
    <xsl:template name="today"
                  xmlns:cal="xalan://java.util.GregorianCalendar">
      <xsl:variable name="rightNow" select="cal:getInstance()" />
      <!-- The GregorianCalendar class counts months from zero
           so we have to add one to get the customary number -->
      <xsl:variable name="month" select="cal:get($rightNow, 2) + 1" />
      <xsl:variable name="day" select="cal:get($rightNow, 5) " />
      <xsl:variable name="year" select="cal:get($rightNow, 1)" />
      <xsl:value-of
       select="$year" />-<xsl:value-of
       select="$month" />-<xsl:value-of
       select="$day" />
    </xsl:template>
    I found this template here...
    http://cafeconleche.org/books/xmljava/chapters/ch17s03.html
               - Emmett

  • Counter in XSLT processing

    Is there anyway to keep an incremental counter in an XSLT stylesheet? I would like to append this counter to several element names to maintain uniqueness.
    Thanks
    Kathy

    I can generated the number I want using xsl:number. However, I don't know how to include it as part of the element name I am trying to generate.
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    For example:
    <xsl:template match="DownlinkCellID_member">
    <xsl:number level="single" count="DownlinkCellID_member"/>
    <xsl:element name="DownlinkCellID{@index}">
    <xsl:value-of select="@value"/>
    </xsl:element >
    </xsl:template>
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    "index" is an attribute I included in the original XML file that I read and append to the element name. I would like to remove "index" from the original XML file and replace it's using in the xslt template with the output from xsl:number. How can I do this? Will it work if I create a variable?
    Thanks :-)

  • Xsi:nil="true" in XSLT Map breaks "choose"-"when" loops - annoying

    Hello,
    Handling "nil" element in choose loops breaks my XSLT tranformation.
    As soon as the element is set to nil, either the "otherwise" branch is executed (wrongly) or the XSLT processing stops.
    I test with "count" for the existence of the element. Depending on if it is nil,
    other elements have to be processed in sub-loops.
    I have an XSLT Mapping in JDeveloper.
    It processes a SOAP request in the form:
    <result>
    <customerNew>CUSTOMER_NEW_NAME</customerNew>
    <customerCurrent>CUSTOMER_NAME</customerCurrent>
    </result>
    which can also be:
    <result>
    <customerNew xsi:nil="true">
    </customerNew>
    <customerCurrent>CUSTOMER_NAME</customerCurrent>
    </result>
    To check for Nil I use:
    <xsl:when test='not(boolean(count(/ns0:changeCustomer/result/customerNew))) and contains(/ns0:changeCustomer/result/customer,"USER_NAME_SOME_BODY")'>
    (the xslt maps between two xsd files and we have quite strict schema definitions)
    As soon as I use the test statement in a loop, it breaks, even if I test for "true" and do not simply check for count<1 etc.
    How can I work with the <customerCurrent> Element, even if the previous element is nilled?
    I talked to several experienced developers and nobody could help. They can do checks in plain xsl with xalan, but not in JDeveloper.
    This took me five days already...who can advice?
    Your help is appreciated very much.

    hi user570144
    You write "They can do checks in plain xsl with xalan, but not in JDeveloper.". Could you describe in detail what it is you (would like to) do "in JDeveloper" and how that is different from "plain xsl with xalan"?
    The "contains" function in your xsl:when test example has the expression "/ns0:changeCustomer/result/customer", but in the xml examples you gave there is no "customer" element inside the "result" element, only "customerNew" and "customerCurrent" elements.
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    regards
    Jan Vervecken

  • FileName in ABAP XSLT Mapping

    Dear SDN,
    In an integration scenario we are using sender File Adapter and a  ABAP XSLT Mapping.
    Is there any way to get the source FileName from such mapping.  Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.
    regards,
    GP

    Thank you for your help,
    I just try to access the adapter-specific attibutes using:
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:variable name="filename"  select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
    </xsl:stylesheet>
    but the following error raised:
    <SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
    have you had this situation?

  • XSLT MAPPING

    In which cases we will go for XSLT MAPPING?
    What are different functions available in altova map force ? please provide me the helpful material regards this?

    Hi,
    Check this link..
    http://help.sap.com/saphelp_nwpi711/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    STEPS.
    1.  Open the Alto MapForce, import the source .xml and .xsd file in it
    2. Similarly import the target .xml and .xsd in MapForce.
    3.These two data files should match with source and target data types in Integration Repository.
    4.Complete the graphical mapping using extensive list of XSLT functions available there.
    5. Save the mapping file.
    6.Click the XSLT tab. You will have the entire xslt logic there.
    7.Copy that content and save it as .xsl file.
    8. Zip above .xsl file and import the same into IR under Imported Archives.
    Thanks.

  • XSLT mapping Help Required.

    XSLT mapping Help Required.
    Hi Experts,
    I am New to XSLT Mapping. I am practising the below Example:
    InputXML File:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    XSL StyleSheet File:
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
    Xmlns:ns1=”http://XYZ.com/Test”>
    <xsl:template match="/">
    <ns1:MT_XSLT_Target>
    <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
    <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
    </Name>
    <Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
    ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
    <City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
    </ns1:MT_XSLT_Target>
    </xsl:template>
    </xsl:stylesheet>
    The Desired Output shuold be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
    <Title>Male</Title>
    <Name>Anshul Chowdhary</Name>
    <Street>83/b 2nd Main</Street>
    <City>Mysore</City>
    </ns1:MT_XSLT_Target>
    I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
    Anshul Chowdhary Male 2nd Main 83/b Mysore
    I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
    Regards,
    GIRIDHAR

    Hi,
    I have used below for testing.
    Input xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    xsl code:
    <?xml version='1.0' encoding="UTF-8"?> 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen" 
        xmlns:ns1="http://XYZ.com/Test"> 
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> 
        <xsl:template match="/"> 
            <ns1:MT_XSLT_Target> 
                <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title> 
                <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/> 
                </Name> 
                <Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '), 
                    /ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street> 
                <City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City> 
            </ns1:MT_XSLT_Target> 
        </xsl:template> 
    </xsl:stylesheet>
    For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
    Regards
    Venkat

  • 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

  • VMWare Fusion - Is it really a VM machine

    I used boot camp to dual boot with XP or Leopard. I just installed Fusion. I had to reactivate XP via M$ phone system. It launches OK within Fusion. However, it appears to have hybrid characteristics. For example, the touch pad right click doesn't br

  • AP_PAY_SINGLE_INVOICE_PKG.AP_PAY_INVOICE_IN_FULL not populated Bank_account_num

    Hi all, After calling below API Bank_account_num not populated in AP_CHECKS_ALL and AP_INVOICE_PAYMENTS_ALL tables. AP_PAY_SINGLE_INVOICE_PKG.AP_PAY_INVOICE_IN_FULL Anyone Can you help me on this issue...............

  • How to install an app in phone using extension files

    Hi, I have a very small doubt in windows development. I am new to windows development and my question is in android phones we can install developed app by using .apk files similarly is there any way to install app in windows phone app which i am deve

  • 2 different invokers - error

    Dear friends, INTRO I tried to invoke a WS in BPEL using 2 different invokers. But I always get errors. No Idea why.. The first invoker is always "client" right?! So I tried to duplicate this partner link and become "client2" PROBLEM I CAN compile an

  • Why can not catch the standard BACK event in ALV's USER_COMMAND event,

    Hi expert, why i can not catch the standard BACK event in ALV's USER_COMMAND event, Code: DATA G_CON_UC_FORM   TYPE SLIS_FORMNAME VALUE 'F_USER_COMMAND', CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'     EXPORTING       I_CALLBACK_PROGRAM      = SY-REPID