08-29-2019 9:30 AM
We created an ABAP CDS view with input parameters using ADT. When we tried to locate this on the Hana DB, we did not find it under views but rather under table functions.
Upon opening the table function we realized this CDS is persisted a table function definition in Hana dB and not as a view. Why is this?
Secondly if I assign object privileges to this table function, why do they get reset when I regenerate/activate the CDS? Is there a way to retain the granted privileges?
Thanks for the answers.
08-30-2019 1:48 PM
You should ignore all objects which are created on the database level. ABAP CDS views are ment to be used only within ABAP itself. If you want to grant privileges for these views, you have to use DCL (Data Control Language)
08-30-2019 1:48 PM
You should ignore all objects which are created on the database level. ABAP CDS views are ment to be used only within ABAP itself. If you want to grant privileges for these views, you have to use DCL (Data Control Language)
08-30-2019 1:57 PM
Agreed Uwe. But there have been instances when we investigate performance issues on CDS views and it helps greatly to understand how they are executed /persisted on the Hana dB.
It is more of an understanding of how these CDS views are created by HANa. So why do parameterized cds views have corresponding sql views but exist as function definitions?is it simply because there is no way to incorporate parameter definition in the sql view?
08-30-2019 3:29 PM
Exactly, there is no equivalent to CDS views with parameters in HANA.
09-09-2019 11:42 AM
Hi,
One little thing I can add. You don't have to dig in HANA DB itself, you can also see what is happening directly from DDL Editor by clicking "Show SQL Create Statement".
In case of no parameters it creates a view, in case of parameters - a function
Have fun exploring.
_________________
Dmitry Kuznetsov
BI Consulting