cancel
Showing results for 
Search instead for 
Did you mean: 

Event Final Release of a PR triggers PR Revision

Dario
Explorer
0 Kudos

Hello

I was searching thru the WF forum but I could not get the answer to my scenario.

Having a three level release procedure for the purchase requisitions, I can deliver the WI to the suitable approver, using a copy of the standard WS20000077 .

However, my requirement is once the third (last) approval takes place, a WI is sent to a purchasing clerk, so he/she can make some general revision of the PR and create the RFQ.

I was using the event RELEASED in BUS2105 but this is triggering three times the same WI asking for PR Revision. I should be able to detect the final release, thru the release code (the final code is always the same) or status.

I can see that there is a task TS20000162 that uses a Method INFORELEASEEFFECTED for BUS2105, but I am not sure how can I use this in my workflow.

I have tried also using a Condition in the event RELEASED when the Release Code is the Third Level, But I could not find a way of getting this value in the condition (it is always empty).

Thanks in advance.

Darío

Accepted Solutions (1)

Accepted Solutions (1)

ronen_weisz
Active Contributor
0 Kudos

Create a new attribute the release status of the purchase requisition (extend BUS2105 see Extending Object Types: Inheritance and Delegation - SAP Business Workflow (BC-BMT-WFM) - SAP Librar...) this should even be a database type attribute since there is a release status field in table EBAN, simply read the status in the attribute and set your condition by it.

Dario
Explorer
0 Kudos

Thanks Ronen, but my guess is that issue (n- level release of documents) must be a very common case so it can be considered in the standard SAP o combining some basic existing logic.

ronen_weisz
Active Contributor
0 Kudos

There are two guesses here, first one that the issue is very common, which I completely agree with. the second guess, that it's considered in the standard SAP, I would have to say is a bit less likely, since WS20000077 sends approval for every release level and the release code does not have any effect there (it doesn't even state which release code was set in TS20000162).

Even if the release code is transferred by the RELEASED event I would not recommend setting the last release code as a hard-coded parameter.   

SandySingh
Active Contributor
0 Kudos

Hello Dario,

So your requirement is to identify if the release step is the last step and if so send a workitem to an agent.

In your custom workflow, you can create a background step to evaluate if the current release step is the last step. You can query table T16FC or use FM ME_REL_INFO. Refer to exporting table " rel_final".

Create a Flag field in the WF container "NOTIFY_CLERK" .Once you identify that this is final step, you can set the flag and then use "CONDITION" step in the workflow and send the workitem for review to purchasing clerk.

Regards

Sandy

Answers (3)

Answers (3)

Dario
Explorer
0 Kudos

Solution:
I add a step calling the Method GETRELEASEINFO of BUS2105.

In a condition step I Check the REL_IND value = "2"

Branch to the edition of Purchase Requisition in case of True.
The only issue is that returning structure in Method is a table so I had to add an additional step (Container Step) to get the first (and only) record of the structure, so I can make the condition evaluation.

Thanks everyone !

former_member185167
Active Contributor
0 Kudos

Thanks for the update. Please mark the Helpful and Correct answers to close the thread.

Former Member
0 Kudos

Are you using event RELEASESTEPCREATED or RELEASED ? In any case the current release code is available in event container.

In my case I used event RELEASESTEPCREATED as given in the standard template.

As per standard process WF will trigger and create new WI based on number of release level for the requisition.

And what if you put a activity step (for determining the last release code & comparing with evt container release code ) & then a condition step before sending the additional WI to the clerk for revision after task TS20000162. Will that not help?

BR

Ansumesh

Dario
Explorer
0 Kudos

I am using RELEASED but this event is triggered every time a release takes place, no matter if this is the final step.

I think that if i can get the release status of the PR "2" in the container, I can use directly the condition in the start event and no additional steps are required. There is a BAPI: BAPI_REQUISITION_GETRELINFO, where I can get the REL_IND field from.

Not yet implemented.

Regards

SandySingh
Active Contributor
0 Kudos

Hi Dario,

In my last post, I suggested to use table T16FC or Function module ME_REL_INFO to get the release information. Have you tried this option? Any luck


In your custom workflow, you can create a background step to evaluate if the current release step is the last step. You can query table T16FC or use FM ME_REL_INFO. Refer to exporting table " rel_final".

Create a Flag field in the WF container "NOTIFY_CLERK" .Once you identify that this is final step, you can set the flag and then use "CONDITION" step in the workflow and send the workitem for review to purchasing clerk.

Regards

Sandy

anjan_paul
Active Contributor
0 Kudos

Hi,

   As suggested,  you can add one condition step  follwoed by Mail step before task TS20000162 in Release Purchase Requisiton branch. In  condition  step  you check the status  of release

Dario
Explorer
0 Kudos

Thanks for the suggestions ! I will try and let you know. Anyway I will be struggling to get this "final" release event from standard  SAP !