Skip to Content
Product Information
Author's profile photo Amit Kumar Singh

UI Data Protection – Role based masking in Supplier Master app of SAPUI5

Introduction

In this blog post, we will learn how to mask “Street“, “House Number“, “Postal Code“, and “City” fields of Supplier Address in Supplier Master application of SAPUI5.

PFCG Role will be used for the authorization check which will allow users with the specified role to view the field value. If a user does not have this role, it means the user is not authorized and data will be protected either through masking, clearing, or disabling the field.

The end result for unauthorized users will look like below:

Prerequisite

Product “UI data protection masking for SAP S/4HANA” is used in this scenario to protect sensitive data at field level and must be installed in the S/4HANA system.

The product is a cross-application product which can be used to mask/protect any field in SAP GUISAPUI5/SAP FioriCRM Web Client UI, and Web Dynpro ABAP.

Let’s begin

Configuration to achieve masking

Logical Attribute is a functional modelling of how any attribute such as Social Security NumberBank Account NumberAmountsPricing informationQuantity etc. should behave with masking.

Configure Logical Attribute – Follow the given path:

SPRO -> SAP NetWeaver -> UI Data Protection Masking for SAP S/4HANA -> Maintain Metadata Configuration -> Maintain Logical Attributes

Maintain Field Level Security and Masking Configuration

Here, we will define how masking will behave with the logical attribute that we created in above step.

Follow the given path:

SPRO -> SAP NetWeaver -> UI Data Protection Masking for SAP S/4HANA -> Data Protection Configuration -> Maintain Field Level Security and Masking Configuration

Follow below mentioned steps:
  • Click on “New Entries” button
  • Enter “Sensitive Entity” as “LA_SUPL_CITY” and press “Enter” key. “Description” and “Application Module” will get populated in corresponding fields
  • Check “Enable Configuration” check-box
  • Select “Role Based Authorization” option
  • Enter “PFCG Role” as “LEVEL01”. In this example, we have used a blank role “LEVEL01”. Customers can use any role as per their requirement.
  • Enter “Field Level Action” as “MASK_FIELD
  • Click on “Save” button

  • Click on “New Entries” button
  • Enter “Sensitive Entity” as “LA_SUPL_HOUSENO” and press “Enter” key. “Description” and “Application Module” will get populated in corresponding fields
  • Check “Enable Configuration” check-box
  • Select “Role Based Authorization” option
  • Enter “PFCG Role” as “LEVEL01”. In this example, we have used a blank role “LEVEL01”. Customers can use any role as per their requirement.
  • Enter “Field Level Action” as “MASK_FIELD
  • Click on “Save” button

  • Click on “New Entries” button
  • Enter “Sensitive Entity” as “LA_SUPL_POSTCODE” and press “Enter” key. “Description” and “Application Module” will get populated in corresponding fields
  • Check “Enable Configuration” check-box
  • Select “Role Based Authorization” option
  • Enter “PFCG Role” as “LEVEL01”. In this example, we have used a blank role “LEVEL01”. Customers can use any role as per their requirement.
  • Enter “Field Level Action” as “MASK_FIELD
  • Click on “Save” button

  • Click on “New Entries” button
  • Enter “Sensitive Entity” as “LA_SUPL_STREET” and press “Enter” key. “Description” and “Application Module” will get populated in corresponding fields
  • Check “Enable Configuration” check-box
  • Select “Role Based Authorization” option
  • Enter “PFCG Role” as “LEVEL01”. In this example, we have used a blank role “LEVEL01”. Customers can use any role as per their requirement.
  • Enter “Field Level Action” as “MASK_FIELD
  • Click on “Save” button

Maintain Technical Address

In this step, we will associate the Technical Address of the fields to be masked with the Logical Attributes.

To get the Technical Address of a SAPUI5/SAP Fiori field, refer Technical Trace blog post.

Follow the given path:

SPRO -> SAP NetWeaver -> UI Data Protection Masking for SAP S/4HANA -> Maintain Metadata Configuration -> Maintain Technical Address

Follow below mentioned steps:

Under “UI5/Fiori NetWeaver Gateway Field Mapping”, maintain technical address for following fields.

  • Click on “New Entries” button
  • Enter “Service Name” as “MD_SUPPLIER_MASTER_SRV
  • Enter “Entity” as “C_BusineeePartnerAddressType
  • Enter “Property” as “CityName
  • Enter “Logical Attribute” as “LA_SUPL_CITY
  • Enter “Description” as “Supplier City Information
  • Click on “Save” button

 

  • Click on “New Entries” button
  • Enter “Service Name” as “MD_SUPPLIER_MASTER_SRV
  • Enter “Entity” as “C_BusineeePartnerAddressType
  • Enter “Property” as “HouseNumber
  • Enter “Logical Attribute” as “LA_SUPL_HOUSENO
  • Enter “Description” as “Supplier House Number
  • Click on “Save” button

 

  • Click on “New Entries” button
  • Enter “Service Name” as “MD_SUPPLIER_MASTER_SRV
  • Enter “Entity” as “C_BusineeePartnerAddressType
  • Enter “Property” as “PostalCode
  • Enter “Logical Attribute” as “LA_SUPL_POSTCODE
  • Enter “Description” as “Supplier Postal Code
  • Click on “Save” button

 

  • Click on “New Entries” button
  • Enter “Service Name” as “MD_SUPPLIER_MASTER_SRV
  • Enter “Entity” as “C_BusineeePartnerAddressType
  • Enter “Property” as “StreetName
  • Enter “Logical Attribute” as “LA_SUPL_STREET
  • Enter “Description” as “Supplier Street Information
  • Click on “Save” button

Conclusion

In this blog post, we have learnt how Role-based masking is achieved in Supplier Master application of SAPUI5 for masking “Street“, “House Number“, “Postal Code“, and “City fields.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Samir Dutta
      Samir Dutta

      Hi Amit,

      Excellent document. Thanks for sharing it.

      I tried refering it and did config into S/4HANA system. Required Add-ons are installed at Front end. Any system Parameter to set or config to carry out at GW system?

      Can you confirm what esle activities to carry out to display the masked value at UI layer apart from given steps.

      Strangely I am getting a warning as "Entity C_BusinessPartnerBankType not valid for service name MD_SUPPLIER_MASTER_SRV" when I am maintiang the service and entiry into Technical address.

       

       

      Regards
      Samir