Loop in XSLT Mapping

Hello experts,
What is Support inheritence in SAP XI.
Difference between value,context,Queue.
How to use LOOP in XSLT mapping.
Thank you

Hi,
Value : Value makes the UDF a simple UDF, wherein u pass only a single value.
Context : But there might be occasion when you want to pass the input as contexts, then you use context.
So here you will be looping through each context.
Introduction to Context Handling in Message Mapping
Queue : When you want to pass the entire queue, you choose Queue. Here you will looping through the entire queue. Queue contains different contexts.
Introduction to queues in message mapping
For XSLT
http://www.w3schools.com/xsl/xsl_for_each.asp

Similar Messages

  • 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

  • XSLT mapping - Mapping of unbounded elements using Altova Mapforce

    Hi,
    Please give guidance on doing XSLT mapping for unbounded elements in Altova Mapforce. I am not seeing any functions (like FOR loop etc.,) in the XSLT mapping screen for the same.
    I appreciate your input.
    Regards
    Ramesh

    HI,
    For XSLT Mapping refer this help to get functions,syntax etc-
    http://www.w3schools.com/xsl/default.asp
    Regards,
    Moorthy

  • XSLT mapping sometimes throw ArrayOutOfBoundsException

    Hi
    I have a simple XSLT mapping that is supposed to group elements based on an identificator (number).
    My issue is that when testing message through PI, it sometimes throw ArrayOutOfBoundsException and sometimes not, with the same records involved..!!
    I have tested it all in XML Spy and there it always works.
    The XSLT looks like this:
         <xsl:for-each select="Invoice_KA49">
              <xsl:variable name="Ident">
                   <xsl:value-of select="Identificator"/>
              </xsl:variable>
              <GroupElement>
                   <xsl:copy-of select="../[Identificator=$Ident]"/><!--../-->
              </GroupElement>
         </xsl:for-each>
    Anyone knows why this happens? Any help would be appreciated!
    Thanks.
    regards Ole

    Hi Ole, looks like you produce a document with duplicate entries which have to be removed in a next step. Maybe the duplicate entries blow up the document. When you want to group Invoice_KA49 elements based on the key Identifikator, as Udo already suggest you should only select distinct values in the for-each loop, e.g.
    <xsl:for-each select="//Invoice_KA49[Identifikator=not(./Identifikator=preceding-sibling::Invoice_KA49/Identifikator)]">
    In this way you do not produce duplicate entries.
    Unfortunately we cannot use the function
    distinct-value(..)
    here since it's only available in xslt 2.0.
    Best regards, Martin

  • Help in XSLT Mapping

    Hi mates,
    I'm trying out the scenario in one of michal's blogs
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    my source message is as follows
    <i><?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_ErrorDetails xmlns:ns0="http://xyz.com/utility/errors/ReportErrors">
       <Object_Error>
          <Client/>
          <Logical_System/>
          <Object_Type/>
          <Object_Key>1234</Object_Key>
          <Error_Message/>
       </Object_Error>
       <Object_Error>
          <Client/>
          <Logical_System/>
          <Object_Type/>
          <Object_Key>1235</Object_Key>
          <Error_Message/>
       </Object_Error>
    </ns0:MT_ErrorDetails></i>
    I'm trying to generate o/p which will have 'Object_key's separated by line break i.e. new line.
    I wrote teh following XSLT code in XSLT_TOOL.
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <html>
    <body>
    </body>
    <p>
    <strong>The following is the list of Material Numbers with errors</strong>
    </p>
    <p>
    <ol>
    <xsl:for-each select="Object_Error">
    <li value="0">
    <xsl:value-of select="Object_Key"/>
    </li>
    </xsl:for-each>
    </ol>
    </p>
    </html>
    </xsl:template>
    </xsl:transform>
    I wrote this based on XSLT mapping given in the blog. But my mapping is not giving me the required result. It gives the following o/p.
    <i><html><body></body><p><strong>The following is the list of Material
    Numbers with errors</strong></p><p><ol></ol></p></html></i>
    It doesnt select the 'Object Key's. What is wrong/missing in the XSLT mapping..XSLT gurus please help out this beginner.
    I highly appreciate your inputs.
    thx in adv
    praveen

    Hi Praveen,
    I think the reference in your loop is not correct.
    Try
    <xsl:for-each select="Object_Error/Object_Key">
    <li value="0">
    <xsl:value-of select="."/>
    </li>
    </xsl:for-each>
    or
    <xsl:for-each select="Object_Error">
    <li value="0">
    <xsl:value-of select="./Object_Key"/>
    </li>
    </xsl:for-each>
    both should work.
    regards
    Dirk

  • 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

  • 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

  • XSLT mapping queries.

    Hi,
    I have a scenario in which I need to post the data in JMS queue from a proxy call.
    [Proxy>PI>JMS]. Here the MQ message is fed to a web application.
    The scenario contains two mapping viz message and XSLT mapping.
    The first one is message mapping and then XSLT is called.
    Now in the XSLT mapping CDATA tag is called to skip the xml parsing and send to JMS queue for HTML output in web application.
    My doubt is how can I achieve table formatting from PI. Few options can be
    1) incorporate xsl in CDATA tag of XSLT mapping for HTML tag for table format?
    2) instead of JMS queue, should I need to post in HTTP receiver directly?
    3) Is it the xsl need to add in Web application side for the sending xml from PI?
    Please help in my understanding.
    Thanks
    PV.

    Hi,
    Try with Java Proxy,you can directly update data in to web application or if you web application team ready to accept data in the form of web service then you no need to generate output in the form of HTML.
    Regards,
    Raj

  • XSLT Mapping Related

    Hello Experts,
    In a scenario we are sending Purchase orders and Purhase Order change from SAP to SNC through XI.
    Currently we are using Orders03 message type for IDOC.
    The requirement is to use Orders05 message type for IDOC.
    What changes would be necessary if we are to use Orders05 instead of Orders03
    - On SAP side,
    - in the XSLT mapping, and
    - On XI side.
    Thanks in advance,
    Suraj

    Hi,
    What changes would be necessary if we are to use Orders05 instead of Orders03
    - On SAP side,
    ==> you need to check your distribution model (BD64) and partner profiles (WE20) and adjust the settings there according to ORDERS05.
    - in the XSLT mapping, and
    ==> This depends on what your XSLT looks like. If there are any ORDERS03 specific statements, etc. or the structure is "heavily" changed from ORDERS03 to ORDERS05 you need to adjust the XSLT accordingly.
    - On XI side.
    ==> You need to import the ORDERS05 IDoc Metadata to XI Abap stack (IDX2). Also in IR you need to import the new IDoc, create message type and assign it to your mapping.
    Regards,
    Kai

  • XSLT Mapping of Adapter-Specific Message Attributes

    Hi,
    We have the requirement to build a soap request with a custom soap envelop/header which contains a sessionId.
    Therefore we developed a xlst mapping which is called directly after a graphical mapping.
    In the graphical mapping the session id is written to the dynamic configuration.
    The goal is to read this session id in the xslt mapping from the dynamic configuration using XSLT Mapping of Adapter-Specific Message Attributes. We used  [this|http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm] documentation as an example.
    But we are getting the following error: TransformerConfigurationException triggered while loading XSLT mapping. The error is raised at this node: <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    This is the coding of the xslt transformation:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:ns1="urn:enterprise.soap.sforce.com"
          xmlns:map="java:java.util.Map"
          xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
          xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
    <soapenv:Header>
    <urn:SessionHeader>
    <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    <xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/SOAP', 'sessionId')" />
    <xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)" />
    <urn:sessionId><xsl:value-of select="$dynamic-value"></xsl:value-of></urn:sessionId>
    </urn:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
    <xsl:copy-of select="*"/>
    </soapenv:Body>
    </soapenv:Envelope>
    </xsl:template>
    </xsl:stylesheet>
    Any help will be highly appreciated.
    Regards, Henk

    Hi, yes we did try that and lot's of other combination.
    The results of those trials are that it seems to go wrong with <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    When we enclose it with <xsl:if test="function-available('map:get')"> the transformation is not dumping, but the function is not available.
    Regards, Henk

  • 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..

  • 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

Maybe you are looking for

  • Looking for a database

    Can anyone point me to a good free cross platform database for use in a desktop app? My needs are minimal (storage only, no procedures or triggers). I'd like to keep my footprint as low as possible on the target machines. If it has a GUI for developm

  • "Media Files" Can't be found!

    I have been organizing footage onto a hard-drive (that is formatted for mac), and recently when I tried to open a project, one clip that I captured didn't work and gave me an error message saying: "Searching for Movie Data..." And then another window

  • My IPhoto is not supported on my architecture?

    My Iphoto is not supported on my architecture?  What I do?

  • Accrual Write-off Amt in Accrual Write-Off & Accrual Recon report not tele

    Hi, Need a help here, Oracle EBS version : 11.5.10.2 The Accrual Write-Off Amount in Accrual Write-off report does not tele with the Write-Off Amount shown in Accrual Reconciliation Report, any clues to investigate? This happens for the first time af

  • Can't Send Mail Via HughesNet SMTP Server

    After installing 10.5 I find that I can receive mail from my ISP (HughesNet) but I can't send mail through the smtp server. I've tried every setting possible and even duplicated the settings off my wife's 10.4.10 iMac and I still can't send mail. All