Hello,
I want to use ME_PO_CONFIRM for deleting confirmations in table EKES but it doesnt always work. (i don't know why sometimes it works and sometimes not).
Here is my code (it is executed only if there is at least one entry in EKES for the couple : ls_data-ebeln /ls_data-ebelp :
clear wt_etens.
clear ls_bapi_confdel.
clear ls_bapi_confxdel.
clear ls_bapi_itemdel.
SELECT ETENS
INTO TABLE wv_etens
FROM EKES
WHERE EBELN = ls_data-ebeln and EBELP = ls_data-ebelp.
loop at wt_etens INTO wl_etens.
ls_bapi_confdel-item_no = ls_data-ebelp.
ls_bapi_confdel-conf_ser = wl_etens.
ls_bapi_confdel-delete_ind = 'X'.
APPEND ls_bapi_confdel TO lt_bapi_confdel.
ls_bapi_confxdel-item_no = ls_data-ebelp.
ls_bapi_confxdel-conf_ser = wl_etens.
ls_bapi_confxdel-item_nox = 'X'.
ls_bapi_confxdel-conf_serx = 'X'.
ls_bapi_confxdel-delete_ind = 'X'.
APPEND ls_bapi_confxdel TO lt_bapi_confxdel.
endloop.
ls_bapi_itemdel-item_no = ls_data-ebelp.
APPEND ls_bapi_itemdel TO lt_bapi_itemdel.
CALL FUNCTION 'ME_PO_CONFIRM'
EXPORTING
document_no = ls_data-ebeln
item = lt_bapi_itemdel
confirmation = lt_bapi_confdel
confirmationx = lt_bapi_confxdel
IMPORTING
return = lt_bapi_return.
COMMIT WORK. (I already try : CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.)
And here is the error I get :
User GRI(me) already processing Purchase order 428 (the order i try to delete before use again ME_PO_CONFIRM for add a new confirmation for the same order).
I already implemented note 1960756.
Thanks for help.
Regards.
Guillaume ROSATI.