Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

example for SMUM_XML_PARSE or other option to import xml to itab ?

I'm looking for a function to import an xml I have found a lot of threads regarding this but it's very hard to test certain function I found

like SMUM_XML_PARSE , I really can't figure out what input I have to give to this function and I can't find a proper example

further on TEXT_CONVERT_XML_TO_SAP can't be tested from se37 but searching for a good and understable example also leads to jumping through a lot of topics with no clear example

I want to generate salesorders from an xml with the bapi BAPI_SALESORDER_CREATEFROMDAT2

so I have the xml schem for this bapi and only filled the appropiate fields for testdata.

<?xml version="1.0"?>

      <ORDER_HEADER_IN>
        <DOC_TYPE>TA</DOC_TYPE>
        <SALES_ORG>6300</SALES_ORG>
        <DISTR_CHAN>00</DISTR_CHAN>
        <DIVISION>00</DIVISION>
        <REQ_DATE_H>18-09-2008</REQ_DATE_H>
        <PURCH_NO_C>12345</PURCH_NO_C>
      </ORDER_HEADER_IN>
 
      <ORDER_CONDITIONS_IN>
        <item>
          <ITM_NUMBER>0010</ITM_NUMBER>
          <COND_TYPE>PR00</COND_TYPE>
          <COND_VALUE>250</COND_VALUE>
        </item>
      </ORDER_CONDITIONS_IN>
      <ORDER_ITEMS_IN>
        <item>
          <ITM_NUMBER>000010</ITM_NUMBER>
          <MATERIAL>87100-A9</MATERIAL>
          <TARGET_QTY>1</TARGET_QTY>
          <ORDERID>6405210</ORDERID>
        </item>
      </ORDER_ITEMS_IN>


      <ORDER_PARTNERS>
        <item>
          <PARTN_ROLE>AG</PARTN_ROLE>
          <PARTN_NUMB>1400</PARTN_NUMB>
        </item>
      </ORDER_PARTNERS>
  
      <ORDER_TEXT>
        <item>
          <DOC_NUMBER></DOC_NUMBER>
          <ITM_NUMBER>000010</ITM_NUMBER>
          <TEXT_ID>0001</TEXT_ID>
          <LANGU>N</LANGU>
          <LANGU_ISO></LANGU_ISO>
          <FORMAT_COL>*</FORMAT_COL>
          <TEXT_LINE>TEKST EN ZO</TEXT_LINE>
          <FUNCTION>009</FUNCTION>
        </item>
      </ORDER_TEXT>

Is there an easy way to read this xmldata into itabs ??

kind regards

arthur de smidt

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question