Code: Alles auswählen.
METHOD po_get_components.
et_comp = VALUE bapimepocomponent_tp(
( po_item = is_poitem-po_item
sched_line = '0001'
item_no = '0010'
material = is_poitem-material
entry_quantity = is_poitem-quantity
entry_uom = is_poitem-po_unit
entry_uom_iso = is_poitem-po_unit_iso
plant = is_poitem-plant ) ).
et_compx = VALUE bapimepocomponentx_tp( (
po_item = is_poitem-po_item
sched_line = '0001'
item_no = '0010'
po_itemx = abap_true
sched_linex = abap_true
item_nox = abap_true
material = abap_true
entry_quantity = abap_true
entry_uom = abap_true
entry_uom_iso = abap_true
plant = abap_true ) ).
ENDMETHOD.
Code: Alles auswählen.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = ls_poheader
poheaderx = ls_poheaderx
IMPORTING
exppurchaseorder = lv_ebeln
TABLES
return = lt_return
poitem = lt_poitem
poitemx = lt_poitemx
poaccount = lt_poaccount
poaccountx = lt_poaccountx
pocomponents = lt_comp
pocomponentsx = lt_compx
extensionin = lt_extensionin.