Skip to Content

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

How to pass tables and second structure to result with call transformation

I have the following xml template

<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml">
<asx:values>

      <ORDER_HEADER_IN>
        <DOC_TYPE>TA</DOC_TYPE>
        <SALES_ORG>6300</SALES_ORG>
        <DISTR_CHAN>00</DISTR_CHAN>
        <DIVISION>00</DIVISION>
        <REQ_DATE_H>2008-08-19</REQ_DATE_H>
        <PURCH_NO_C>12345</PURCH_NO_C>
      </ORDER_HEADER_IN>
 
      <ORDER_CONDITIONS_IN>
          <ITM_NUMBER>0010</ITM_NUMBER>
          <COND_TYPE>PR00</COND_TYPE>
          <COND_VALUE>250</COND_VALUE>
      </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>

</asx:values>
</asx:abap>

and declared the following variables

  DATA:
    HD1   LIKE BAPISDHD1,
    ITM   LIKE BAPISDITM  OCCURS 0 WITH HEADER LINE,
    TEXT  LIKE BAPISDTEXT OCCURS 0 WITH HEADER LINE,
    SCHDL LIKE BAPISCHDL  OCCURS 0 WITH HEADER LINE,
    COND  LIKE BAPICOND,
    PARNR LIKE BAPIPARNR  OCCURS 0 WITH HEADER LINE,
    RET2  LIKE BAPIRET2   OCCURS 0 WITH HEADER LINE,
    H_NBR LIKE ITM-ITM_NUMBER.

when I call

call transformation ('ID')
source XML it_xml_import
result ORDER_HEADER_IN = HD1 ORDER_CONDITIONS_IN = COND ITEM = ITM.
 

HD1 is filled correctly and COND also but with conditions I should have the possibilty of more records. but when I declare it like

COND LIKE BAPICOND OCCURS 0 WITH HEADER LINE,

no values are passed from order_conditions_in to COND ??

any ideas ??

kind regards

arthur de smidt

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