This blog provides you with a step-by-step instruction how to quickly get started with master data quality management for products in SAP Master Data Governance on SAP S/4HANA 1809. I’ve split the end-to-end description into 4 parts:
- Creating and implementing a data quality rule
- Evaluating data quality rules
- Analyzing evaluation results
- Using data quality scores
For an introduction to the functionality, see my blog Master Data Quality Management with SAP Master Data Governance on SAP S/4HANA 1809.
Furthermore, you might find this blog helpful to get an overview: Getting started with master data quality management for products using SAP Master Data Governance on SAP S/4HANA 1809. You also find the prerequisites in this blog.
The relevant online help (aka Product Assistance) is available here: http://help.sap.com/s4hana then navigate to Product Assistance => Cross Components => Master Data Governance. See the respective sections on Rule Management and Quality Evaluation beneath the nodes Configuration of MDG, Data Quality Management and Working with MDG, Data Quality Management.
Now, let’s get started with the first part…
Part 1 – Creating and implementing a data quality rule
The Example Rule
The example rule to implement is:
The field Division (MARA-SPART) must be filled
for all products of type finished goods (MARA-MTART = FERT)
that also have a product number starting with ZDEMO (MARA-MATNR = ZDEMO*)
We call the first part of the rule “The field Division (MARA-SPART) must be filled” the rule condition. This is the actual check of the rule and the system shall report whether products comply with this rule or violate this rule. When the rule is evaluated, the rule condition determines the outcome of either OK or Not OK.
The second part of the rule “for all products of type finished goods (MARA-MTART = FERT) that also have a product number starting with ZDEMO (MARA-MATNR = ZDEMO*)” is called the rule scope. The scope defines to which products master data the rule shall be applied. For all product data in the scope of the rule, the condition is evaluated and the evaluation of the rule produces the outcome of either OK or Not OK. For all product data that is not in the scope of the rule, the outcome is undefined.
Create the data quality rule
- Go to the tile group Master Data Quality Evaluation for Products and launch the app Manage Data Quality Rules – Products.
- The app presents a list with all existing data quality rules. Use the add button to create a new rule.
- Enter a name of the rule and an ID for the rule. The field Checked Field is used to document which field is subject to the rule. This information is for documentation purposes only. Click on the value help of the field Checked Field.
- In the select dialog, use the value help for Table to select Basic Data (MARA).
- Then enter SPART in Field Name and hit the enter key or click on Go. Click on the row for MARA-SPART.
- Fill the remaining fields of the rule, do not enter anything in Base Table for the moment. All fields are descriptive only and are irrelevant to the evaluation of the rule by the system. Click on Save when you are done.
- The rule is now save in status New. In this simple example we do not use other statuses than New or Active. We do not use different user or roles in the creation process either.
Implement the data quality rule using BRFplus
- The next step is to implement the expression of the rule. Go to the section Implementation and click on Create Expressions.
- The field Base Table is an important property of the rule. Semantically, Base Table defines on which level of the information hierarchy of a product the rule will be applied.
Example 1: If Basic Data (MARA) is used, the rule will be applied to Basic Data of a product only. Consequently, there is only one outcome of this rule for a product.
Example 2: If Plant Data (MARC) is used, the rule will be applied to the data of every plant of a product. Here, there is an outcome of the rule for each plant for which the product is available.
- Choose Basic Data (MARA), then click on Create Expressions. Remark: the system will be busy for a few seconds to prepare the expressions.
- Once completed, the app will display links to the Scope Expression and to the Condition Expression. The status of both expressions is initial.
The Scope Expression is used by the system to determine if a product (or parts of a product as specified by Base Table) is in the scope of the rule and therefore checked with the Condition Expression. The condition expression determines the outcome of either OK or Not OK.
If the data is not in the scope of the rule, no outcome is provided.
Click on the link of the Scope Expression.
- The BRFplus workbench is launched and an initial expression displayed. The expression needs to be adapted to the desired scope of the rule.
Example scope: … for all products of type finished goods (MARA-MTART = FERT) that also have a product number starting with ZDEMO (MARA-MATNR = ZDEMO*)
- First, the operand need to be changed to material type. Choose Edit Operand => Use Direct Value Range From… => Context => Material type
- Now, use the value help of the right-hand side operand.
- Choose FERT for Finished Product.
- The first part of the scope is now implemented. The second part, the check for the product number, is still missing.
- Choose Template => <1> and <2>.
Note: This is only one of the possible solutions…
- Select the operand for the second part of the If expression, by choosing: Not assigned => Use Direct Value Range From… => Context => Source ID.
Note: For products, the product number is available in the field Source ID only!
- Choose starts with text as the operator.
- Then enter your prefix in the field of the right-hand side operand.
- Finally, the expression should read like this:
If Material type is equal to FERT
and Source ID starts with text ZDEMO
Then Boolean is true, else it is false.
Meaning that if this condition is fulfilled, the product is in the scope of the rule, otherwise it is not in the scope.Choose Save.
Then, choose Activate.
Finally click on Back to return to the data quality rule.
- Note that the status of the scope expression was updated.
Click on the link of the Condition Expression.
- In the BRFplus workbench, change the operand of the initial expression by choosing Edit Operand => Use Direct Value Range From… => Context => More … .
- Enter Division in the field Text and search. Select Division.
- Change the operator to is not initial.
- The resulting expression should read like this:
If Division is not initial
Then Boolean is true, else it is false.Meaning the outcome of the rule is OK if Division is filled and Not OK otherwise.
Click on Activate.
Finally click on Back to return to the data quality rule.
- Note that the status of the Condition Expression is Active.
- As a last action, click on Activate to switch the status of the rule to Active. From now on, the rule is considered in data quality evaluations.
After having completed these steps you have a data quality rule that is ready for evaluation. See the next part of this series to see how this is done.
Click on Follow at the top of this page to get informed when the next part is posted.