Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Update Z-Field in EKPO with BAPI_PO_CHANGE

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

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question