Skip to Content
Technical Articles
Author's profile photo Steffen Ulmer

SAP Master Data Governance, cloud edition: Create a validation rule

Hi community,

Since May 2021 the SAAS solution “SAP Master Data Governance, cloud edition” is released on SAP BTP with the version 2105. In this version you can define your own validations to add custom specific business rules or checks to increase the data quality of your master data objects. To create your own validation rule will use the app “Data Quality Rules for Business Partners”.

MDG%20App%20%u201CData%20Quality%20Rules%20for%20Business%20Partners%u201D

MDG App “Data Quality Rules for Business Partners”

Like in the SAP Master Data Governance version on-premise you will use SAP BRF+ rules framework to model the logic of your check. Simple validations are modeled in the same way as on the on-premise version. For instance, you can check that for a certain Business Partner Category (such as “2” for “Organizations”) the attribute “Search Term 1” is mandatory and cannot be empty. In this example you will simply define the scope expression and the condition expression as shown on the following screenshot.Simple%20BRF+%20checks

Simple BRF+ checks

On MDG Rule level you define additional meta data for the business rule and you can also enable the usage. This is, as written above, similar to the OP world.Display%20Validation%20Rule%20in%20MDG%20App

Display Validation Rule in MDG App

Nevertheless, were are some differences to the on-premise world: As you can see in screenshot 2 “SAP Master Data Governance, cloud edition” is using the “Simplified BRF+ Workbench” which comes with some limitations compared to the full version. Besides others the following expressions are available in the “Simplified BRF+ Workbench”: Decision table, Case, Formula and Loop. The artifact “DB Lookup” which I used often is not supported. I used the “DB Lookup” to check the existence of a BP object in a dependent table. An example is the implementation of the check “at least one industry must be assigned to an BP of type organization”.

After some research I found out that even if the expression type “DB Lookup” is not available you can implement the checks in “SAP Master Data Governance, cloud edition”. In fact the check can be implemented with “procedure calls” in an easier way and most likely with an better performance.

The modeling of the check “CHECK_INDUSTRY” include the following steps:

  1. Create a new Validation Rule by using the app “Data Quality Rules for Business Partners”
  2. Enter the meta data for the rule and define base table (“BUT000”) and checked field (“BUT0IS-IND_SECTOR”)
  3. Save the rule and add the usage for “Data Quality Evaluation” ( or any other). Use the button “prepare” to generate the BRF+ application.
  4. Define scope expression: As simple as on the on-premise version you use BRF+ capabilities to model the scope definition: Click on the link with in section “Implementation” and without any coding you can define that only Business Partner of type “Organization” are in scope of the rule. The framework has generated the complete context for you out of the Business Partner data model.
  5. Define condition expression:
    Explanation: To be able to check if each BP which is in the scope of the condition has also an industry assigned you need to “correlate” the tables BUT000 and BUT0IS. Instead of using an “DB Lookup” you need to use an expression “Table Operation”. In the artifact itself you select as an table-operand an type “procedure call”, This “procedure call” is provided by the MDG framework for you to support such checks.
    Steps in the system:

    1. Open the condition expression in the “Simplified BRF+ Workbench” by clicking on the link the Validation Rule
    2. Remove the dummy condition and add new condition
    3. On the new condition select the context menu and “Create Expression”BRF+%3A%20Create%20Expression%20Type%20Table%20Operation
    4. Select “Table Operation” from the drop down list and enter any “Name”
    5. In the “Table Operation” expression itself select the Operation “Has at least”
    6. Now you need to assign a procedure call as a table. For the industry example please choose “BUT0IS lookup ALL”Select%20procedure%20call
    7. As a last step you need to define a condition for the table operation. One example is to define the attribute “Standard Industry” should not be initial.

The following screenshots gives you some more information on the steps above:

Validation%20Rule%20in%20Fiori%20app%20%u201CData%20Quality%20Rules%20for%20Business%20Partners%u201D%3A%20Navigate%20into%20the%20implementation%20of%20the%20condition%20expression

Validation Rule in Fiori app “Data Quality Rules for Business Partners”: Navigate into the implementation of the condition expression

 

 

%u201COuter%20rule%u201D%20created%20by%20the%20MDG%20framework%3A%20The%20expression%20%u201Ctable%20operation%u201D%20is%20defined

“Outer rule” created by the MDG framework: The expression “table operation” is defined

Details%20of%20the%20%u201Ctable%20operation%u201D%3A%20it%20uses%20the%20procedure%20call%20as%20an%20table%20and%20checks%20an%20attribute%20for%20existence

Details of the “table operation”: it uses the procedure call as an table and checks an attribute for existence

 

 

As you can imagine you can use this approach also for other dependent tables and use cases. For instance you can make sure that each Business Partner of type “Person” has at least one bank account defined.

Hope this blog helps you to have fun with “SAP Master Data Governance, cloud edition”

 

Best Regards

Steffen

 

PS: Many thanks to Stefan Geiselhart and Sabine Stellmacher for helping me doing the research and writing this blog.

 

 

 

 

 

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andreas Seifried
      Andreas Seifried

      Well explained, including helpful screenshots. Thanks!

      Author's profile photo Stefan Geiselhart
      Stefan Geiselhart

      Nice! The built-in procedure calls, available in MDG DQM facilitate a lot when it comes to cross-table lookups/validations. This is much faster time to value.

      Author's profile photo Ramesh G
      Ramesh G

      Hello Steffen ,

      Great Blog . Does MDG could edition come with all Standard validations out of the box ? like how we get in Onprem standard validations of SAP .

      Or customers need to build using this  validation rules?