28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The <strong>SAP</strong> <strong>HANA</strong> modeler automatically implements this specification if you do not select either an attribute<br />

restriction or a value filter. However, if you create the analytic privilege using SQL, you must make the<br />

specification manually.<br />

Example 1:<br />

<br />

<br />

<br />

Example 2:<br />

<br />

<br />

<br />

<br />

<br />

Logical Combination of Restrictions and Filter Conditions<br />

The result of user queries on restricted views is filtered according to the conditions specified by the analytic<br />

privileges granted to the user as follows:<br />

● Multiple analytic privileges are combined with the logical operator OR.<br />

● Within one analytic privilege, all attribute restrictions are combined with the logical operator AND.<br />

● Within one attribute restriction, all value filters on the attribute are combined with the logical operator OR.<br />

You create two analytic privileges AP1 and AP2. AP1 has the following attribute restrictions:<br />

● Restriction R11 restricting the attribute Year with the value filters (EQ 2006) and (BT 2008,<br />

2010)<br />

● Restriction R12 restricting the attribute Country with the value filter (IN ("USA", "Germany"))<br />

Given that multiple value filters are combined with the logical operator OR and multiple attribute<br />

restrictions are combined with the logical operator AND, AP1 generates the condition:<br />

((Year = 2006) OR (Year BT 2008 and 2010)) AND (Country IN ("USA",<br />

"Germany"))<br />

AP2 has the following restriction:<br />

Restriction R21 restricting the attribute Country with the value filter (EQ "France")<br />

AP2 generates the condition:<br />

(Country = "France")<br />

Any query of a user who has been granted both AP1 and AP2 will therefore be appended with the following<br />

WHERE clause:<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up Roles and Authorizations<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 335

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!