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: 
0012anirban
Product and Topic Expert
Product and Topic Expert
1,163

Hi All,

In the last blog, we saw how we could model complex validation rules in MDG central governance classic mode. We saw that MDG DQM rules can be used in doing persona-specific validations at each branch of the parallel workflow. If you have missed the previous blogs, here is a quick link to the entire series of the DQM blogs till now.

MDG DQM: Creating complex validation rules for MDG classic mode in S/4 HANA

MDG DQM: Employing rules in central governance & mass processing in S/4 HANA

MDG DQM: Empowering Your Business with High-Quality Data in S/4HANA

MDG DQM: Enriching product master data with derivation rules in S/4 HANA

MDG DQM: Troubleshooting DQM validation rules for central governance - Product Master S/4 HANA

INTRODUCTION:

In this blog post, we will build upon the framework from the last blog MDG DQM: Creating complex validation rules for MDG classic mode in S/4 HANA, and see how we can create validation rules for classes & characteristics. 

Classes and characteristics are very important part of Material master, business partner for grouping similar type of product's ,business partners. These attributes are generally not available as part of the core product or business partner tables.

Current challenges:

If we look at the How to create a DQM rule to check for product classification assignments guide, we see that  to check the classification data we need to ensure MARA_AUSP_PRC is always filled and then only we can run data quality evaluation to check the data. However, this is a passive data quality check and the rules will not be triggered during single change request processing.

So the question is how to overcome it ?

MAIN CONTENT

The scenario which we are going to see here is for a particular material type and plant specific material status, certain classes & characteristics are mandatory.

1. Create a validation rule with base table as MARC.

0012anirban_0-1719218637313.png

2. The scope of the rule will contain MTART & MMSTA.

0012anirban_1-1719218705328.png

3. The condition of the expression will be modelled as a case expression. We will only be focussing on the rule stage = 'Check in change requests'.

0012anirban_2-1719218744771.png0012anirban_3-1719218776964.png

4. Inside the boolean expression CHECK_CLF_MDF we will be doing a procedure call to a ABAP class with a static method to check the required classes and characteristics.

0012anirban_4-1719218972124.png

5. The logic will first read the staging data for entity 'CLASSASGN' & 'VALUATION', then get the required characteristics attributes from CABN and KSML tables. Once you have all the characteristics you can verify based on material type if the required ones are present.

P.S: The ABAP logic is quite lengthy hence not shared here.

0012anirban_5-1719219263618.png

6. Once the logic is completed, you can enable the usage 'Check in change requests'.

0012anirban_6-1719219383213.png

7 Once you open a material and perform a check, you will see the below error message.

0012anirban_7-1719219633098.png

CONCLUSION:

In conclusion, while the current DQM framework for MDG classic mode in S/4 HANA does not natively support active validation for classification data during single change request processing, this challenge can be effectively addressed with some customization. By implementing tailored validation rules, businesses can ensure that essential classes and characteristics are consistently maintained. This approach enables proactive data quality management, ensuring that classification data is accurate and complete as part of the material master and business partner data management processes.

Please feel free to drop in your comments.

Regards

Anirban