Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
steffen_ulmer
Employee
Employee
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 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 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 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”

    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”

    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 Rule in Fiori app “Data Quality Rules for Business Partners”: Navigate into the implementation of the condition expression


 

 


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



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.

 

 

 

 

 

 
5 Comments
AndreasSeifried
Product and Topic Expert
Product and Topic Expert
0 Kudos
Well explained, including helpful screenshots. Thanks!
0 Kudos
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.
ramesh1985
Explorer
0 Kudos
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?
steffen_ulmer
Employee
Employee
0 Kudos
Hi

Most/many, typically data model related ones and address check, come out of the box.
jasmin1010
Newcomer
0 Kudos
Hello,

 

thank you for this very informative post.

Did anyone ever try to create a validation rule for a field to be unique (e.g. a number may only exist once in the system)?

Thank you in advance.

 

Best regards