2009 Jul 27 1:22 PM
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
2009 Jul 27 1:28 PM
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
2009 Jul 27 1:35 PM
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.
2009 Jul 28 6:45 AM
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.