Skip to Content

Hello Everyone,


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’.

Procedure:

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.

Happy Reading!

Regards,

Neha Singla

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. anil sasidharan

    Hi Neha,

    The post is pretty good. I have a query regarding the assignment.

    I tried to assign the analytic privilege using the id that created it. But it gave me authorization error. I could assign only using SYSTEM and it shows the grantor as _SYS_REPO.

    Any thoughts on this ?

    Regards,

    Anil Sasidharan

    (0) 
  2. Renu Swadesh

    Hi Neha,

    really good blog..will you please share if you have any SQL script screen shots..? pls cover almost all important topics in that..

    Some times iam unable to login even am givin curect user name and pass word..please give me your any other mail id to discuss queries in HANA..

    Thanks in Advance,

    With Regards,

    Renu

    (0) 
  3. SASANK S

    Hi neha,

    could you pls answer the below question?

    Which Security setting can you apply in analytic privilege?

    Note : There are 2 correct answer to this question

    a. Restrict access within an analytic view using measure values

    b. Restrict access within an analytic view using attribute values

    c. Grant access to analytic view

    d. Restrict access to analytic view

    regards,

    shashi

    (0) 
    1. Raj K

      Hi Shashi,

      This is a certification question. Answer is b and d.

      In the above example, Neha Restricted access using attibute “BUKRS” which is restricted to Analytic view “AN_EKKO”.

      Please send your email ID.

      Regards

      Raj

      (0) 
      1. Benedict Venmani Felix

        Hi Raj,

        Shouldnt the answers be B and D? Reason being, we cannot restrict access to a view explicitly using analytic privilege. We can only grant access to a view using analytic privilege.

        (0) 
  4. Lars Breddemann

    Hi Neha,

    good write up with the screen shots and the example.

    As a hint: SAP HANA is a pretty quick moving target, so it’s usually a good idea to include the SPS version or the revision number in anything you describe.

    You know, stuff might will be changed in new versions…

    Also, what’s very useful is to link to the official documentation when describing features and functions. That way your readers have a reference manual in reach as well.

    Now, let’s keep those blog posts coming!

    – Lars

    (0) 

Leave a Reply