Skip to Content
0
Former Member
May 31, 2011 at 04:52 PM

BAPI_REQUISITION_RELEASE_GEN

265 Views

Hello,

I have posted this question in the business workflow, but i believe you can also help me.

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.

CALL FUNCTION 'BAPI_REQUISITION_RELEASE_GEN'

EXPORTING

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, in SWEL i see two events:RELEASED and RELEASESTEPCREATED.

First of all, why is that?Why is RELEASESTEPCREATED triggered?

Second, i need this to start a workflow. The fact that BAPI_REQUISITION_RELEASE_GEN also triggers the event RELEASESTEPCREATED is giving me headaches.

Do you other functions to approve a purchase requisition? I need just the event RELEASED to be triggered.

Thank you very much,

Efren