Mapping XML stream to C structure using XSLT ?

Can I use XSLT to map an XML stream to a C structure ?. is there any samples ?
Raees

Can I use XSLT to map an XML stream to a C structure ?. is there any samples ?
Raees

Similar Messages

  • Problem converting XML back to ABAP Structure using XSLT

    Hi Experts,
    I am currently trying to convert this xml file back to my ABAP structure but i have been unsuccessful so far. In XML file contain more than 1 reocrd. But my XSLT program is retriving only only first record. Try to help to get all the records.
    Sample XML File:
    Thanks for your help in advance.
    Regards,
    Srini

    here is the XSLT program YSIMPLEXMLTOITAB1
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="//String">
                <ZTEST11>
                  <FINAL_RESULT>
                    <xsl:value-of select="."></xsl:value-of>
                  </FINAL_RESULT>
                </ZTEST11>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    ABAP report program to test this.
    REPORT yjfkdjkfmxl
           NO STANDARD PAGE HEADING.
    DATA: BEGIN OF ztest11  OCCURS 0,
          final_result(220),
          END OF ztest11 .
    DATA: xml_string TYPE string .
    DATA: xslt_error     TYPE REF TO     cx_xslt_exception,
    xslt_message     TYPE     string .
    CLEAR xml_string .
    CONCATENATE
    `<?xml version="1.0" encoding="utf-8"?>`
    `<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> `
    `<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">`
    `<ns:matchResponse xmlns:ns='http://www.openuri.org/'>`
    `<matchResult xsi:type='SOAP-ENC:Array' SOAP-ENC:arrayType='xsd:string[18]'>`
    `<String xsi:type='xsd:string'>23901|EUS|20060625 |ABU NIDAL ORGANISATION||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23934|EUS|20060625 |ABU NIDAL ORGANISATSIOON||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23940|EUS|20060625 |ABU NIDALORGANIZACIJA||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>4228|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||DZ|ALGERIA|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4229|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||LB|LEBANON|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4231|sdme|19950301 605084 19950125|ABU NIDAL ORGANIZATION||||||LY|LIBYAN ARAN JAMAHIRIYA|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4232|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||SD|SUDAN|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>4233|sdme|19950126 605084 19950125|ABU NIDAL ORGANIZATION||||||IQ|IRAQ|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>6643|dto|19971008 6252649 199710086651088 200110056856860 20031002|ABU NIDAL ORGANIZATION||||||XX|ALL|68|56860 |20031002|19971008|20880808</String>`
    `<String xsi:type='xsd:string'>23941|EUS|20060625 |ABU NIDAL SZERVEZET||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>4332|sdme|19950126 605084 19950125|NIDAL, ABU|DOB: May 1937 or 1940||JAFFA|||IL|ISRAEL|60|5084 |19950125|19950123|20880808</String>`
    `<String xsi:type='xsd:string'>23950|EUS|20060625 |ORGANIZACIJA ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23911|EUS|20060625 |ORGANIZACIÓN ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23946|EUS|20060625 |ORGANIZACJA ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23916|EUS|20060625 |ORGANIZAÇÃO ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23955|EUS|20060625 |ORGANIZZAZIONE ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:type='xsd:string'>23949|EUS|20060625 |ORGANIZÁCIA ABU NIDAL||||||XX|ALL||||20060529|20880808</String>`
    `<String xsi:nil='true'></String>`
    `</matchResult>`
    `</ns:matchResponse>`
    `</SOAP-ENV:Body>`
    `</SOAP-ENV:Envelope>`
    INTO xml_string .
    TRY .
        CALL TRANSFORMATION (`YSIMPLEXMLTOITAB1`)
        SOURCE XML  xml_string
        RESULT     outtab = ztest11[].
      CATCH cx_xslt_exception INTO xslt_error.
        xslt_message = xslt_error->get_text( ).
    ENDTRY.
    Regards
    Raja

  • Problem converting XML back to ABAP Structure using XSLT program

    Hi Experts,
    I am currently trying to convert this xml file back to my ABAP structure but i have been unsuccessful so far. In XML file contain more than 1 reocrd. But my XSLT program is retriving only only first record. Try to help to get all the records.
    Sample XML File:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <m:matchResponse xmlns:m="http://www.openuri.org/">
    <matchResult soapenc:arrayType="xs:string[1]">
    <enc:String xmlns:enc="http://www.openuri.org/encodedTypes">
    23417|finc|20060427        |BELMETALNERGO||||||X
    X|ALL||||20060427|20880808
    </enc:String>
    </matchResult>
    </m:matchResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    My XSLT Program:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hp="http://www.openuri.org/" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="soapenv:Envelope/soapenv:Header/soapenv:Body/m:matchResponse/matchResult/enc:String">
                <ZA2_RPL_DETAILS_S>
                  <FINAL_RESULTS>
                    <xsl:value-of select="."/>
                  </FINAL_RESULTS>
                </ZA2_RPL_DETAILS_S>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    My Structure is : Structure Name is ZA2_RPL_DETAILS_S.
    filed is: FINAL_RESULT CHAR553
    My requirement is to store the complete value between <String> and </String>.
    Currently it is giving the blank records
    Thanks for your help in advance.
    Regards,
    Rao

    Hi,
    post here
    expert forums -> sapnetweaver -> exchange infrastructure
    Regards

  • Handling Multi hierarchial Structure using  XSLT or Java Mapping in XI

    Hello Experts,
    I have an requirement wherein i have sender as IDOC and File as Receiver.My target File structure is multi hierarchial with parent level and many child sub level node.
    I tried to generate flat structure using graphical mapping by creating an intermediate structure and then mapping it to flat structure but that seems to be very complex for my scenario as there are many sub level at target structure..
    Is there any simple way of handlng these????
    Thanks

    Hi ,
    I tried to implement your solution ..I am able to convert my idoc to XMLusing XLST but i have a question that how to convert that XMP to flat file as XI Receiver File adapter understand only 1st level of hierarchy..It doesnt understand nested level of hierarchy which is in my case...
    Below is the xslt code which i have written:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <MT_SALES_PO_DATA_INBOUND>
                   <xsl:value-of select="WPUBON01/IDOC"/>
                   <xsl:for-each select="WPUBON01/IDOC/E1WPB01">
                        <E1WBBB01>
                             <Store_ID>A001</Store_ID>
                             <SYS_INVOICE_NO>
                                  <xsl:value-of select="substring(BONNUMMER,'3','15')"/>
                             </SYS_INVOICE_NO>
                             <Cashier_ID>
                                  <xsl:value-of select="KASSID"/>
                             </Cashier_ID>
                        </E1WBBB01>
                   </xsl:for-each>
                   <xsl:for-each select="WPUBON01/IDOC/E1WPB01/E1WPB02">
                        <E1WBB02>
                             <Transaction_Type>
                                  <xsl:value-of select="VORGANGART"/>
                             </Transaction_Type>
                             <Article_Description>
                                  <xsl:value-of select="QUALARTNR"/>
                             </Article_Description>
                             <ITEM_CODE>
                                  <xsl:value-of select="ARTNR"/>
                             </ITEM_CODE>
                             <xsl:for-each select="WPUBON01/IDOC/E1WPB01/E1WPB02/E1WBB03">
                                  <E1WBB03>
                                       <Condition_Type>
                                            <xsl:value-of select="KONDITION"/>
                                       </Condition_Type>
                                       <xsl:for-each select="">
                                            <E1WBB04>
                                                 <TAX_Code>
                                                      <xsl:value-of select="MWSKZ"/>
                                                 </TAX_Code>
                                                 <TAX_Amount>
                                                      <xsl:value-of select="MWSBT"/>
                                                 </TAX_Amount>
                                            </E1WBB04>
                                       </xsl:for-each>
                                  </E1WBB03>
                             </xsl:for-each>
                        </E1WBB02>
                   </xsl:for-each>
              </MT_SALES_PO_DATA_INBOUND>
         </xsl:template>
    </xsl:stylesheet>
    Any idea how do i convert these XML to falt file USing XSLT or File Receiver adapter in XI???
    Thanks

  • How to add a textline to an xml structure using xslt

    Hi,
    I am having a requirement where i need to add a textline to an xml.
    scenario: IDOC-File  and output format is an xml.
    Output should be like this:
    &&##AOC0MB000#AD15543390#BOIFCO#Z
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <messages>
         <batch>0800062844</batch>
         <message>
              <type>VPR</type>
              <action>A</action>
              </body>
         </message>
    </messages>
    The line that has been added to xml is the data that will be coming from IDOC. How can we append the textline to the xml using xslt.Will document() in xslt works for doing this?

    The required format in ur scenario is not an xml format, so u should not save the file in xml format. U may write an adapter module at receiver to achieve this.
    How can we append the textline to the xml using xslt
    This is not possible as the output of xsl transformation is an xml file.
    Regards,
    Prateek

  • 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

  • How to get the WHOLE xml document inside a string using XSLT mapping

    Hi folks,
    I have a deep xml structure that I want to embed as body, tags included, in a mail message (not as an attachment).
    I'm trying to use Michal's method in this blog
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    However, I can't get it to deliver the entire structure instead of just specific elements.
    Any help is greatly appreciated,
    Thanks,
    Guy

    Ashok,
    I was able to work it out for my case.
    This XSL......
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <inside>
    <namestring>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="outside/name/*"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namestring>
    </inside>
    </xsl:template>
    </xsl:stylesheet>
    ...will transform this input....
    <?xml version="1.0" encoding="UTF-8"?>
    <outside>
    <name>
    <nameone>name1</nameone>
    <nametwo>name2</nametwo>
    <namethree>name3</namethree>
    </name>
    </outside>
    ...and put the whole lot into the CDATA element.
    Hope this helps you,
    Guy

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
    <xsl:template match="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • Mapping XML into 3rd party system using XIF adapter

    Hi Gurus,
    First of all let me thank all of you for a tremondous contribution you are making for these kind of topics(CRM XIF) in SDN. I could solve half my problems by looking into your replies.
    But I have a new & similar problem now. I am able to create and send XML file of order data into 3rd party middleware system using XIF & SOAP framework. But the 3rd party system(business connector) is unable to parse this XML file in their system. They keep getting the error message invalid XML file. I tried testing that myself and it gives me the error 'SOAP-ENV' error. They even tried some workarounds using some SOAP wrappers but it still didn't work. They are asking me to provide a DTD (data type definition) to this XML file generated out of SAP. Not sure if anyone has seen a similar problem like this but our interface is stuck at this point.
    Any suggestions would be helpful.
    Thanks,
    Sunil

    Hi,
    We have figured out this problem for ourselves. The 3rd party system gets this error because SAP generated 2 XML tags in the beginning of the XML file which cannot be interpreted by XML spy or many XML parsing software’s. When we deleted the first 2 tags we stopped getting that error. But it wasn't a feasible solution for us to delete the first 2 lines in the XML file and then save it and then parse it. We preferred an alternative approach via IDOC's instead of processing XML files directly. Its also better because the size of XML file is much bigger (15 mega) than Idoc ( max of 4 mega bytes). But if you have to process  XML files only then you cannot do that for real time or near real time processing as the parsing of XML file nearly takes more than 10 min. And it is definitely not preferred way especially if your middleware system has the capability to process Idocs from a middleware architectural stand point.

  • Create XML element without closing tag using Visual C++

    I know how to create xml element with closing tag (using WriteStartElement and WriteEndElement methods)
    <tag id="1234">
    </tag>
    but is there a way in Visual C++ to produce xml element like this
    <tag id="1234"/>
    i.e. without closing tag?

    Hi adamay,
    Please refer to this thread.
    http://stackoverflow.com/questions/8182245/create-xml-element-without-closing-tag-using-xslt
    I think you could try the way of write your own class derived from XmlWriter.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • XML to Internal table using XSLT by CALL TRANSFORMATION error

    Dear experts,
    I have to fetch the data from an XML file using XSLT into internal tables. The XML file is very big as following:-
    <?xml version="1.0" standalone="yes" ?>
    - <Shipment>
      <shipmentID>25091203S000778</shipmentID>
      <manifestDateTime>2009-12-03T20:16:52.00</manifestDateTime>
      <shipmentFacilityNumber>025</shipmentFacilityNumber>
      <shipmentFacilityAbbreviation>CHI</shipmentFacilityAbbreviation>
      <shipmentFacilityAddress1>810 KIMBERLY DRIVE</shipmentFacilityAddress1>
      <shipmentFacilityAddress2 />
      <shipmentFacilityCity>CAROL STREAM</shipmentFacilityCity>
      <shipmentFacilityState>IL</shipmentFacilityState>
      <shipmentFacilityPostalCode>601880000</shipmentFacilityPostalCode>
      <shipmentTruckCarrierCode>X150</shipmentTruckCarrierCode>
      <shipmentSourceCode>T</shipmentSourceCode>
      <userID>CAMPOSG</userID>
    - <Delivery>
      <primaryCustomerNumber>954371</primaryCustomerNumber>
      <primaryCustomerName>MIDWEST OFFICE SUPPLY</primaryCustomerName>
      <primaryCustomerAddress1 />
      <primaryCustomerAddress2>4765 INDUSTRIAL DR</primaryCustomerAddress2>
      <primaryCustomerCity>SPRINGFIELD</primaryCustomerCity>
      <primaryCustomerState>IL</primaryCustomerState>
      <primaryCustomerPostalCode>627030000</primaryCustomerPostalCode>
      <primaryCustomerPhoneNumber>2177535555</primaryCustomerPhoneNumber>
      <shuttleStopFacilityNumber />
      <billOfLadingNumber>25HZK99</billOfLadingNumber>
      <carrierProNumber />
      <shipmentTotalCartonCount>6</shipmentTotalCartonCount>
      <shipmentTotalWeight>266</shipmentTotalWeight>
    - <order>
      <orderNumber>25HZK99</orderNumber>
      <subOrderNumber />
      <dateProcessed>2009-12-03</dateProcessed>
      <primaryOrderNumber />
      <shipTruckCode>X150</shipTruckCode>
      <shipTruckDescription>UDS - ADDISON</shipTruckDescription>
      <shipTruckPriorityCode>01</shipTruckPriorityCode>
      <shipTruckGroupCode>01</shipTruckGroupCode>
      <shipTruckDepartureTime>20.00.00</shipTruckDepartureTime>
      <shipTruckDockID>07</shipTruckDockID>
      <ldpFacilityAbbreviation />
      <shuttleAvailableIndicator>N</shuttleAvailableIndicator>
      <shuttleMessageText />
      <crossDockFacilityCode />
      <crossDockTruckCode />
      <crossDockID />
      <subsidizedFreightTruckID />
      <customerPurchaseOrderNumber>623559</customerPurchaseOrderNumber>
      <headerTypeCode>P</headerTypeCode>
      <orderTypeID>RG</orderTypeID>
      <deliveryTypeID>DS</deliveryTypeID>
      <deliveryMethodCode />
      <customerBarCode />
      <customerReferenceData>25HZK99</customerReferenceData>
      <customerReferenceText />
      <customerRouteData>ZNED UNTED</customerRouteData>
      <customerRouteText>ROUTE</customerRouteText>
      <endConsumerPurchaseOrderNumber />
      <endConsumerPurchaseOrderText />
      <endConsumerName>CHARLESTON TRANS. FACILITY</endConsumerName>
      <endConsumerAddress1>HOMEWOOD DT PROGRAM DEPT. 3</endConsumerAddress1>
      <endConsumerAddress2>17341 PALMER BLVD.</endConsumerAddress2>
      <endConsumerAddress3 />
      <endConsumerCity>HOMEWOOD</endConsumerCity>
      <endConsumerState>IL</endConsumerState>
      <endConsumerPostalCode>60430</endConsumerPostalCode>
      <endConsumerCountryCode />
      <fillFacilityNumber>025</fillFacilityNumber>
      <shpFacilityNumber>025</shpFacilityNumber>
      <homeFacilityAbbrCode>STL</homeFacilityAbbrCode>
      <homeFacilityNumber>015</homeFacilityNumber>
      <multiCartonIndicator>Y</multiCartonIndicator>
      <primaryCustomerIndicator>Y</primaryCustomerIndicator>
      <shipToCustomerNumber>954371001</shipToCustomerNumber>
      <customerCompanyID>01</customerCompanyID>
      <customerTruckID>U888</customerTruckID>
      <customerTruckDescription>UDS - ADDISON</customerTruckDescription>
      <customerTruckDockID>13</customerTruckDockID>
      <thirdPartyBillCarrier />
      <thirdPartyBillID />
      <thirdPartyBillType />
      <qualityCheckIndicator>N</qualityCheckIndicator>
      <warehouseLaydownID />
      <packListPosition>I</packListPosition>
      <preferredPackingType>CTN</preferredPackingType>
      <preferredPackingMaterial>PAPER</preferredPackingMaterial>
      <preferedPackingInstructions />
      <totalOrderCartonQty>6</totalOrderCartonQty>
      <convertAddressIndicator>N</convertAddressIndicator>
      <dealerInstructionIndicator>Y</dealerInstructionIndicator>
      <dealerinstructions1>CPO#: 623559</dealerinstructions1>
      <dealerinstructions2>ATTN: DANA GRIFFIN</dealerinstructions2>
      <dealerinstructions3>INFO: 612</dealerinstructions3>
      <dealerinstructions4>ROUTE: ZNED UNTED</dealerinstructions4>
      <dealerinstructions5 />
      <dealerinstructions6 />
      <shippingInstructionsIndicator>N</shippingInstructionsIndicator>
      <shippingInstructions1 />
      <shippingInstructions2 />
      <shippingInstructions3 />
      <shippingInstructions4 />
      <shippingInstructions5 />
      <shippingInstructions6 />
      <specialInstructionsIndicator>N</specialInstructionsIndicator>
      <specialInstructions1 />
      <specialInstructions2 />
      <customeContainerDesc />
    - <carton>
      <deliveryCartonID>253370905995</deliveryCartonID>
      <shipIndicator>Y</shipIndicator>
      <deliveryPalletID>X150</deliveryPalletID>
      <consolidatedDeliveryCartonID />
      <scanDateTime>2009-12-03T19:36:12.00</scanDateTime>
      <cartonWeight>52</cartonWeight>
      <dropShipFlag>1</dropShipFlag>
      <carrierTrackingNumber />
      <carrierZoneID>0</carrierZoneID>
      <codAmount />
      <customerPackageAmount />
      <declaredValue />
      <residentialDeliveryIndicator />
      <serviceTypeCode>00</serviceTypeCode>
      <ssccCode>006860244400829393</ssccCode>
    - <Item>
      <shipPrefix>UNV</shipPrefix>
      <shipStockNumber>21200</shipStockNumber>
      <itemDescription>PAPER XERO/DUP WE LTR 20#</itemDescription>
      <orderQuantity>1</orderQuantity>
      <originalShipQuantity>1</originalShipQuantity>
      <shipQuantity>1</shipQuantity>
      <inventoryUnitCode>CT</inventoryUnitCode>
      <inventoryWeightQuantity>52.000</inventoryWeightQuantity>
      <upcNumber>00000000000000</upcNumber>
      <upcRetailCode>087547212004</upcRetailCode>
      <hazmatIndicator>N</hazmatIndicator>
      <serialRequiredIndicator>N</serialRequiredIndicator>
      <dealerMemoPO>S</dealerMemoPO>
      <cartonLineNumber>1</cartonLineNumber>
      <orderLineNumber>11</orderLineNumber>
      <originalOrderPrefix>UNV</originalOrderPrefix>
      <originalOrderStockNumber>21200</originalOrderStockNumber>
      <reasonCode />
    - <Item_Serial>
      <serialNumber />
      </Item_Serial>
        </Item>
      </carton>
       </order>
      </Delivery>
      </Shipment>
    This is not the complete XML file as it exceeds the 15000 characters and then I cann't post here. So I have deleted much part of it.
    The hierarchy is as following: Shipment->Delivery->Order->Carton->Item.
    I have created a XSLT for it which is working fine.
    But when I execute my report program it gives CX_SY_XSLT_FORMAT_ERROR saying that
    Transformation error:  Non-canonical structure of element name XML_OUTPUT.

    Dear experts,
    My report program is as following:-
    *& Report  Z_ASNTRNS
    REPORT  Z_ASNTRNS.
    *& Report  Z_ASNTRNS
    TYPE-POOLS: abap, ixml.
    TABLES: ZASN_SHIPMENT,ZASN_DELIVERY,ZASN_ORDER,ZASN_CARTON,ZASN_ITEM.
    *CONSTANTS gs_file TYPE string VALUE 'C:Documents and SettingsC5134126DesktopRajesh_kandakatlaSampleASNFile.xml'.
    This is the structure for the data from the XML file
    TYPES: BEGIN OF ts_item,
          ZSHIPMENT LIKE ZASN_ITEM-ZSHIPMENT,
          VBELN LIKE ZASN_ITEM-VBELN,
          ORDER_NUMBER LIKE ZASN_ITEM-ORDER_NUMBER,
          CARTON_ID LIKE ZASN_ITEM-CARTON_ID,
           ITEM LIKE ZASN_ITEM-ITEM,
           CARTON_LINE_NUM LIKE ZASN_ITEM-CARTON_LINE_NUM,
           CARTON_LINE_NUMBER LIKE ZASN_ITEM-CARTON_LINE_NUM,
          AEDAT(8),
          AEZET(6),
           ITEM_DESCRIPTION LIKE ZASN_ITEM-ITEM_DESCRIPTION,
           ORD_QTY(16),
           ORIGINAL_SHIP(16),
           SHIP_QTY(16),
           UPC_NUMBER LIKE ZASN_ITEM-UPC_NUMBER,
           DEALER_MEMO_PO(5),
           ORDER_LINE_NUM LIKE ZASN_ITEM-ORDER_LINE_NUM,
          STATUS LIKE ZASN_ITEM-STATUS,
           END OF ts_item.
    TYPES: BEGIN OF ts_carton,
          ZSHIPMENT LIKE ZASN_CARTON-ZSHIPMENT,
          VBELN LIKE ZASN_CARTON-VBELN,
          ORDER_NUMBER LIKE ZASN_CARTON-ORDER_NUMBER,
           CARTON_ID LIKE ZASN_CARTON-CARTON_ID,
          AEDAT(8),
          AEZET(6),
           SHIP_INDICATOR LIKE ZASN_CARTON-SHIP_INDICATOR,
           TRACKING_NUMBER LIKE ZASN_CARTON-TRACKING_NUMBER,
           ZZCARTON_WGT(18),
           Item type ts_item,
           END OF ts_carton.
    TYPES: BEGIN OF ts_order,
          ZSHIPMENT LIKE ZASN_ORDER-ZSHIPMENT,
          VBELN LIKE ZASN_ORDER-VBELN,
           ORDER_NUMBER LIKE ZASN_ORDER-ORDER_NUMBER,
          AEDAT(8),
          AEZET(6),
           SUB_ORDER LIKE ZASN_ORDER-SUB_ORDER,
           ORDER_DATE(8),
           PRIMARY_ORDER LIKE ZASN_ORDER-PRIMARY_ORDER,
           CUSTOMER_PO LIKE ZASN_ORDER-CUSTOMER_PO,
           PRIMARY_ID LIKE ZASN_ORDER-PRIMARY_ID,
           SHIP_TO LIKE ZASN_ORDER-SHIP_TO,
          ANZPK(5),
           carton type ts_carton,
           END OF ts_order.
    TYPES: BEGIN OF ts_delivery,
          ZSHIPMENT LIKE ZASN_DELIVERY-ZSHIPMENT,
          VBELN LIKE ZASN_DELIVERY-VBELN,
          AEDAT(8) TYPE C,
          AEZET(6) TYPE C,
           PRIMARY_CUSTOMER LIKE ZASN_DELIVERY-PRIMARY_CUSTOMER,
           BILL_OF_LADING LIKE ZASN_DELIVERY-BILL_OF_LADING,
           CARTON_COUNT(5),
           TOTAL_WEIGHT(18),
           order type ts_order,
           END OF ts_delivery.
    TYPES: BEGIN OF ts_shipment,
           ZSHIPMENT LIKE ZASN_SHIPMENT-ZSHIPMENT,
           MANIFEST_DATE_TIME(25),
          AEDAT(8) TYPE C,
          AEZET(6) TYPE C,
          SDATE(8) TYPE C,
          STIME(6) TYPE C,
           SFACILITY_NUMBER LIKE ZASN_SHIPMENT-SFACILITY_NUMBER,
           ZZCARRIERCODE LIKE ZASN_SHIPMENT-ZZCARRIERCODE,
           Delivery type ts_delivery,
           END OF ts_shipment.
    TYPES: BEGIN OF ts_shipment1,
           ZSHIPMENT LIKE ZASN_SHIPMENT-ZSHIPMENT,
           MANIFEST_DATE_TIME(25),
           SFACILITY_NUMBER LIKE ZASN_SHIPMENT-SFACILITY_NUMBER,
           ZZCARRIERCODE LIKE ZASN_SHIPMENT-ZZCARRIERCODE,
           PRIMARY_CUSTOMER LIKE ZASN_DELIVERY-PRIMARY_CUSTOMER,
           BILL_OF_LADING LIKE ZASN_DELIVERY-BILL_OF_LADING,
           CARTON_COUNT(5),
           TOTAL_WEIGHT(18),
           ORDER_NUMBER LIKE ZASN_ORDER-ORDER_NUMBER,
           SUB_ORDER LIKE ZASN_ORDER-SUB_ORDER,
           ORDER_DATE(8),
           PRIMARY_ORDER LIKE ZASN_ORDER-PRIMARY_ORDER,
           CUSTOMER_PO LIKE ZASN_ORDER-CUSTOMER_PO,
           PRIMARY_ID LIKE ZASN_ORDER-PRIMARY_ID,
           SHIP_TO LIKE ZASN_ORDER-SHIP_TO,
           CARTON_ID LIKE ZASN_CARTON-CARTON_ID,
           SHIP_INDICATOR LIKE ZASN_CARTON-SHIP_INDICATOR,
           TRACKING_NUMBER LIKE ZASN_CARTON-TRACKING_NUMBER,
           ZZCARTON_WGT(18),
           ITEM LIKE ZASN_ITEM-ITEM,
           CARTON_LINE_NUM LIKE ZASN_ITEM-CARTON_LINE_NUM,
           CARTON_LINE_NUMBER LIKE ZASN_ITEM-CARTON_LINE_NUM,
           ITEM_DESCRIPTION LIKE ZASN_ITEM-ITEM_DESCRIPTION,
           ORD_QTY(16),
           ORIGINAL_SHIP(16),
           SHIP_QTY(16),
           UPC_NUMBER LIKE ZASN_ITEM-UPC_NUMBER,
           DEALER_MEMO_PO(5),
           ORDER_LINE_NUM LIKE ZASN_ITEM-ORDER_LINE_NUM,
           END OF ts_shipment1.
    TYPES: BEGIN OF t_xml_line,
                 data(256) TYPE x,
               END OF t_xml_line.
    *Typdefinition für Airplus
    *READ THE DOCUMENTATION "LASG_XML_INVOICE_BTM"!!!
    VARs beginning with "a_" are ATTRIBUTES
    DATA: l_ixml            TYPE REF TO if_ixml,
          l_streamfactory   TYPE REF TO if_ixml_stream_factory,
          l_parser          TYPE REF TO if_ixml_parser,
          l_istream         TYPE REF TO if_ixml_istream,
          l_ostream         TYPE REF TO if_ixml_ostream,
          l_document        TYPE REF TO if_ixml_document,
          l_node            TYPE REF TO if_ixml_node,
          l_xml TYPE REF TO cl_xml_document,
          l_xmldata         TYPE string.
    DATA: l_xml_table       TYPE TABLE OF t_xml_line,
             l_xml_line        TYPE t_xml_line,
             l_xml_table_size  TYPE i.
    DATA: l_filename        TYPE string.
    DATA: xml_out TYPE string ,
          size type i.
    DATA: l_xml_x1   TYPE xstring.
    DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce.
             l_itab     TYPE TABLE OF string.
    DATA: BEGIN OF l_itab occurs 0,
          data(256) type c,
          end of l_itab.
    TYPES : BEGIN OF TY_TEXT,
              data(255) type C,
            END OF TY_TEXT.
    DATA: F_XML TYPE STRING.
    DATA : LT_TEXT_OUT type table of TY_TEXT with header line.
    tables
    DATA: it_shipment    TYPE STANDARD TABLE OF ts_shipment,
          wa_shipment    TYPE  ts_shipment.
    *Errorvariables
    DATA: xslt_err   TYPE REF TO cx_xslt_exception,
          err_string TYPE string.
    PARAMETERS: pa_file TYPE localfile OBLIGATORY
    DEFAULT 'C:Documents and SettingsC5134126DesktopRajesh_kandakatlaSampleASNFile.xml'.
    START-OF-SELECTION.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    here we use the CALL TRANSFORMATION method which calls
    the XSLT program "z_asnfile"
    TRY.
        CALL TRANSFORMATION ('Z_ASNFILE')
          SOURCE xml LT_TEXT_OUT[]
          RESULT xml_output = it_shipment
    catch any error, very helpful if the XSLT isn't correct
        CATCH cx_xslt_exception INTO xslt_err.
        err_string = xslt_err->get_text( ).
        WRITE: / 'Transformation error: ', err_string.
        EXIT.
      ENDTRY." setting a breakpoint to watch the workarea
    by the internal table "it_airplus"
           break-point.
      LOOP AT it_shipment INTO wa_shipment.
      ENDLOOP.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
        l_filename = pa_file.
      upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Convert binary to text.
    CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
      EXPORTING
        INPUT_LENGTH          = 70000
                FIRST_LINE            = 0
                LAST_LINE             = 0
                APPEND_TO_TABLE       = ' '
                MIMETYPE              = ' '
        WRAP_LINES            = 'X'
              IMPORTING
                OUTPUT_LENGTH         =
      TABLES
        BINARY_TAB            = l_xml_table
        TEXT_TAB              = LT_TEXT_OUT
              EXCEPTIONS
                FAILED                = 1
                OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    "get_xml_table

  • String to XML using XSLT..

    Hey folks
    Am having a XML in a single string in ma request and wanna convert that into a XML. Tried that using XSLT but seems am missing out on some point...It works fine with Stylus but fails within PI 
    Following code am using :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.sdn.com/xslt">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
       <xsl:template match="/">
            <xsl:for-each select="//*:string">
             <xsl:value-of select="." disable-output-escaping="yes"/>
          </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    The name of the element in which i get the whole XML is  "string".
    My request string is something liek this :
    <xml version="1.0" encoding="UTF-8"?><ProductDefinition><RefNo>23232323</RefNo><Description>dfdfdfdfdf</Description></ProductDefinition>
    Now am trying to generate a XML using the XSL but its failing in PI...
    Kindly point out where am i going wrong?

    Thanks, but graphical mapping does not expose <![CDATAhttp:// ... ] to be removed. Surely this must be done with XSLT?+
    Don't worry about <![CDATA ... pass your whole string in source message like this : <![CDATAhttp://<?xml version=\"1.0\" encoding=\"UTF-8\"?><ProductDefinition><RefNo>12345</RefNo><Description>Test</Description></ProductDefinition>]>
    1st the graphical mapping where you use replace string will replace <?xml version=\"1.0\" encoding=\"UTF-8\"?>  and then the XSLT mapping would get a input like this : <![CDATAhttp://<ProductDefinition><RefNo>12345</RefNo><Description>Test</Description></ProductDefinition>]> which would eventually form your target structure...
    I tried it myself few days back so its a sure shot method ... just try it 
    Cheers!!!
    Soumen 

  • String to XML conversion using XSLT

    Hi all,
    I have a scenario when my source input XML is in the form of a string which needs to be transformed into an XML target fields.
    I am using XSLT mapping to do that and its working but unfortunately, input XML contain xml declaration <?xml version='1.0'?>. Because of which it fails.
    I need to remove this. Can any body please suggest how to do this?
    Any help will be appriciated.
    Regards
    -Kulwant

    Hi,
    Refer these links
    XI/PI: Convert Flat File to Deeply Nested XML Structures Using Only Graphical Mapping
    Regards,
    Surya

  • Use XSLT mapping for multiple payloads

    Lydia,
    Do you mean multiple mapping as
    <message1>
    Payload1
    </message1>
    <message2>
    Payload2
    </message2>
    If you are generating XSLT mapping using any tool then you have can take xsd from the messagemapping and just map it.
    in you  target structure message1, message2 should be there.
    Gaurav Jain
    Reward Points if answer is helpful

    Thank you for your response.  I tried several variations - including this one - but I can't seem to get the results to match your screen shot.  Also, I am not sure if the tag should be 'Content-Type' or content_type ....
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ns0="urn:sap-com:document:sap:rfc:functions" xmlns:ns="http://sap.com/xi/XI/Mail/30">
         <xsl:output method="xml" encoding="utf-8" indent="no" omit-xml-declaration="yes"/>
         <xsl:template match="/">
              <xsl:apply-templates select="ORDERS02"/>
         </xsl:template>
         <xsl:template match="ORDERS02">
              <ns:Mail>
                   <Subject>
                        <xsl:text>Purchase Order: </xsl:text>
                   </Subject>
                   <From>
                        <xsl:text>mail.com</xsl:text>
                   </From>
                   <To>
                        <xsl:text>mail.com</xsl:text>
                   </To>
                   <Content_Type>
                        <xsl:text>multipart/mixed; boundary="b1"</xsl:text>
                   </Content_Type>
                   <Content><xsl:text>--b12&#10;</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Type: text/plain; charset=us-ascii </xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Transfer-Encoding: 7bit </xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>My Order</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>--b1</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Type: text/plain; charset=us-ascii</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Transfer-Encoding: 7bit</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Disposition: attachment; filename="order.dc"</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="IDOC/E1EDK01/BELNR"/>
                        <xsl:text>A </xsl:text>
                        <xsl:text>ORD 238            </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="IDOC/E1EDK01/BELNR"/>
                        <xsl:text>B</xsl:text>
                        <xsl:text>The Wolf Organization        </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="IDOC/E1EDK01/BELNR"/>
                        <xsl:text>C</xsl:text>
                        <xsl:text>PO Box 2044                  </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>D</xsl:text>
                        <xsl:text>York, PA  17404-2044         </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>E</xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>F</xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>G</xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:apply-templates select="IDOC/E1EDP01"/>
                        <xsl:text> </xsl:text>
                   </Content>
                   <xsl:text>--b1--</xsl:text>
              </ns:Mail>
         </xsl:template>
         <xsl:template match="IDOC/E1EDP01">
              <xsl:text>Z</xsl:text>
              <xsl:text>                </xsl:text>
              <xsl:text>&#10;</xsl:text>
         </xsl:template>
    </xsl:stylesheet>

  • XML to ABAP Using XSLT

    Hello friends,
        I am trying a ABAP program (posted on SDN) to convert XML into ABAP (internal table) and not having any luck. Either it is my table/structure declaration or XSLT. Could any of you experts give me a hand with it please?
    Thanks in advance..but points on help!
    Here is my XML:
    And my ABAP program:
    REPORT  ZTESTXMLREAD.
    TYPE-POOLS: abap, ixml.
      class cl_ixml definition load.
    TYPES: BEGIN OF t_dc40,
             docnum(17) TYPE  C,
             status(2)  TYPE  C,
           END   OF t_dc40.
    TYPES: BEGIN OF t_emkt,
             spras(2)   TYPE  C,
             maktx(35)  TYPE  C,
           END   OF t_emkt.
    TYPES: BEGIN OF t_emrm,
             matnr(12)  TYPE  C,
             ersda(8)   TYPE  C,
             ernam(25)  TYPE  C,
             emktx      TYPE  t_emkt,
           END   OF t_emrm.
    TYPES: BEGIN OF t_mm,
             dc40   TYPE  t_dc40,
             emrm   TYPE  t_emrm,
           END   OF t_mm.
    DATA: l_ixml            TYPE REF TO if_ixml,
          l_streamfactory   TYPE REF TO if_ixml_stream_factory,
          l_istream         TYPE REF TO if_ixml_istream.
    DATA: l_filename        TYPE string.
    DATA: it_airplus    TYPE STANDARD TABLE OF t_mm,
          wa_airplus    TYPE t_mm.
    *Errorvariables
    DATA: xslt_err   TYPE REF TO cx_xslt_exception,
          err_string TYPE string.
    PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:Test.XML'.
    START-OF-SELECTION.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
      Creating input stream
        l_istream = l_streamfactory->create_istream_uri( 'file://c:Test.xml' ).
    here we use the CALL TRANSFORMATION method which calls
    TRY.
        CALL TRANSFORMATION ZTestXSLT
          SOURCE xml l_istream
          RESULT xml_output = it_airplus
    catch any error, very helpful if the XSLT isn't correct
        CATCH cx_xslt_exception INTO xslt_err.
        err_string = xslt_err->get_text( ).
        WRITE: / 'Transformation error: ', err_string.
        EXIT.
      ENDTRY.
    setting a breakpoint to watch the workarea
    by the internal table "it_airplus"
           break-point.
      LOOP AT it_airplus INTO wa_airplus.
      ENDLOOP.

    Thank you Durairaj, as a matter of fact my program is based on your post (one that you pointed me to). For whatever reason I'm not having luck figuring it out (may be just a bit of work pressure) could you please hlep me a bit more by pointing me to where in my program code/xslt I'm going wrong? I somehow feel that it could be my table structure or xslt.
    I would really appreciate it!
    Thanks again,
    erfan.

Maybe you are looking for

  • 4.6c to ECC 6.0 upgrade

    My client is looking to move from 4.6C to ECC 6.0. Now, it is using BAs as the legal entities instead of compay codes, its also using Internal Orders to capture all the revenue and cost centers for expenses as well as balance sheet items (changing th

  • Print/displays blank only in place of text (i.e. non printing font)

    I have a need in which we need to substitute current text with spaces for a specific line in the document. As this line of text has a unique font and is used in hundreds of documents, Is there any font which can be substituted in place of current fon

  • I got an Ipod shuffle because I have two cars with USB port for mp3. It doesn't work. Can it ever?

    I got an Ipod shuffle because I have two cars with USB port for mp3. It doesn't work. Can it ever?

  • How get data from business object to xml file

    Hi all, My new problem is ,, In my application, I have check list of selected business partners. In that , I want to save the checked oBusinessPartners complete information to an XML file(created dynamically), How to do? Thanks in advance shashi kira

  • Xcode with C error

    Hi, I'm making a simple application that requires a pointer to a struct to be passed from one file to another. This works fine in 32 Bit (i386) however, when I use it in 64 Bit (x86_64) it drops off 3 digits of the memory address. Eg. In the file whe