1 Introduction
We need add customer field in the EKPO table. When we call BAPI ‘BAPI_PO_CREATE1’ for it . of course that we have add the field in the ekpo table.
2 Implementation
We need add the field in the structure .
We put it in the EXTENSIONIN table and transfer it to table.
Code
DATA: lt_extensionin TYPE TABLE OF bapiparex WITH HEADER LINE,
ls_item_ext TYPE bapi_te_mepoitem,
ls_item_extx TYPE bapi_te_mepoitemx.
SELECT SINGLE *
INTO @DATA(ls_zsrm_plaf)
FROM zsrm_PLaF
WHERE plnum = @PW_DATA-BEDNR and werks = '1100'.
if sy-subrc = 0 .
ls_item_ext-po_item = 10.
ls_item_ext-zbs = 'X'.
lt_extensionin-structure = 'BAPI_TE_MEPOITEM'.
lt_extensionin-valuepart1 = ls_item_ext.
APPEND lt_extensionin .
clear:lt_extensionin.
ls_item_extx-po_item = 10.
ls_item_extx-zbs = 'X'.
lt_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
lt_extensionin-valuepart1 = ls_item_extx.
APPEND lt_extensionin.
clear:lt_extensionin.
3 Summary
You only keep careful in the anytime .