Professional Documents
Culture Documents
Authorization Concept and Setup Guide
Authorization Concept and Setup Guide
Version 1.0
2012.06.06.
Table of contents
Overview............................................................................................................................................................................ 3
Transaction level authorizations.................................................................................................................................... 3
Table group level authorizations ................................................................................................................................... 4
Record level authorizations ........................................................................................................................................... 4
SAP standard line-oriented authorizations ................................................................................................................ 4
Custom row level authorizations............................................................................................................................... 4
Field level authorizations............................................................................................................................................... 5
General comments ............................................................................................................................................................ 6
Step by step tutorials ........................................................................................................................................................ 7
Table group level authorizations ................................................................................................................................... 7
SAP standard line-oriented authorizations: S_TABU_LIN.......................................................................................... 10
S_TABU_LIN Customizing.................................................................................................................................... 12
Adding the S_TABU_LIN to a role ........................................................................................................................ 15
Column level authorizations ........................................................................................................................................ 21
Custom row level authorizations.................................................................................................................................. 22
Further checks in the OpenSQL Editor........................................................................................................................ 25
Standard authorization objects .................................................................................................................................... 25
Custom authorization objects....................................................................................................................................... 25
Objects shipped............................................................................................................................................................... 26
Authorization Objects .................................................................................................................................................. 26
Authorization Object ZSQL_COMM ..................................................................................................................... 26
Authorization Object ZSQL_RES........................................................................................................................... 26
Authorization Object ZSQL_CLSP......................................................................................................................... 27
Authorization Object ZSQL_COL .......................................................................................................................... 27
Authorization Object ZSQL_MAIN ....................................................................................................................... 27
Predefined Roles .......................................................................................................................................................... 28
Role ZSQL_USER .................................................................................................................................................. 28
Role ZSQL_DEVELOPER ..................................................................................................................................... 28
Appendix Links to SAP Help...................................................................................................................................... 29
Overview
The authorization system of Hovitaga OpenSQL Editor and Hovitaga Report Generator is
exactly the same. Here you can see an overview of the whole authorization concept:
General comments
Keep in mind that if you change the authorizations of a user, in order for the changes to
take effect the user must log out and log in again.
Please note that authorizations are not checked if the SQL query is using the addition
client specified. The reason is that authorizations are always checked for the logon client
anyway. In order to still have protection, S_TABU_CLI and ZSQL_CLSP are checked for
authorization to maintain client-independent tables and to use the client specified SQL
addition.
If you create a new role for the OpenSQL Editor, the ZSQL_COL authorization object must
be added. If you do not want to limit the columns displayed, add a star chatacter to the
table name and field name.
After selecting a range of authorization groups and pressing enter, we can add our new
entry to this customizing view. Keep in mind that one table can be part of only one
autorization group, but one authorization group can contain many tables.
object S_TABU_CLI is the object that especially protects the client-independent (also
called cross-client) tables.
The indicator 'X' does not automatically allow maintenance, the access scope is still limited
through the field values in ACTVT of the object S_TABU_DIS.
SAP standard line-oriented authorizations: S_TABU_LIN
The example uses a custom table which is a copy of table SFLIGHT, which is included in
SAP systems for demonstration purposes. This holds flight information. Our goal is to filter
the table contents by Carrier ID (Airline Code). So for example a user who is responsible
for Lufthansa flights must only see records related to Lufthansa and nothing else.
10
11
S_TABU_LIN Customizing
The customizing entries in the IMG can be found under SAP NetWeaver - Application
Server - System Administration - Users and Administration - Line-oriented Authorizations.
When Define organizational criteria is executed, we create a new entry for our
organizational criteria, which is called Flights.
After creating the first attribute, we have to maintain the table field details. Here we can
define which table we want to filter and which key field does the attribute filter. Keep in
mind that only key fields can be used.
13
We will do the same process for the second attribute and table key field:
After defining the oranizational criteria, we have to activate it using the second customizing
transaction in SAP NetWeaver - Application Server - System Administration - Users and
Administration - Line-oriented Authorizations. Simply check the Active checkbox and save.
14
15
On the third tab called Authorizations press button Change Authorization Data. This will
call a screen where we can actually define what data can the Lufthansa administrator see.
fig 19. The marked button will call the screen we will use
The next screen will be empty be for the first time. It is time to authorization object
S_TABU_LIN to this role using the Manually button (Manual entry of authorization
objects). After adding S_TABU_LIN to the role, we will see the following screen:
16
fig 20. Press this button to add an authorization object to the role
The icons will be yellow when the exact values are not maintained for the authorization
objects. To maintain them, press any of the pencil icons. A popup window will appear
where we select our new organizational criteria:
Another popup window will appear where we will set up which exact values the user can
see. Here we make sure that the Lufthansa administrators will only see records where
CARRID equals LH. The star character is the wildcard character, so all flight connections
will be visible for Lufthansa. The Activity field can be used to separate Display and Change
operations. Using the star character this setting will be valid for both operations.
17
fig 3. Lufthansa admins should see only LH flights, but all flight
connections
After successfully maintaining the values for the authorization object, the icons will turn
green as seen here:
The last step in PFCG is to generate the profile. Press Shift-F5 or button Generate to do
so. A popup window will appear where you can give a name to the profile. You can use the
default if you like.
18
The very last step is to assign our new role to our test user. To do so, use transaction
SU01.
Simply add our new role on the Roles tabsheet and save.
Then testing our new authorization setup, we can see that the standard maintenance view
filters the table contents for user ZLH_USER, only LH records are visible.
19
fig 28. List the fields that the user will see
As a resul we will see the table and allowed fields in PFCG with green icons:
21
Keep in mind that if you create a new role for the OpenSQL Editor, the ZSQL_COL
authorization object must be added. If you do not want to limit the columns displayed, add
a star chatacter to the table name and field name.
22
Once this data is saved, the OpenSQL Editor will use V_VBAK_VKO to filter the contents
of VBAK. Now we assign this authorization object to our role using PFCG and restrict the
authorizations to Distribution Channel C1'.
23
Once the settings are saved and the authorization profile is generated, the OpenSQL
Editor restricts the access of table VBAK to records with Distribution Channel 'C1'.
fig 34. OpenSQL Editor filters VBAK for Distribution Channel 'C1'
24
25
Objects shipped
Authorization Objects
The Authorization Object Class ZSQL contains the following authorization objects.
Authorization Object ZSQL_COMM
Contains all the command-type and client role specific authorizations. It is possible to
restrict activities by Client Role.
Possible values for a Client Role:
P Production
T Test
C Customizing
D Demo
E Training/Education
S SAP reference
For example, Update commands could be executed on Test clients, but not on Production
clients.
Basically this defines what a user can do with each kind of command, and in what kind of
client.
Authorization Fields:
ZSQL_CTYPE Command Type
ACTVT Activity
CCCATEGORY Client control: Role of client (production, test)
Permitted activities:
01 Create or generate
02 Change
03 Display
06 Delete
16 Execute
Authorization Object ZSQL_RES
Contains all authorizations related to a Result Set of any select command. This can be set
up per Client Role.
Authorization Fields:
ACTVT Activity
CCCATEGORY Client control: Role of client (production, test)
Permitted activities:
02 Change
40 Create in DB
26
Activity 02 is relevant for modifying and saving the Result Set of a select command.
Activity 40 is relevant for moving the records of the Result Set to a different table.
Authorization Object ZSQL_CLSP
Contains the authorizations related to the usage of clause CLIENT SPECIFIED.
Authorization Fields:
ACTVT Activity
ZSQL_CTYPE Command Type
Permitted activities:
16 Execute
Authorization Object ZSQL_COL
Contains the authorizations which are used to control which fields of a table can be
displayed or edited.
Authorization Fields:
ACTVT
Activity
TABLE
Table Name
ZSQL_COL
Field Name
Permitted activities:
02
03
Change
Display
Execute
Generate
Predefined Roles
The aim of providing predefined roles is to ease the process of authorizing users for the
SQL Editor.
Note that both roles grant access to all SAP table groups. This might have to be adjusted,
as it allows to much freedom to the user.
Role ZSQL_USER
This role is a basic role for users with only read access to the SAP tables. Users with this
role can:
- Create, edit and execute Select statements on all SAP tables
- Create, edit and execute Select for all entries statements
- Create, edit and execute Loop at workbench statements (provided the user has the
S_DEVELOP authorization object from another role or profile)
Role ZSQL_DEVELOPER
The developer role allows even more activities than the user role. Users with this role can:
- Do everything that is included in the ZSQL_USER role (note that this role still does not
grant the S_DEVELOP authority object for security reasons)
- Create, edit and execute Update statements in non-production systems
- Create, edit and execute Delete statements in non-production systems
Import and export data to/from SAP tables
Edit and insert new entries into the result set
28
29