SAP MDG · WORKFLOWS

How do I implement MDG dynamic agent determination with USMD_SSW_DYNAMIC_AGENT_SELECT for rule-based workflow steps?

Implement the dynamic agent BAdI `USMD_SSW_DYNAMIC_AGENT_SELECT` in class `IF_USMD_SSW_DYNAMIC_AGT_SELECT~GET_DYNAMIC_AGENTS`, gate the logic by `iv_service_name`, read inactive CR data, determine the routing org unit or scenario, fill `ct_user_agent_group`, and apply four-eye or special routing such as activation-failure handling.

Implement the dynamic agent BAdI `USMD_SSW_DYNAMIC_AGENT_SELECT` in class `IF_USMD_SSW_DYNAMIC_AGT_SELECT~GET_DYNAMIC_AGENTS`, gate the logic by `iv_service_name`, read inactive CR data, determine the routing org unit or scenario, fill `ct_user_agent_group`, and apply four-eye or special routing such as activation-failure handling.

The MDG rule-based workflow calls the dynamic-agent BAdI at runtime when a decision-table transition carries a Dyn Agt Sel Service. Your implementation must inspect `iv_service_name`, read the change request’s inactive data, determine the correct approver set, and return them in `ct_user_agent_group` so the workflow can create the dialog work items.

Process flow

  1. Create the BAdI implementation in `SE19` for `USMD_SSW_DYNAMIC_AGENT_SELECT` with the correct model filter.
  2. Implement `IF_USMD_SSW_DYNAMIC_AGT_SELECT~GET_DYNAMIC_AGENTS` in the class.
  3. Gate the logic by `iv_service_name` so only owned services are processed.
  4. Read the CR header and inactive CR data from the MDG model.
  5. Determine the routing attribute such as company code, division, plant, grouping, or scenario.
  6. Select roles or users from a custom agent-determination table or other source.
  7. Populate `ct_user_agent_group` and, if needed, `ct_non_user_agent_group`.
  8. Apply four-eye filtering by removing the requestor and any disallowed previous processor entries after role expansion or user selection.
SE19

Enhancement Spot `USMD_SSW_DYNAMIC_AGENT_SELECT`

Create and activate the dynamic-agent BAdI implementation with the relevant MDG model filter.

Referenced tables

ObjectPurpose
USMD_SSW_DYNAMIC_AGENT_SELECTBAdI for dynamic agent selection in MDG rule-based workflow.
DT_SINGLE_VAL_<CR>Workflow transition table that can pass `DYNAMIC_AGT_SEL_SERVICE` to the BAdI.
DT_USER_AGT_GRP_<CR>Static user-agent fallback and step-type definition for dialog steps.
USMD_S_USER_AGENT_GROUPWorkflow agent group structure used in `ct_user_agent_group`.
USMD_S_USER_AGENTSingle user/role agent entry with `user_type` and `user_value`.
AGR_USERSStandard table used to expand business roles to valid users.
USMD120CCR header data used for request-related routing information.

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 BAdI into MDG rule-based workflow?
  • How do I determine approvers at runtime in MDG workflow?
  • How do I implement GET_DYNAMIC_AGENTS for an MDG change request?

Possible questions

  • Which BAdI is used for MDG dynamic agent selection?
  • What service name is passed from DT_SINGLE_VAL to the dynamic agent BAdI?
  • How do I exclude the requestor from MDG approvers?
  • How do I route an activation failure to the last processor in MDG?
  • What are the main configuration tables for MDG dynamic agents?

Keywords

MDGdynamic agentUSMD_SSW_DYNAMIC_AGENT_SELECTGET_DYNAMIC_AGENTSBRF+ workflowDT_SINGLE_VALDT_USER_AGT_GRPct_user_agent_groupiv_service_nameAGR_USERSSE19