Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Requisition Workflow

atharva21k
Explorer
0 Kudos

My requirement is when i create a PR via ME51N and save it my worflow should be triggered and a notification should be sent for Approval and simulatneously ME54N transaction should be called.

Development i have done till now :

We decided to create a new workflow instead of using the standard one (WS20000077).

I am also using an user-exit M06B0001 to call the workflow.

I have created a custom business object (subtype - BUS2105 ) in which i have created a method to fetch some details from a Z* table.

The agent ID is maintained in the Z* table.

Can someone help me with how can i use this agent id for the agent assignment in workflow ?

Also if there are other easy ways to carryout my requirement i am open to suggestion and also one point that release is also maintained in SPRO

6 REPLIES 6

Sandra_Rossi
Active Contributor
0 Kudos

You define an element in the workflow container, to contain the "agent ID" and you assign this element as agent of whatever workflow step.

atharva21k
Explorer
0 Kudos

i have the element created , can you show me with the help of screeshots if possible about assigning the agent id

atharva21k
Explorer
0 Kudos

sandra.rossi does the standard workflow WS20000077 releases the purchase requisition automatically ? if so how can i change it to manual release

ex : step 1 : PR is created

step 2 : A notification is send to a correct person

Step 3 : then that person will approve or refuse the PR release

Sandra_Rossi
Active Contributor
0 Kudos

I don't know WS20000077, I can't tell you if it can be customized. You should not change it, create your own workflow.

As you can find by yourself, there are lots of blog posts, answers, around here, which explain all that, with screenshots.

workflow container, to contain the agent ID and you assign this element as agent site:sap.com

Example: Dynamic agent assignment to determine recipients in Sap Workflow. | SAP Blogs

Rics
Explorer
0 Kudos

Hi Atharva,

Try implementing below steps.

1. Create an activity step in your workflow.

2. Assign a new task to your step.

3. Assign the object method details with your custom method from business object you've created as shown below.

4. Capture the details returned from this step into workflow container using binding.

Hope this helps to achieve your requirement..

Good Luck!

Regards,

Richa

0 Kudos

Thank you for the concerns but now the team has decided to change the appraoch and we are trying to use standard workflow for it.