Implementing attribute based masking using UI Data Protection Masking for S/4 hana in 1809 On-Premise [Case Study of masking sensitive fields in Material BOM (T/code CS01/CS02/CS03 and COR1/COR2/COR3) based on Product Hierarchy of Main Material]
The business requirement is to mask some sensitive fields in Material BOM, only for some given values of Product Hierarchy for main Materials. As an example:
Consider Material B20000002 having Product Hierarchy as E7:
When the Material BOM for this Material is displayed (using T/code CS03😞
Press ENTER. The following screen will be displayed:
Note that in the above screenshot, the columns Component, Component Description and Quantity are masked for un-authorized users.
The same result should be obtained when the Material BOM screen is reached from Display Process Order (T/code COR3) for the same main Material. Consider the example below:
Press ENTER. Note that this Process Order uses the same main Material B20000002 having Product Hierarchy E7.
Browse to the Master Data tab, and double-click on the Bill of Material 00000484 (as highlighted in the screen below):
The same screen (as before) will be displayed with the masked values for the fields:
On the other hand, if the Product Hierarchy is something different from E7, then these fields should not be masked. Consider the example below:
Consider Material BULK_01 having Product Hierarchy as E6 (i.e. different from E7):
When the Material BOM for this Material is displayed (using T/code CS03😞
Press ENTER. The following screen will be displayed:
Note that in the above screenshot, the columns Component, Component Description and Quantity are NOT masked (not even for un-authorized users).
The same result should be obtained when the Material BOM screen is reached from Display Process Order (T/code COR3) for the same main Material. Consider the example below:
Press ENTER. Note that this Process Order uses the same main Material BULK_01 having Product Hierarchy E6.
Browse to the Master Data tab, and double-click on the Bill of Material 00000412 (as highlighted in the screen below):
The same screen (as before) will be displayed with the non-masked values for the highlighted fields:
For the masking of Material BOM sensitive fields (based on Product Hierarchy), a custom PFCG role (in this example, ZTEST_UISM_PFCG_ROLE_BOM) needs to be configured by Security team. All users assigned to this role will be able to view/edit the sensitive fields. All remaining users (who are not assigned to this role) will not be able to view the contents of these sensitive fields.
For our testing purposes, we have assigned the above role to only 2 Users. This means, only these 2 users should be able to view the contents of the sensitive fields in Material BOM (for Product Hierarchy E7), while all remaining users will see a masked value of the sensitive fields.
To implement the above Business Requirement, we will be leveraging the Attribute based Masking capability of the addon UI Data Protection Masking for S/4HANA. It is important to note here that:
Perform the following steps in SPRO:
Step 1: Maintain Global Flag for Solution
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA --> Enable UI Data Protection Masking à Maintain Global Flag for Solution
Step 2: Maintain Flag: Data Protection Options
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA --> Enable UI Data Protection Masking à Maintain Flag: Data Protection Options
Step 3: Maintain Global Flag: Reveal on Demand
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA --> Enable UI Data Protection Masking à Maintain Global Flag: Reveal on Demand
Step 4: Maintain Logical Attributes
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA --> Maintain Metadata Configuration --> Maintain Logical Attributes
Step 5: Maintain Value Range Definition for Product Hierarchies
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA Ã Maintain Metadata Configuration --> Maintain Attributes and Ranges for Policy
Step 6: Maintain Value Range List for Product Hierarchies
Execute the standard SAP T/code /UISM/V_RANGE. Select the name of the Value Range (created in Step 5) and press the Display button.
Maintain the list of values of Product Hierarchies, for which the sensitive fields in Material BOM should be masked (as shown in the screen below). This is like maintaining a SELECT-OPTION:
Step 7: Maintain Derived Attribute for Product Hierarchy
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA Ã Maintain Metadata Configuration --> Maintain Attributes and Ranges for Policy
Step 8: Create call-back ABAP Class for Derived Attribute for Product Hierarchy
In Step 7, notice that we assigned a call-back ABAP Class ZCLTEST_PRODH_CS03 for the Derived Attribute DA_PRODUCTHIERARCHY. This Class must include the standard SAP Interface /UISM/IF_DERIVED_ATTR_VALUE. Inside this Class, we will write the code to derive the value for Main Material (which will reside in different higher level memory stacks based on the T/code). Thereafter, determine the value of the Product Hierarchy for this main Material, from the Material Master. The following is a sample code for the above Class:
CLASS zcltest_prodh_cs03 DEFINITION PUBLIC SECTION. INTERFACES /uism/if_derived_attr_value .
CLASS zcltest_prodh_cs03 IMPLEMENTATION. * <SIGNATURE>---------------------------------------------------------------------------------------+ DATA: lv_matnr TYPE matnr, * Get Material Number IF NOT lv_matnr IS INITIAL. ENDIF. ENDMETHOD. |
Step 9: Maintain Policy Details for Attribute based Authorizations
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA Ã Data Protection Configuration --> Maintain Policy Details for Attribute based Authorizations
After creating the above entry for Policy, select the Policy Name and press ABAP Policy Cockpit button to formulate the Policy (as highlighted in the screen below):
The following screen will be displayed, where we can define the Preconditions and the Rule for Masking:
Step 10: Maintain Field Level Security and Masking Configuration
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA Ã Data Protection Configuration --> Maintain Field Level Security and Masking Configuration
Step 11: Maintain Technical Address
SAP IMG --> SAP NetWeaver --> UI Data Protection Masking for SAP S/4HANA --> Maintain Metadata Configuration --> Maintain Technical Address
Mass Configuration also carried out to Generate Customizing for the following Screens:
Also, all Programs generated by pressing the following button:
[Note: This step (of generating the programs) must be performed manually in each and every system and client after the Transport requests are moved]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 29 | |
| 28 | |
| 23 | |
| 19 | |
| 14 | |
| 13 | |
| 12 | |
| 12 | |
| 10 | |
| 8 |