Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Parametrized ABAP CDS view

0 Kudos

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.

1 ACCEPTED SOLUTION

UweFetzer_se38
Active Contributor
0 Kudos

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)

4 REPLIES 4

UweFetzer_se38
Active Contributor
0 Kudos

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)

0 Kudos

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?

0 Kudos

Exactly, there is no equivalent to CDS views with parameters in HANA.

dmitry_kuznetsov1
Active Participant

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