User Management: Analytic Privileges
In this document, I tried to explain “Analytic Privilege” functionality that comes under the User Management.
Note: Analytic Privileges can used only be activated once. If you need to change the Analytic Privilege after it has been successfully activated, you will have to delete it and re-create it from scratch.
In the following we are going to grant Analytic Privileges to user USER01 which will finally allow reporting off the Analytic and Calculation Views. We are restricting access to only Company Code ‘1000’.
1. Create an Analytical view under “purchasing” package.
- Right Click on Analytical View > New
2. Enter “AN_EKKO” for the name of the view
- Select EKKO as a table
- Click Finish
3. Save and Activate Analytical View
4. Create an Analytic Privilege under the same package “purchasing”
- Right Click on Analytic Privilege > New
5. Enter name AP_EKKO_BUKRS_1000
- Enter a description
- Click “Next”
6. Select the Analytic Views
- Click Add
- Click Finish
7. Implementing the privilege is now done in three steps:
1) Select further views for which this privilege should be valid (optional). We will not add further views in this step.
2) Select attributes on which a restriction shall be defined (All fields of all views selected in 1 will be offered)
3) Define value restrictions for the attributes selected in 2
8. Add the field “BUKRS” to the list of “Associated Attributes Restrictions”.
- Click the corresponding “Add” button
- Select field “BUKRS” from the presented field list
- Click “OK”
9. Define the value restriction for field “BUKRS”
- Click the “Add” button for “Assign Restrictions” (this increases the counter for the number of restrictions for BUKRS)
- Click into the “Value” field in “Assign Restrictions”. Click the “…”-icon.
- In the search window, search for Company Code 1000
- Select the Company Code from the search list
- Click OK
(Note: you could also have typed in the value directly, without opening the search window)
10. Save and Activate Analytic Privilege
Assign Analytic Privilege AP_EKKO_BUKRS_1000 to user USER01
For granting Analytic Privileges, there are two possibilities: via the User Editor in SAP HANA Studio; or via SQL statements.
11. Open the User Editor for user USER01 under Catalog > Authorization > Users
- In that Editor, switch to tab “Analytic Privileges”
12. Click the green “+”-icon
- In the search dialog, start typing “AP_EKKO_BUKRS_1000”
- From the list of “Matching items”, select privilege “purchasing/AP_EKKO_BUKRS_1000”
- Click “OK”
13. Save the user profile.
Verify that the user can read from Analytic View AN_EKKO
14. Right-click the Analytic View “AN_EKKO”
- Select “Data Preview” from the context menu.
15. Verify that the list contains only records with BUKRS = 1000
Hope it is helpful for all.