SAP MDG · VALIDATION DERIVATION
How do I implement MDG BP validation in USMD_RULE_SERVICE using ZCL_MDGBP_BP_VALIDATION patterns?
Use the USMD_RULE_SERVICE BAdI and implement IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY as an orchestrator: read application context first, gate by model and CR type, derive BP grouping/account group, call reusable validation helpers for each rule area, collect messages in a local table, deduplicate, and normalize severities at the end.
Use the USMD_RULE_SERVICE BAdI and implement IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY as an orchestrator: read application context first, gate by model and CR type, derive BP grouping/account group, call reusable validation helpers for each rule area, collect messages in a local table, deduplicate, and normalize severities at the end.
Use the USMD_RULE_SERVICE BAdI and keep IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY as an orchestration layer. The validated pattern is to read application context first, check model and CR type, derive grouping/account group from the CR, call reusable rule helpers for supplier, address, email, tax, ID, company-code, purchasing-org, and bank checks, then post-process messages with deduplication and severity normalization.
Process flow
- Open the BAdI definition in SE18 for
USMD_RULE_SERVICEand confirm the interface IF_EX_USMD_RULE_SERVICE. - Create or update the implementation in SE19 and assign the implementing class.
- Implement IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY as the main validation entry point.
- Read CL_USMD_APP_CONTEXT first and gate the logic by model, CR type, CR step, process, and entity type.
- Derive BP grouping and account group from the change request context.
- Call reusable validation helper methods for each rule area.
- Collect helper messages in a local table, append them to ET_MESSAGE, and deduplicate.
- Run message severity adjustment after validation completes, then activate and test.
Referenced tables
| Object | Purpose |
|---|---|
TVARVC | Holds switch-like configuration values that can alter validation behavior in the documented pattern. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How do I build MDG business partner validation that depends on CR type, workflow step, and BP grouping?
- How do I implement CHECK_ENTITY for MDG BP validations with message control and helper methods?
- What is the standard pattern for MDG BP supplier validation in a BAdI implementation?
Possible questions
- How do I implement MDG BP validation in
USMD_RULE_SERVICEusing ZCL_MDGBP_BP_VALIDATION patterns? - How do I build MDG business partner validation that depends on CR type, workflow step, and BP grouping?
- How do I implement CHECK_ENTITY for MDG BP validations with message control and helper methods?
- What is the standard pattern for MDG BP supplier validation in a BAdI implementation?
- How do I add mandatory supplier checks, bank checks, and message normalization in MDG BP validation?