Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with BAPI_PO_CHANGE

Former Member
0 Likes
669

Hi All,

I am using BAPI_PO_CHANGE to delete serial numbers assigned to PO line item.

I have set delete_ind = X in serialnumber table and also delete_ind = X in serialnumberX table.

Also, BAPI_TRANSACTION_COMMIT has been called after BAPI_PO_CHANGE.

But, Serial number assignment is not getting deleted.

What additional steps are required ?

Regards,

Ashish

Hi All,

I am using BAPI_PO_CHANGE to delete serial numbers assigned to PO line item.

I have set delete_ind = X in serialnumber table and also delete_ind = X in serialnumberX table.

Also, BAPI_TRANSACTION_COMMIT has been called after BAPI_PO_CHANGE.

But, Serial number assignment is not getting deleted.

What additional steps are required ?

Regards,

Ashish

3 REPLIES 3
Read only

Former Member
0 Likes
624

Hi,

Can you post the code you are using to populate the item and itemx tables to pass to BAPI_PO_CHANGE?

Also check the status in the return table of the BAPI_PO_CHANGE if its a success or it contains any error.

Regards,

Vik

Read only

Former Member
0 Likes
624

Hi,

Check manually whether serial numbers can be deleted or not.

Otherwise you need to check whether you passing serial number in below tables correctly or not.

POACCOUNT

POACCOUNTPROFITSEGMENT

POACCOUNTX

Thanks.

Read only

Former Member
0 Likes
624

check the following link

https://forums.sdn.sap.com/post!reply.jspa?messageID=7924872

or

example:

form move_to_bapi.

t_bapi_poheader-po_number = t_poheader-po.

CLEAR t_bapi_poheaderx.

PERFORM fill_check_structure USING c_bapimepoheaderx

c_t_bapi_poheader

c_t_bapi_poheaderx

c_x.

refresh : t_bapi_poitem,t_bapi_poitemx.

loop at t_poitem where po = t_poheader-po.

clear t_bapi_poitem.

t_bapi_poitem-po_item = t_poitem-item.

t_bapi_poitem-delete_ind = 'X'.

CLEAR t_bapi_poitemx.

PERFORM fill_check_structure USING c_bapimepoitem

c_t_bapi_poitem

c_t_bapi_poitemx

c_x.

t_bapi_poitemx-po_item = t_poitem-item.

t_bapi_poitemx-po_itemx = c_x.

APPEND t_bapi_poitem.

APPEND t_bapi_poitemx.

clear t_bapi_poitem.

clear t_bapi_poitemx.

endloop.

endform.