2014 Feb 17 3:05 PM
Dear Experts,
We are having requirement for MASS delete of PO open items while maintaining version history.
Could you please suggest and BAPI or ant other FM if there.
Thank you so much in anticipation.
Regards,
Arpit Varma.
Dear Experts,
We are having requirement for MASS delete of PO open items while maintaining version history.
Could you please suggest and BAPI or ant other FM if there.
Thank you so much in anticipation.
Regards,
Arpit Varma.
2014 Feb 17 3:33 PM
2014 Feb 17 3:55 PM
Hello Arpit,
Use the below code
itab_gt_poitem-po_item = i_handling-ebelp.
itab_gt_poitem-DELETE_IND = 'X'.
append itab_gt_poitem.
itab_gt_poitemx-po_item = i_handling-ebelp.
itab_gt_poitemx-po_itemx = 'X'.
itab_gt_poitem-DELETE_IND = 'X'. "deletion indicator
append itab_gt_poitemx.
call function 'BAPI_PO_CHANGE'
exporting
purchaseorder = i_handling-ebeln
tables
return = t_e_return
poitem = itab_gt_poitem
poitemx = itab_gt_poitemx.
commit work and wait.
Regards,
Thanga
2014 Feb 18 10:10 AM
We actually need version history as well, could you please suggest if the above BAPI will provide Version history and how?
Thank You/
Regards,
Arpit
2014 Feb 18 12:05 PM
Hello Arpit,
yes it provides the Version history as well. It can be found in the table "ALLVERSIONS".
Refer to the SS below.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |