Code: Alles auswählen.
TYPES: BEGIN OF t_split,
customer(10) TYPE c,
material(10) TYPE c,
purchaseorder(10) TYPE c,
wunschlieferdatum(10) TYPE c,
menge(5) TYPE c,
werk(5) TYPE c,
END OF t_split.
DATA: lt_split TYPE TABLE OF t_split,
ls_split LIKE LINE OF lt_split.
MOVE 'TA' TO l_order_header_in-doc_type.
MOVE '3000' TO l_order_header_in-sales_org.
MOVE '00' TO l_order_header_in-division.
IF lt_split IS NOT INITIAL.
LOOP AT lt_split INTO ls_split.
...
...
MOVE ls_split-material TO l_ord_item_in-material.
MOVE ls_split-menge TO l_ord_item_in-target_qty.
MOVE ls_split-werk TO l_ord_item_in-plant.
...
...
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
order_header_in = l_order_header_in
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
salesdocument = l_salesdoc
TABLES
return = l_return
order_items_in = l_ord_item_in
* ORDER_ITEMS_INX =
order_partners = it_ord_partners
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
.
ENDLOOP.
ENDIF.