04-11-2018 10:50 AM
I have added 2 fields in EKPO table now i want update the same using bapi BAPI_PO_CREATE1 please guide me with bapi extension or a sample program will be of great help
04-11-2018 12:47 PM
So information i can give , I did it for Purchase indent, at me51n. Have a look on below code.
DATA : wa_te_meqitem TYPE bapi_te_mereqitem,
wa_te_meqitemx TYPE bapi_te_mereqitemx . " in this structure i was added the custom z fields. so, line level fields , Hope you know in me51 there is header.
wa_te_meqitem-preq_item = '10' "Line number i am passing.
wa_te_meqitem-zz1 = 'value1'.
wa_te_meqitem-zz2 = 'value2.
wa_te_meqitemx-preq_item = 'X'.
wa_te_meqitem-zz1 = 'X'.
wa_te_meqitem-zz2 = 'X.
wa_extensionin-structure = 'BAPI_TE_MEREQITEM'. "In this structure i was added the z fiedls.
wa_extensionin+30 = wa_te_meqitem.
APPEND wa_extensionin TO it_extensionin.
wa_extensionin-structure = 'BAPI_TE_MEREQITEMX'.
wa_extensionin+30 = wa_te_meqitemx.
APPEND wa_extensionin TO it_extensionin.
Passing to Bapi function module. hope You understood.
04-11-2018 1:07 PM
See the following SAP-KBA's on practices, FAQ and Unicode-Issues that might pop up :
A Sample is provided here (.doc) : link or in this SAP-Blog : link