cancel
Showing results for 
Search instead for 
Did you mean: 

API to get the Metadata of the HANA view

prasanna_prabhu2
Explorer

Hello Colleagues,

Is there any API available from the ABAP side which will return the Metadata(like field names and table names) of  the given  HANA view..?

Thanks in Advance

Prasanna.

Accepted Solutions (0)

Answers (2)

Answers (2)

amauryvanespen
Active Participant
0 Kudos

Hello

i would like to suggest other content because of dead link in the previous one.

please accept if you believe it's insightful

there is another blog post here : https://blogs.sap.com/2016/09/16/how-to-found-dependent-database-object-in-sap-hana-modeling-object-...

external useful insight here : https://www.kodyaz.com/sap-abap/hana-database-object-definition-for-sqlscript-ddl-create-statement.a...

Regards

Amaury

Former Member
0 Kudos

Whether from ABAP, Java or any other environment you would want to query HANA monitoring tables/views for this information.

I'd recommend looking through this guide to see which would be fit your needs: http://help.sap.com/hana/html/monitor_views.html

You can also get the actual definition of objects in HANA via the stored procedure GET_OBJECT_DEFINITION(<SCHEMA>, <OBJECT_NAME>)

Cheers,

Jody

prasanna_prabhu2
Explorer
0 Kudos

Hi Jodi,

Thanks a lot for the quick response.

We are looking for an ABAP API, which will give the metadata of the any HANA view it may be attribute view, calculation view or analytic view..

Regards

Prasanna.

former_member184768
Active Contributor
0 Kudos

Hi Prasanna,

I don't think currently there are any ABAP APIs which can provide you the information you are looking for. As a matter of fact, there are no tables / views which contain the information of the fields and tables used in the HANA views. There are metadata tables for the Database objects (like database tables, views) or metadata tables for the HANA view which provide information about data types or which view is being referred etc, but not exactly what you need. You can get some information from _SYS_REPO schema objects like ACTIVE_OBJECTCROSSREF, but again it may not be sufficient.

In this case, you will have to write ABAP program which can connect to the HANA database and get the information.

Most of the HANA views information is maintained in JSON / XML format, which you can read and parse to get the information you require.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

I am also a question which is also similar  with this .

I have created a graphical calculation view,which is running sucessfully.

Example :-

table1, table2 -- > join_1 ( table1.id =table2.id) --> projection_1 -> Aggregation -- > Output.

At 'projection_1' , I have renamed few columns ( given user friendly name )

Example : - Table1.EmpNo renamed to EmployeeNumber.

            Table2.DeptNo renamed to DepartmentNumber.

My question is :- 

which system view ,can give me the entire list of the all attributes/measuers of that calculation view?

Note :- I have check M_CE_CALCVIEW_DEPENDENCIES view , but didn't get the results which I am looking for. 

Regards

Sayan

former_member182302
Active Contributor
0 Kudos

Hi Sayan Paul,

You may want to have a look on the table "VIEW_COLUMNS"

select distinct column_name FROM VIEW_COLUMNS

where view_name = <here supply the view name under SYS_BIC schema which you want to check>

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Sayan Paul,

There is a table as BIMC_DIMENSION in SAP HANA which gives you all the attributes and measures in a view. The query is:

select * from "_SYS_BI"."BIMC_DIMENSIONS" where cube_name = <AV/CV Name>

Kindly let know if this helped.

Regards,

Anjali.

Former Member
0 Kudos

Thanks a lot Anjali. Yes this is what which i was looking for. Thank YOU once again .

amauryvanespen
Active Participant
0 Kudos