• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Analytical Privileges in SAP HANA

SAP HANA Analytical Privileges

You apply analytical privileges when users acts 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 a restrictions on an attribute  CUSL ID that belongs to CUSTOMER attribute view

The restriction is applicable 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.

Procedure

Create Package

Right click on package and create new analytical privilege

Enter name

Select required information models

Finish

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

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 (=, ≠, >=, ect)

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

Procedures

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 an crucible we

We can create two type of hierarchy

Level Based hierarchy

Here we can built 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

Scenario

Attribute table on multiple table

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

Scenario 

Create analytical view an single / multiple table

Create Package

Create Analytical view

Select required tables

Note:  We must have at least an fact table

Well get table in data foundation pave

If you select multiple table 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 FOUNDATAION pane

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

Create custom calculated measures to perform calculations an 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 bon

If you want exclude values deselect check values

Create custom variable to pass parameter dynamically at report level

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

(Single / interval / range)

Validate & activate

Scenario

Create analytic view on tables & views

Create a new analytic view

Select required tables and attribute view

Follow above steps

Go to logic view pare 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

Scenario

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 available in output structure and closely them as attributes & measures

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

Scenario

Create script based Calculated view

Create package

Create new calculated view

Select view type is SQL Script

Will get three screen 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

Screenshot_45

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

SQLA – VIEW – CE – OLAP – VIEW

(“—SYS—BIC”. “EIM360-SHARED/CEAS”,

[“MATNR”,

“PERIO”,

“VKORG”

“Net revenue”]);

Var—out = CE – PROJECTION

(: SQLA-VIEW,

[“MATNR”

“PERIO”

“VKORG”

“Net revenue” As “NETREV”]);

Script 2

/*Actual*/

SQLA – VIEW = CE – CVAP – VIEW

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

[“MATNR”,

“PERIO”

“Net Revenue”]);

SQLA = CE_ Projection

( :SQLA-VIEW,

[“MATNR”,

“PERIO”,

“VKORG”,

CE – CALC (‘O’, NVARCHAR (1) ) AS KPLIKZ

“Net Revenue” AS “NETREV”])

/*PLANNED*/

SQLP – VIEW = CE_OLAP_VIEW

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

[“MATNR”

“PEABL”

“VKORU”

“Net Revenue”])

SQL_P = CE _ PREOJECTION

( : SQLP – VIEW,

[“MATNR”,

“PERBL” AS “PERIO”,

“VKORG”

CE – CALEC ‘1’ , NVARCHAR (1) ) AS KPLLK2,

“Net Revenue”  AS “NETREV”]);

/*Union*/

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

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

For an Indepth knowledge on SAP HANA, click on below

Summary
Review Date
Reviewed Item
Analytical Privileges in SAP HANA
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Analytical Privileges in SAP HANA"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.