Skip to Content
0

SAP MDG-M Dynamic agent determination with different new steps.

Sep 27, 2017 at 06:08 AM

243

avatar image
Former Member

Hi Experts,

SAP MDG 8.0, Rulebased Parallel workflow with the help of Dynamic agent determination BADI.

Issue:

Dynamically create forks in parallel based on number of plants maintained on UI and determine agents dynamically. Now the requirement is next step to that fork can not be same.

If current step = 01 and action is Approve then it should create forks based on number of plants maintained. Say there are 3 plants are added then 3 forks will be created however new step to each fork can be different depending on the value of procurement type for each plant.

Example:

Current step 01 - Action = 03 (Approver)

Dummy step 65 (Used for dynamic agent determination)

In dynamic agent, based on the plant and procurement type we are adding more then 1 agents in CT_USER_AGENT_GROUP table. However we are able to create a fork and merge them in parallel badi but we are unable to give different step and status to individual fork.

Request to reply on priority with guidance on this.


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Loga Nathan Duraisamy Nov 03, 2017 at 01:16 PM
0

Hi Vikas,

Each change request will utimatly have only one staus as per the MDG design but for user convenient you need to do some trick to dispaly different status.Use different step number range for each different parallel steps . In ct_user_agent_group , create entries of step number bsaed on range. Create a z table with change request number,step number ,plant so on. whenever you systematically creating a entries in ct_user_agent_group , create entry also in z table. now you have all required details stored in your z table. Go to change request header feeder class and create custom enhancement. Using current workitem , read parent workitem and its step number. Read your z table for the corresponding entry and populate cr status just for dispaly or create your own custom field to store your custom status in cr header.

Using this approach ,you can also apply different field properties for different parallel steps.

Thanks and Regards,

Logan.D

Share
10 |10000 characters needed characters left characters exceeded
Loga Nathan Duraisamy Sep 28, 2017 at 10:13 AM
0

Hi vikas,

When different workitems created in parallel , Ideally all should have different step number assigned but same cant be possible. I hope you are creating parallel workflows using dynamic agent selection badi where you add various values in table ct_user_agent_groub based on plant and procurement type.

Thanks and Regards,

Logan.D

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Logan,

Yes Indeed, that's what we are looking. Parallel forks should have a different steps based on procurement type.

Yes, we are creating parallel workflows using dynamic agent selection badi and assigning multiple users in ct_user_agent_group based on plant and procurement type. However based on the parameters of dynamic agent badi, we are not able to assign CV_NEXT_STEP and CV_NEW_CR_STATUS for the multiple users assigned in ct_user_agent_group.

For example:

2 plants are added: 1-> XX01 and Procurement type = 'E' and 2-> YY01 and procurement type = 'F' and now we have assigned 'user1' for XX01/E and user2 for 'YY01/F' in ct_user_agent_group using dynamic selection badi in dummy step "65". Now we need to set new step (say 21 for user1) and new status (say 'ZS' for user1)' and new step (say 22 for user2) and new status (say ZT for user2).

However, CV_NEXT_STEP and CV_NEW_CR_STATUS can hold a single value, we are not able to assign multiple values here and hence it over rights the value of user1 with user2.

Please guide me to do it in right way.

Thanks and regards,
Vikas Patel

0
avatar image
Former Member
Oct 05, 2017 at 12:47 PM
0

If you mean change request status when you say 'Status'. CR data model allows only one status per change request

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Santosh,

I am talking about CR status in parallel workflow. Please find my earlier reply to Logan with requirement and let me know if my question and requirement is understandable.

Request to guide on this :)

Thanks and regards,
Vikas Patel

0