SAP Standard do not unrelease all release code after we reject any Purchase requisition. but the solutions is you can enhance using BAdI ME_PROCESS_REQ_CUST and POST Method, so after we rejected particular PR then save the data changed to run your enhancement code.

First you need to get all data item to check whether the Purchase requisition rejected or not, you can see the status rejected in field EBAN-BANPR i.e 8 for Rejected.

Get all of release codes that have been released using ABAP code below.

After you get those release codes, then use BAPI_REQUISITION_RESET_REL_GEN function module to unrelease those release code that have been released.


Full Source code :





Incoming search terms: