Some time required to change Po status below program helps you to change the status of the program
DATA: xreturn like BAPIRET2 occurs 0 with header line,
xpoitem like BAPIMEPOITEM occurs 0 with header line,
xpoitemx like BAPIMEPOITEMX occurs 0 with header line.
xpoitem-po_item = p_ebelp. " set position here
xpoitem-no_more_gr = 'X'.
append xpoitem.
xpoitemx-po_item = p_ebelp. " set position here
xpoitemx-no_more_gr = 'X'.
append xpoitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln "set ebeln here
TABLES
return = xreturn
poitem = xpoitem
poitemx = xpoitemx.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING WAIT = 'X'.
endif.
Please support my work
Comments
Post a Comment