To define row-level security using an authorization object
- Create a new authorization object.
For this example, create an authorization object called Z_BUKRS that consists of one authorization field called BUKRS. This authorization is being used to secure the GLT0 table based on the values in the BUKRS (Company Codes) field.
- Execute transaction /CRYSTAL/RLS to access the Security Definition Editor.
- In the Table name field, type the name of the table that contains the rows you want to secure.
For this example, type GLT0.
- Click Create.
- In the Authorization entries screen, click Create.
- In the Select authorization entry type screen, click Reference to an authorization object.
- Click OK to access the Authorization Object entry screen.
- In the Authorization object name field, type the name of the authorization that you created in step 1.
For this example, you would type Z_BUKRS.
- Click Create.
The Authorization field values screen appears.
- In the Field value list, type the equals sign (=) and the name of the field that you want to secure.
For this example, you would type =BUKRS.
- Click Save.
- Exit the Security Definition Editor.
- Following your usual procedure, apply the new authorization object to the profiles or roles of the appropriate users.
For instance, following this example, you would apply the Z_BUKRS authorization object to each user who needs to access rows of data within the GLT0 table. When you apply the authorization object, you enter the appropriate Company Code values into the BUKRS authorization field, thereby specifying the Company Codes that the specified user is authorized to access.
Depending on the version of R/3 or mySAP ERP that you are using, and the SAP authorization model that you have already deployed, you can accomplish this in various ways:
-
Attach the new authorization to a new role that you in turn add to each user's security profile.
-
Attach the new authorization to a new profile that you in turn add to each user's security profile.
The end result is that the authorization is added to the master user data, so the database drivers can adhere to your customized data access restrictions.
-