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: 

How to Figure Type of HANA View in ABAP?

kakshat
Advisor
Advisor
0 Kudos

Hi,

Is there a way in ABAP to find out (by looking up some table or calling an FM/method) the type of a HANA view? I have an ABAP system that has a HANA database. Views of different types (calculation, attribute, analytic) have been created in HANA. In my ABAP code, I have the name of the view from which I want to find out the type of the view. Any ideas?

Thanks,

Akshat

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can query on table "_SYS_REPO"."ACTIVE_OBJECT" to get to know the type of views.

Same view name can be used in different packages. To point to the correct view of the required package, use the PACKAGE_ID attribute to filter the result in your query

Example :

SELECT OBJECT_NAME, OBJECT_SUFFIX

FROM "_SYS_REPO"."ACTIVE_OBJECT"

WHERE OBJECT_NAME = 'VIEW_NAME' AND

               PACKAGE_ID = 'PACKAGE_NAME'

4 REPLIES 4

Former Member
0 Kudos

You can query on table "_SYS_REPO"."ACTIVE_OBJECT" to get to know the type of views.

Same view name can be used in different packages. To point to the correct view of the required package, use the PACKAGE_ID attribute to filter the result in your query

Example :

SELECT OBJECT_NAME, OBJECT_SUFFIX

FROM "_SYS_REPO"."ACTIVE_OBJECT"

WHERE OBJECT_NAME = 'VIEW_NAME' AND

               PACKAGE_ID = 'PACKAGE_NAME'

0 Kudos

Thanks for your inputs Varun. Like I mentioned, I want this information on the ABAP side. Do you know if there is a corresponding table on the ABAP (viewable in SE11) side? Else, I will probably have to make use of ADBC or something.

jasmin_gruschke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Kumar,

why would you need to know at all?

Anyways, you would have to know the name of the corresponding HANA entity. That is displayed when you open the external view in the ABAP Development Tools in Eclipse.

Additionally, you would have to know to which HANA Transport Container the HANA view belongs, have a look at the HTC (in the ABAP Development Tools in Eclipse). There are two tabs "Overview" and "Content". On the "Content" tab, you can find a list including package, name, and the type information you are looking for.

Cheers,
  Jasmin

0 Kudos

Hi

I want to figure this out inside an ABAP class' method. Basically, there is a Customizing in the system that stores the name of the HANA view, but not its type. The method I alluded to knows the name of the view. We are trying to do an enhancement and would like to add a check based on the type of the view. That is the reason we need this information.

Cheers,
Akshat