SAP MDG · COMMUNITY

How can I enhance SAP MDG Rule-Based Workflow so BRFplus can use additional fields from the MDG data model?

Use BAdI USMD_SSW_RULE_CONTEXT_PREPARE to read the required Change Request value from the MDG data model, place it into the BRFplus rule context, add the corresponding BRFplus data object to the function context, and then use it as a condition column in the User Agent Decision Table.

Use BAdI USMD_SSW_RULE_CONTEXT_PREPARE to read the required Change Request value from the MDG data model, place it into the BRFplus rule context, add the corresponding BRFplus data object to the function context, and then use it as a condition column in the User Agent Decision Table.

To enhance Rule-Based Workflow with additional MDG data-model fields, first identify the field needed for routing, then implement BAdI USMD_SSW_RULE_CONTEXT_PREPARE and its method PREPARE_RULE_CONTEXT to pass the Change Request value into the BRFplus rule context. After that, add a matching BRFplus data object to the CR-Type Related Application, expose it in the Trigger Function, and use it as a condition column in the User Agent Decision Table.

Process flow

  1. 1. Execute MDGIMG.
  2. 2. Go to General Settings -> Process Modelling -> Change Requests -> Create Change Request Type and create or copy the required CR type.
  3. 3. In MDGIMG, go to General Settings -> Process Modelling -> Workflow -> Rule-Based Workflow -> Define Service Names and create the service name.
  4. 4. In SE18, display enhancement spot USMD_SSW_SERVICE_PROCESSOR and locate BAdI USMD_SSW_RULE_CONTEXT_PREPARE.
  5. 5. Create a BAdI implementation and copy the delivered sample implementation MDG_BS_MAT_BRF_CONTEXT_LABOR if it matches your scenario.
  6. 6. In the implementing class, use method PREPARE_RULE_CONTEXT to read the Change Request data and fill the BRFplus rule context.
  7. 7. In USMD_SSW_RULE, open the CR-Type Related Application and create a BRFplus Element bound to the required DDIC field such as LABOR.
  8. 8. Add that data object to Function to Call Ruleset using Add Existing Data Object so it is available to the ruleset and decision tables.
MDGIMG

General Settings -> Process Modelling -> Change Requests -> Create Change Request Type

Create or copy the Change Request Type used by the enhanced workflow.

Structure
MDGIMG
Master Data Governance
Classic Mode in SAP MDG
Central Governance
Process Modeling
Change Requests
Create Change Request Type
MDGIMG

General Settings -> Process Modelling -> Workflow -> Rule-Based Workflow -> Define Service Names

Define the Rule-Based Workflow service name used later as the BAdI filter and in CR-Type related workflow configuration.

Structure
MDGIMG
Master Data Governance
Classic Mode in SAP MDG
Central Governance
Process Modeling
Workflow
Rule-Based Workflow
Define Service Names for Rule-Based Workflow
SE18

Enhancement Spot -> USMD_SSW_SERVICE_PROCESSOR -> BAdI definition USMD_SSW_RULE_CONTEXT_PREPARE

Display the BAdI definition and create the implementation for rule-context enhancement.

USMD_SSW_RULE

Type of Change Request -> BRF+ Application -> CR-Type Related Application

Open the BRFplus application and maintain the rule context and decision tables for the Change Request Type.

Referenced tables

ObjectPurpose
DT_SINGLE_VAL_MAT01One of the three decision tables exported in the guide before copying to the new CR type.
DT_NON_USER_AGT_GRP_MAT01One of the three decision tables exported in the guide before copying to the new CR type.
DT_USER_AGT_GRP_MAT01The User Agent Decision Table that is enhanced with the additional condition column such as LABOR.

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?

Possible questions

  • Which BAdI adds fields to BRFplus Rule-Based Workflow context?
  • What is the purpose of USMD_SSW_RULE_CONTEXT_PREPARE?
  • How do I determine a workflow processor from the LABOR field?
  • How do I add a master-data field to the User Agent Decision Table?
  • How do I route an MDG Change Request based on material values?

Keywords

SAP MDGBRFplusRule-Based WorkflowRBWFuser agentdecision tableMMLABORLaboratoryagent determinationworkflow routing