Here is a sample program that shows code that I believe should wipe the deletion indicator on line 100 of this PO. The BAPI returns a success message but the indicator is not removed. Any insight would be appreciated. Thanks..Marc
REPORT ZDMDM_TEST.
DATA: it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
it_bapimepoitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE,
it_bapimepoitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
it_bapimepoitem-po_item = '00100'.
it_bapimepoitemx-po_item = '00100'.
it_bapimepoitem-DELETE_IND = ' '.
it_bapimepoitemx-DELETE_IND = 'X'.
APPEND it_bapimepoitem.
APPEND it_bapimepoitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '00091AAAAB'
TABLES
return = it_return
poitem = it_bapimepoitem
poitemx = it_bapimepoitemx.
LOOP AT it_return.
*
Ignore warnings and information messages
*
IF it_return-type = 'W' OR it_return-type = 'I'.
ELSE.
write it_return-message.
ENDIF.
ENDLOOP.
DATA: wait TYPE bapita-wait.
DATA: return2 TYPE bapiret2.
wait = ' '.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = wait
IMPORTING
return = return2.
WRITE: / return2-message.
REFRESH: it_bapimepoitem, it_bapimepoitemx.
CLEAR: it_bapimepoitem, it_bapimepoitemx.