SAP HANA Analytical Privileges

You apply analytical privileges when users act as values with certain combinations or dimension attributes

You can use analytic privileges to partition data among various users sharing the same data foundation

You can assign analytic privileges in two ways 

Privileges for selected content models

To define restrictions for a selected group of models.

For example You have defined restrictions on an attribute  CUSL ID that belongs to CUSTOMER attribute view

The restriction applies to all the selected content models that use this attribute view.

Privileges for All Content Models

To define restrictions for all content models across multiple packages that are specific to a user

For example - You have defined a restrictive on an attribute view customer that belongs to the Sales package and the user EMP

The restriction is applicable to all content models across multiple packages that use customer and that are specie to EMP.


Create Package

Right click on package and create new analytical privilege

Enter name

Select required information models


If you want to restrictors for all content models, sdut the ‘applicable to all content models’ checkbox

In Associated attribute restriction pave

Click on add


Select Required Attributes which you


Want apply restrictions

In Assign Restriction Pave

Click on Add

Select Operator (=, ≠, >=, etc)

You can choose values

Act orate

Inclined to build a profession as SAP HANA Developer? Then here is the blog post on SAP HANA Training Online


By default system will create procedures for script-based calendared view.

Even we can create customized procedure

Create package

Select package & Finish

In functional pave write a script for the function using data types.

  • Table / Scalar data type for input parameter
  • Activate

Create attribute view on single table

Create package, provide name

Language (Login language & Dur package language must be same)

Create new attribute view

Provide name

Select type of attribute

1) Standard attribute ------------------ new attribute

2) Time-based attribute ---------------- we can create attribute on “m-time – dimension” which is available “—sys—bio” catalogue

3) Copy-------------- It takes copy of already existed view

(We can change structure of view)

4) Derived --------- It takes copy of already existed view

(We cannot change structure of view)

  • Select standard type
  • Select requested table (ARTICLE COLOUR LOOKUP)

Will get DATA FOUNDATION,                        Save and output pave

In Data Foundation will get our selected table

Select co because from table right click on them select add as attribute

Will get those attribute under attributes folders in out opt pare

Select key attribute and make it as key attribute

We have calculated attributes to create custom calculated attribute to perform calculations on attributes which are available in attribute Forde

So that we took article id as key attribute

Category and sales price, family attributes under attribute folder

Create calculated attribute by right click on calculated attributes select new

Provide name, description

In key (tab) provide data type, length in expression pave provide required expression example left string (Category, 2)

And ok

In hierarchy pave click a crucible we

We can create two type of hierarchy

Level Based hierarchy

Here we can build hierarchy in level lose on object on which are available in attribute folder

Parent-child hierarchy

Here we can built hierarchy for key attribute in attribute folder here we can provide parcut for key attribute


Attribute table on multiple tables

Create new attribute view

Select two tables (article – lookup, article – color – lookup, join two tables with inner joins or outer joins

From the above procedure need to select attributes to make are of them as key attribute

Based on our requirement create new calculated attribute to perform calculations on attributes which are available in attribute folder

Create Hierarchies

Validate view

Activate view


Create analytical view a single/multiple tables

Create Package

Create Analytical view

Select required tables

Note:  We must have at least a fact table

Well get table in data foundation pave

If you select multiple tables, we need to join them with inner join / left outer join / right outer join / referential join/text join and provide cardinalities.

In output pave select private attributes & measures some tables in DATA FOUNDATION pane

We can create custom calculated attributes to perform calculations attributes which are available in private attributes, attributes views

Create custom calculated measures to perform calculations measures which are available in measures folders and here we have other tab currency tab for measures to provide currency/measure / (attributes)

If you don’t have attributes for currency/measure selecting “simple” is recommended

Create custom restricted measure by providing aggregation type and measure (available in measure folder)

Click an add restriction

Select parameter (attribute)

Select operator (=, >, <, ≥,≤, is null is not null)

Select values

There we can include values by selecting include click on

If you want exclude values deselect check values

Create custom variable to pass parameter dynamically at report level

Creating variable provides data type of attribute, length of attribute and type of attribute and selection type

(Single / interval / range)

Validate & activate


Create analytic view on tables & views

Create a new analytic view

Select required tables and attribute view

Follow above steps

Go to logic view will get DATA foundation table which contains objects which are available in output pare

Join data foundation with attribute views

Our selected attribute all appear in attribute views folds in output pare

Note:- We must join all attribute views with DATA FOUNDATION table

Validate & activate


Create Calculated view (Graphical type)

Create package

Create view calculated view

Select view type is graphical

Select required tables and select calculated view / Analytic views and attribute views

Join them with them in UNION, PROJECTION & UNION & JOIN

In UNION component map source fields and target fields and we will get output columns in output objects (classify them as attributes & measures)

For join, join two tables & select required columns from tables

They will be available in output structure and close them as attributes & measures

In projection, we can take columns for output and clarify them as attributes & measures.


Create script based Calculated view

Create package

Create new calculated view

Select view type is SQL Script

Will get three screens in 1st screen, delegate script and output component

In script component will write script

System provides three technical words

1)           Began / End      Untitled  Will write script between begin and end

2)           VAR-OUT         Untitled  Result of the Script

So VAR-OUT is same as output of

Script – view


Write script, based on script output components we need to create output parameters

Provide name, name of column, data type, lunge and scale

OK & Activate

Examples for script






“Net revenue”]);






“Net revenue” As “NETREV”]);

Script 2



(“-SYC-BIC” . “eim360 – shared / CEAI”,



“Net Revenue”]);

SQLA = CE_ Projection






“Net Revenue” AS “NETREV”])



(“_SYS_BIC” . “ eim360 – shared / CEPL”




“Net Revenue”])


( : SQLP – VIEW,





“Net Revenue”  AS “NETREV”]);


Var-out = CE_UNION _ALL  ( :SQL_A, : SQL _p);

Note:  All views stores under “_SYS_BIC” Catalog which is available for reporting.

For an In-depth knowledge on SAP HANA, click on below