Hi, I just program for delete all selected PO, I just call:
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = i_output-ebeln
poheader = i_bapi_poheader
poheaderx = i_bapi_poheaderx
testrun = pa_test
TABLES
poitem = i_bapi_poitem
poitemx = i_bapi_poitemx
poschedule = i_bapi_schedule
poschedulex = i_bapi_schedulx
poaccount = i_bapi_account
poaccountx = i_bapi_accountx
return = i_bapireturn.
to put delete mark in header (EKKO) and items(EKPO) and remove schedule (EKET) and account assign (EKKN) records.
<b>The current PO (number is i_output-ebeln), i did populate i_bapi_poheader
and i_bapi_poheaderx with delete indicator 'L', all others are good, but there is NO 'L' marked in EKKO-LOEKZ field.</b>
I think the EKKO-LOEKZ should be used for PO delete status.
Thanks in Advance