SAP MDG · VALIDATION DERIVATION

How do I implement SAP MDG BP validation in BAdI USMD_RULE_SERVICE for supplier and business partner change requests?

Implement the MDG BP validation in a custom class that acts as an orchestration layer: read the application context first, branch by CR type/process/step, call focused rule helpers for mandatory supplier and entity checks, append messages to ET_MESSAGE, then normalize severities with ADJUST_MESSAGES. Use FIELDNAME and key mapping for row-level navigation.

Implement the MDG BP validation in a custom class that acts as an orchestration layer: read the application context first, branch by CR type/process/step, call focused rule helpers for mandatory supplier and entity checks, append messages to ET_MESSAGE, then normalize severities with ADJUST_MESSAGES. Use FIELDNAME and key mapping for row-level navigation.

Implement the validation in a custom MDG rule-service class, with `IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY` as the main validation entry point and `IF_EX_USMD_RULE_SERVICE~DERIVE_ENTITY` reserved for defaulting logic. In the BP pattern, the class reads the application context first, branches by CR type, step, process, and BP grouping/account group, delegates detailed checks to helper logic, and then normalizes or deduplicates messages before returning them to MDG.

Process flow

  1. Open the BAdI definition in SE18 and confirm the interface and method intent.
  2. Create the BAdI implementation in SE19 and assign the implementing class.
  3. Implement IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY as the main validation entry point.
  4. Read the application context first and cache CR type, step, process, and entity type.
  5. Branch by entity type, change request type, process, and BP grouping/account group.
  6. Delegate rule-specific checks to focused helper methods.
  7. Populate FIELDNAME and MSGV1 for navigation-friendly messages.
  8. Append local messages to ET_MESSAGE once per block and normalize severity at the end.

Referenced tables

ObjectPurpose
TVARVCSwitch table used for special-case behavior such as navigation or GTS control.

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

Related questions and keywords

Alternative questions

  • How do I build validation logic in IF_EX_USMD_RULE_SERVICE~CHECK_ENTITY for MDG BP?
  • How do I enforce mandatory supplier attributes and message handling in SAP MDG BP validation?
  • How do I implement message normalization and step-based checks in a custom BP validation class?

Possible questions

  • Which BAdI method should I use for MDG BP entity validation?
  • How do I add mandatory-field checks for supplier attributes in MDG?
  • How do I adjust message severity in a custom MDG validation class?
  • How do I make MDG validation messages navigate to the correct entity row?
  • How do I combine validation, workflow-step control, and derivation in one BP validation class?

Keywords

SAP MDGUSMD_RULE_SERVICEIF_EX_USMD_RULE_SERVICECHECK_ENTITYDERIVE_ENTITYZCL_MDGBP_BP_VALIDATIONADJUST_MESSAGESCHECK_MANDATORY_SUPPLIER_ATTRFIELDNAMEMSGV1TVARVC