SAP MDG · WORKFLOWS
How can I enhance BRFplus decision tables in Rule-Based Workflow with an additional MDG field such as LABOR?
Enhance Rule-Based Workflow by implementing `USMD_SSW_RULE_CONTEXT_PREPARE`, passing the MDG value (for example `LABOR`) into the BRFplus rule context, adding a matching BRFplus data object, and then using that field as a condition in the User Agent Decision Table so the Change Request is routed to the correct processor.
Enhance Rule-Based Workflow by implementing `USMD_SSW_RULE_CONTEXT_PREPARE`, passing the MDG value (for example `LABOR`) into the BRFplus rule context, adding a matching BRFplus data object, and then using that field as a condition in the User Agent Decision Table so the Change Request is routed to the correct processor.
To route an MDG Change Request by a master-data field such as `LABOR`, first enhance the rule context with BAdI `USMD_SSW_RULE_CONTEXT_PREPARE`, then expose the same field in BRFplus and add it to the User Agent Decision Table. In the guide’s worked example, the laboratory value is used to determine the workflow processor/user.
Process flow
- Identify the MDG field required for routing.
- Create or reuse the Change Request Type.
- Define a Rule-Based Workflow service name.
- Implement BAdI `
USMD_SSW_RULE_CONTEXT_PREPARE`. - Use method `PREPARE_RULE_CONTEXT` to fill the BRFplus rule context.
- Create a BRFplus Element bound to DDIC `LABOR`.
- Add the data object to the ruleset function context.
- Add `LABOR` as a condition column in the User Agent Decision Table.
MDGIMGGeneral Settings -> Process Modelling -> Change Requests -> Create Change Request Type
Create or copy the Change Request Type used by the enhanced workflow.
MDGIMGGeneral Settings -> Process Modelling -> Workflow -> Rule-Based Workflow -> Define Service Names
Define the service name used for Rule-Based Workflow and later as the BAdI filter.
SE18Enhancement Spot `USMD_SSW_SERVICE_PROCESSOR` -> BAdI `USMD_SSW_RULE_CONTEXT_PREPARE`
Implement the rule-context enhancement BAdI and create the sample-based implementation.
Change Request Type -> BRF+ Application -> CR-Type Related Application -> Contained Objects
Open the BRFplus application for the CR type and maintain the context objects and decision tables.
Referenced tables
| Object | Purpose |
|---|---|
DT_SINGLE_VAL_MAT01 | Single-value decision table used in the rule-based workflow flow. |
DT_NON_USER_AGT_GRP_MAT01 | Non-user-agent-group decision table used in the rule-based workflow flow. |
DT_USER_AGT_GRP_MAT01 | User Agent decision table where `LABOR` is added as a condition column. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How can I add a material field to the MDG User Agent Decision Table?
- How do I route an MDG Change Request based on master-data values?
- How can BRFplus agent determination use additional MM fields?」「How do I determine a workflow processor from the LABOR field?」「What is the purpose of `
USMD_SSW_RULE_CONTEXT_PREPARE`
Possible questions
- What business problem does this How-To solve?
- Can MDG assign a processor based on Material Group or Laboratory?
- How can a CR be sent only to the expert responsible for a specific value?
- Which BAdI adds fields to BRFplus Rule-Based Workflow context?
- Where do I configure the Change Request Type?
- Which transaction opens MDG Customizing?
- How do I create the BRFplus data object for LABOR?
- How do I add LABOR to the User Agent Decision Table?