Showing results for 
Search instead for 
Did you mean: 

Consume a calculation view cross HDI-container

0 Kudos


I've followed the video regarding cross containers in the same space (∈dex=80), but this is all about tables. What I want to accomplish is to use a calculation view which is build in another HDI container.

I've setup a role for schema-objects with SELECT option, but I still get an 'not authorized' error on the OO schema. Please some advise on this one. Thanx.

Accepted Solutions (0)

Answers (1)

Answers (1)

Developer Advocate
Developer Advocate
0 Kudos

I have a sample application here that exposes a Calculation view from one HDI Container to another.
user_db is the HDI container that contains the Calculation View. I added an Analytic Privilege to the Calculation View.
hana-opensap-cloud-2020/USER_PRIV.hdbanalyticprivilege at main · SAP-samples/hana-opensap-cloud-2020...

I then a role in the source HDI Container that is used in the setup of the "foreign" container. Notice that the privileges have the with grant option. This is necessary to give the technical users of the foreign container the access they need to the calculation view.
hana-opensap-cloud-2020/userOwner.hdbrole at main · SAP-samples/hana-opensap-cloud-2020 (
Also notice that the role name must end in a # symbol since it contains with grant option.

The consuming/foreign container then has an hdbgrant that gives this role to the object owner.

hana-opensap-cloud-2020/user.hdbgrants at main · SAP-samples/hana-opensap-cloud-2020 (

Hopefully this example helps with your situation.

0 Kudos

Hello Thomas,

Thanks for the answer, it really helps. I followed the steps but was not able to understand why we need the Analytic Privilege. I was able to access calc view in the target container without adding it to the AP which was created in the Source. Steps followed ;

1) Create View in Source

2) Create Role in Source

3) Create HDBGRANTS in target and assign the roles

4) Create SYNONYM for the source calc view in target

Can you please suggest if there is something i missed.