Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_REQUISITION_RELEASE_GEN - approval purchase requisition


This question if for the ones who used BAPI_REQUISITION_RELEASE_GEN function module, in workflows.

I have defined in spro, in the release strategy for purchase requisition, two strategies. If the overall value of a purchase requisition is under 20 then the order is to be approved by one person(release code L1). If the value is over 20, the purchase will be approved by person 1 and after by person 2(release code L2).

I made an abap program with the following code. In this case purchase requisition with number 0010000444 has a value under 20.



number = '0010000444'

rel_code = 'L1'.

After i run this code, and look in the SWEL transaction i see the only event that started is Released.

But if i run the code for a purchase requisition with the value over 20(2 approvers), in SWEL, i see two events:RELEASED and RELEASESTEPCREATED.

I am asking you this, because i want to create a workflow for the release of a purchase requisition.

The logic is: create requisition in me51n, trigger release event which triggers the workflow. In the workflow, i send an email to a user which contains a link to a webdynpro. In the webdynpro i have the button approve which calls BAPI_REQUISITION_RELEASE_GEN(i do not know what other function to call for the release of a pr).

After the user has approved(clicked on the button), if the purchase requisition contains a value under 20, the event RELEASED is triggered. I have another workflow which has as a trigerring event RELEASED. This workflow sends email to another user with notification. Everything goes fine in this case.

But if the value is over 20, the events RELEASESTEPCREATED and RELEASED are triggered. The call of the function BAPI_REQUISITION_RELEASE_GEN(the click on the button), triggers also the RELEASESTEPCREATED. This triggers also my first workflow which sends again a message that a purchase requisition was created. And of course, i do not want that.

Maybe i can connect the two workflows, so the call of the function does not trigger again the event RELEASESTEPCREATED.Or maybe you have another solution.

Thank you very much,


Not what you were looking for? View more on this topic or Ask a question