Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
rahul_gupta12
Explorer

In this blog, our focus will be on the fundamental aspect of creating derivation rules for product master data. In this use case, we'll illustrate how to derive plants based on material type within an MDG Central environment using DQM derivation in S/4 2023 on-premises version.

Deriving plants based on material type is a common requirement in many organizations, especially in manufacturing or distribution industries where different types of materials may be associated with specific plant locations.

Before diving into the Use Case of DQM for SAP MDG Product or Material, preparing the Managing Derivation Scenarios tile, it's important to ensure that you have access to the necessary roles and authorization.

Role : SAP_BR_PRODMASTER_STEWARD

Authorization objects : 

 

MDC_DQEVALData Quality Evaluation Permissions (MDC_DQEVAL)
MDC_SIMULSimulation Permissions (MDC_SIMUL)
MDQRM_DS_EMaster Data Quality: Derivation Scenario Rule Execution (MDQRM_DS_E)
MDQRM_DS_RMaster Data Quality: Derivation Scenario Rule (MDQRM_DS_R)
MDQRM_DS_SMaster Data Quality: Derivation Scenario (MDQRM_DS_S)
MDQRM_DSEXMaster Data Quality: Derivation Scenario Export
MDQRM_DSIMMaster Data Quality: Derivation Scenario Import
MDQRM_MNDRMaster Data Quality: Mined Rule
MDQRM_MNNGMaster Data Quality: Rule Mining
MDQRM_RLEXMaster Data Quality: Validation Rule Export
MDQRM_RLIMMaster Data Quality: Validation Rule Import
MDQRM_RLUSMaster Data Quality: Validation Rule Usage
MDQRM_RULEMaster Data Quality: Validation Rule (MDQRM_RULE)
S_RFCAuthorization Check for RFC Access (S_RFC)

Authorization Objects Used by MDG, Data Quality Management | SAP Help Portal

 

Step 1: Create the Change Request Actions

  • Navigate to MDGIMG> General Settings > Process Modeling > Workflow > Define Change Request Actions

rahul_gupta12_0-1710573037286.png

rahul_gupta12_1-1710573037289.png

Action

Description

Pushbutton Text

Quick info Text

Check

Note

Reason

H1

DQM Derivation Successful

N/A

N/A

 

 

 

H2

DQM Derivation failed

N/A

N/A

 

 

 

H3

Continue

Continue

Continue

X

 

 

H4

Resubmit with DQM Derivation

Resubmit with DQM Derivation

Resubmit with DQM Derivation

X

 

 

H5

DQM Derivation Successful with Message

DQM Derivation Successful with Message

DQM Derivation Successful with Message

X

 

 

Why we need this action?

There are three possible outcomes when we integrate the DQM derivation with Central Governance,

  • Derivation Failed
  • Derivation Successful Without any message
  • Derivation Successful with Some message

Step 2: Define Change Request Step Types and Assign Actions

  • Navigate to General Settings > Process Modeling > Workflow > Define Change Request Step Types and Assign Actions
  • Create a new step type and assign the relevant actions created in step 1.
  • Ensure that dialog actions (e.g., continue or resubmit) are assigned for user interaction.

Create the New Step type “H” and assign the Actions Created in the above step 1, only assign the H3 and H4 , they are the dialog action , rest H1, H2 and H5 are background results.

rahul_gupta12_2-1710573037291.png

Step 3: Configure Change Request Type

Note: The Integration of DQM Derivation is only possible with Rule Base Workflow

  • Navigate to MDGIMG > General Settings > Process Modeling > Change Request > Create Change Request Type.
  • Copy the standard CR type (e.g., MAT01) and create a new CR type (e.g., ZMATDQM) for integration with DQM derivation.

rahul_gupta12_3-1710573037292.png

Step 4: Define Change Request Steps for Rule-Based Workflow

  • Navigate to MDGIMG > General Settings > Process Modeling > Workflow > Rule-Based Workflow > Define Change Request Steps for Rule-Based Workflow
  • Configure the steps for the rule-based workflow associated with the new CR type.
  • Define the conditions and corresponding actions based on DQM derivation outcomes.

rahul_gupta12_0-1710573752632.png

Step 5: Define the Service Name

  • Navigate to MDGIMG > General Settings > Process Modeling > Workflow > Rule-Based Workflow > Define Service Names for Rule-Based Workflow
  • Define service names for the rule-based workflow “ZMDG_MM_DQM_DERIVATION”

rahul_gupta12_1-1710573847092.png

Step 6: Configure the Rule Based Workflow

  • Navigate to MDGIMG > General Settings > Process Modeling > Workflow > Rule-Based Workflow > Configure Rule-Based Workflow
  • Configure the Rule Based workflow for the Change request type “ZMATDQM”

DT_SINGLE_VAL_ZMATDQM

CR Previous Step

Previous Action

Condition Alias

New Chng. Req. Step

New CR Status

=00

 

DQM

10

02

=10

=H1

DQS

20

02

=10

=H2

DQF

40

10

=10

=H5

DQW

40

10

=20

=06

REJ

92

03

=20

=05

ACT

90

02

=40

=H3

DQS

20

02

=40

=H4

DQM

10

02

=92

=07

DQS

20

02

=92

=08

ROL

99

06

=90

=31

END

99

05

=99

 

END

 

 

 

DT_USER_AGT_GRP_ZMATDQM

Condition Alias

User Agt Grp No.

Step Type

User Agent Type

User Agent Value

=DQS

1

3

AG

XXXXXXXXX

=DQF ; =DQW

1

H

AG

XXXXXXXXX

=REJ

1

4

SU

INIT

 

DT_NON_USER_AGT_GRP_ZMATDQM

Condition Alias

Agent Group

Process Pattern

Service Name

=DQM

1

02

ZMDG_MM_DQM_DERIVATION

=ACT

1

06

 

=ROL

1

08

 

=END

1

99

 

Step 7: Implement BAdI for Calling System Method

  • Navigate to MDGIMG > General Settings > Process Modeling > Workflow > Rule-Based Workflow > Business Add-Ins> BAdI: Calling of System Method for Rule-Based Workflow
  • Implement the BAdI "USMD_SSW_SYSTEM_METHOD_CALL" to call system methods for rule-based workflow.
  • Write code to execute DQM derivation and handle different derivation outcomes accordingly.

Capture.PNG

 

 

*Sample Code:
METHOD if_usmd_ssw_syst_method_caller~call_system_method. 
DATA(cr_number) = iv_cr_number. 
CASE iv_service_name. 
 WHEN ‘ZMDG_MM_DQM_DERIVATION’. 
"Get an instance of the MDQ derivation controller 
DATA(derivation_controller) = cl_mdg_mdq_rbwf_derive=>get_instance( ). 
"Execute the derivation and evaluate the result 
DATA(result) = derivation_controller->if_mdg_mdq_rbwf_derive~derive( change_request = cr_number ). 
IF result EQ derivation_controller->if_mdg_mdq_rbwf_derive~derivation_failure. 
"Indicate that the derivation failed  
ev_action = 'H2'. 
"INFO: access to messages via derivation_controller->messages 
ELSEIF result EQ derivation_controller->if_mdg_mdq_rbwf_derive~derivation_success_w_messages. 
"Indicate that the derivation was successful but with messages  
ev_action = 'H5'. 
"INFO: access to messages via derivation_controller->messages 
ELSE. 
"Indicate that the derivation was successful  
ev_action = 'H1'. 
ENDIF.           
WHEN OTHERS. 
 ENDCASE. 
ENDMETHOD.

 

 

Step 8: Define Derivation Scenarios

  • Open the "Define Derivation Scenarios" app to define derivation scenarios for products or materials.
  • Create a new scenario based on the requirement to derive material types based on certain conditions.

rahul_gupta12_0-1710576568477.png

  • Click on the Create button to start defining the derivation from DQM.

rahul_gupta12_1-1710576568481.png

  • Provide the following details, in this case we are trying to derive the material type based on the Material Type, so our base table shall be MARA.

rahul_gupta12_2-1710576568488.png

rahul_gupta12_3-1710576568491.png

  • Click on Create button to proceed further.

rahul_gupta12_4-1710576568494.png

  • Click on Send for Implementation Button to implement the Scenario.

rahul_gupta12_5-1710576568496.png

 

rahul_gupta12_6-1710576568497.png

Step 9: Prepare Scope Expression and Define Derivation Rules

  • Prepare the scope expression for the CR type and navigate to the BRF Plus application to define the scope.
  • Define derivation rules using decision tables for conditions and results.
  • Specify conditions such as material types and corresponding plants to be derived.
  • Click on Prepare Scope Expression to prepare the scope, in our case the scope is for the CR type.

rahul_gupta12_7-1710576568500.png

  • Click ok to proceed and later refresh to see the scope Expression, click on Scope Expression to proceed further, the navigation shall take to BRF Plus application , where we can define the scope of CR Type.

rahul_gupta12_8-1710576568502.png

 

rahul_gupta12_9-1710576568504.png

rahul_gupta12_10-1710576568505.png

rahul_gupta12_11-1710576568507.png

  • Set the scope and activate it and navigate back to Define Derivation

rahul_gupta12_12-1710576568509.png

  • Click on Edit, Once edit mode is entered the scope which is initial in the below screen will be available in active state.

rahul_gupta12_13-1710576568511.png

rahul_gupta12_14-1710576568513.png

  • We have two sections for derivation, one is field and other is table, in this case we will use the table as we are going to derive the plant.

rahul_gupta12_0-1710577444214.png

  • Provide the header, Rule details Section, rule Id and other related information as shown below.

rahul_gupta12_1-1710577444217.png

  • In field section, provide the Condition field and Result fields, in this case conditional field is Material Type and Result Table is MARC and the field is plant and Click on Apply and then Save.

rahul_gupta12_2-1710577444220.png

rahul_gupta12_3-1710577444223.png

  • Select the Derivation Rules for table and set the status “To Be Implemented”. And Navigate to Derivation Rules for Tables

rahul_gupta12_4-1710577444225.png

  • Click on Create Decision table and Click on Refresh button

rahul_gupta12_5-1710577444239.png

rahul_gupta12_6-1710577444243.png

rahul_gupta12_7-1710577444249.png

  • Click on Condition Decision Table to maintain the condition and activate it.

rahul_gupta12_8-1710577444252.png

  • Click on Result Decision Table and maintain all the plants which we want to be defaulted.

rahul_gupta12_9-1710577444262.png

  • Once both Condition and Result Decision is active, the status changes to active.

rahul_gupta12_10-1710577444266.png

Step 10: Review and Activate Derivation Rules

  • Review the derivation rules, ensuring correctness and completeness.
  • Activate the rules to make them available for use in the derivation process.
  • Set the status as “To be reviewed”

rahul_gupta12_0-1710578702647.png

  • Set Status as “To be Approved”.

rahul_gupta12_1-1710578702652.png

  • Set Status as “Approved”

rahul_gupta12_2-1710578702654.png

  • Activate the Execution

rahul_gupta12_3-1710578702657.png

Conclusion 

After completing all the configurations outlined above for derivation and integrating DQM (Data Quality Management) into the central governance Change Request (CR) process, the system will operate seamlessly to ensure data accuracy and consistency.

Once a user initiates a central governance CR, the DQM functionality, configured using BRF+ and the associated BADI's, will be automatically invoked in the background. This integration allows for the automatic validation and derivation of data based on predefined rules and logic.

If the DQM process succeeds, the CR will progress to the next step in the workflow, facilitating efficient data governance and approval processes. However, in case of any derivation failures, the system is designed to handle such scenarios effectively. The CR can be directed to the individual responsible for configuring the derivation rules, enabling them to review and rectify any issues. Alternatively, if necessary, the CR can be continued to the next step by bypassing the derivation process.

Ultimately, this setup ensures that data integrity is maintained throughout the central governance process, with automated checks and derivations occurring in the background to streamline operations and minimize manual intervention.

 
Labels in this area