09-15-2008 12:56 PM
Hello!
I need to update my field - called ZSERNR - in the table EKPO.
I found the FM BAPI_PO_CHANGE, but I do not know how it works.
I tried it so, but I just get the message (table RETURN), that no datas got changed.
I found some threads but I didn't understand them.
-
DATA: s_item TYPE bapimepoitem,
s_itemx TYPE bapimepoitemx,
i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
i_extension TYPE bapiparex OCCURS 0 WITH HEADER LINE,
s_bapi_te_mepoitem TYPE bapi_te_mepoitem,
s_bapi_te_mepoitemx TYPE bapi_te_mepoitemx.
s_bapi_te_mepoitemx-po_item = ls_data_new-ebelp.
s_bapi_te_mepoitemx-zsernr = 'X'.
s_bapi_te_mepoitem-po_item = ls_data_new-ebelp.
s_bapi_te_mepoitem-zsernr = '123123'.
i_extension-structure = 'BAPI_TE_MEPOITEM'.
i_extension-valuepart1 = s_bapi_te_mepoitem.
APPEND i_extension.
i_extension-structure = 'BAPI_TE_MEPOITEMX'.
i_extension-valuepart1 = s_bapi_te_mepoitemx.
APPEND i_extension.
s_item-po_item = ls_data_new-ebeln.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ls_data_new-ebeln
TABLES
return = i_return
extensionin = i_extension.
-
I hope somebody can help me.
Thx
09-16-2008 8:55 AM
Hi
After calling this BAPI 'BAPI_PO_CHANGE'
are you doing BAPI_TRANSACTION_COMMIT
Regards
MD
09-16-2008 8:55 AM
Hi
After calling this BAPI 'BAPI_PO_CHANGE'
are you doing BAPI_TRANSACTION_COMMIT
Regards
MD
09-16-2008 10:32 AM
Thank you for your fast answear
I didn't solved the problem till now, but I know that I can't use this FM in my BADI.
Because the table EKPO is locked at the time I am using the FM.
(BADI also writes into the table EKPO)