SAP MDG · WORKFLOWS

How do I implement MDG dynamic agent determination in USMD_SSW_DYNAMIC_AGENT_SELECT for a rule-based workflow step?

Implement the BAdI `USMD_SSW_DYNAMIC_AGENT_SELECT`, gate on `iv_service_name`, and return the intended users or roles in `ct_user_agent_group`. In the workflow decision tables, set `Dyn Agt Sel Service` in `DT_SINGLE_VAL_<CR>` for the dialog transition and keep the `DT_USER_AGT_GRP_<CR>` row for step type and reject fallback.

Implement the BAdI `USMD_SSW_DYNAMIC_AGENT_SELECT`, gate on `iv_service_name`, and return the intended users or roles in `ct_user_agent_group`. In the workflow decision tables, set `Dyn Agt Sel Service` in `DT_SINGLE_VAL_<CR>` for the dialog transition and keep the `DT_USER_AGT_GRP_<CR>` row for step type and reject fallback.

`USMD_SSW_DYNAMIC_AGENT_SELECT` is the MDG BAdI used by the rule-based workflow when a step needs runtime agent determination. The workflow passes the service name from `DT_SINGLE_VAL_<CR>` into `GET_DYNAMIC_AGENTS`, and your implementation returns the agents in `ct_user_agent_group` for the next dialog step.

Process flow

  1. Maintain the dialog transition in `DT_SINGLE_VAL_<CR>` and set `Dyn Agt Sel Service` to your service name.
  2. Keep the corresponding alias row in `DT_USER_AGT_GRP_<CR>` for the step type and `REJ → SU/INIT` fallback.
  3. Implement `GET_DYNAMIC_AGENTS` in the BAdI class and gate on `iv_service_name`.
  4. Read CR header and inactive entity data to derive the routing keys.
  5. Select the responsible roles/users from the custom agent table and, if needed, expand roles via `AGR_USERS`.
  6. Exclude the requestor and any prior processor to enforce four-eye routing.
  7. Populate `ct_user_agent_group`, then test the CR to confirm only the intended users receive the work item.
SE19

BAdI `USMD_SSW_DYNAMIC_AGENT_SELECT`

Register and activate the implementation class for the relevant MDG model/filter.

SE24

Class implementation of `IF_USMD_SSW_DYNAMIC_AGT_SELECT`

Implement `GET_DYNAMIC_AGENTS` with service-name gating and agent construction logic.

Referenced tables

ObjectPurpose
ZXX_C_AGENTCustom agent-determination table keyed by CR type, step, and org unit to store role assignments.
AGR_USERSStandard role-to-user mapping used when expanding roles to user IDs for four-eye filtering.

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • How do I wire a dynamic agent service into an MDG BRF+ workflow step?
  • How do I return agents from GET_DYNAMIC_AGENTS in MDG?
  • How do I configure DT_SINGLE_VAL and DT_USER_AGT_GRP for dynamic workflow agents?

Possible questions

  • How do I implement MDG dynamic agent determination in USMD_SSW_DYNAMIC_AGENT_SELECT?
  • Which BRF+ decision table columns control dynamic agent selection in MDG?
  • What are the steps to route an MDG CR step to runtime-selected users?
  • How do I exclude the requestor in MDG dynamic agent determination?
  • How do I connect a Dyn Agt Sel Service to a workflow dialog step?

Keywords

USMD_SSW_DYNAMIC_AGENT_SELECTIF_USMD_SSW_DYNAMIC_AGT_SELECTGET_DYNAMIC_AGENTSDT_SINGLE_VALDT_USER_AGT_GRPDYNAMIC_AGT_SEL_SERVICEct_user_agent_groupfour-eye principleAGR_USERSWS60800086MDG workflow