12-24-2020 2:39 AM
Hello:
Given a table name. Is there a method to check whether it's a table or a CDS view and get a list of its all fields including alias? Thx.
I find a FM DP_GET_FIELDS_FROM_TABLE which can get all fields. But it use the SQL view name not the CDS name. So suppose given a SQL clause , how to first get the SQL view name of it then get the fields list.
12-24-2020 2:56 AM
Hi loki_luo15
I dont think if method is their or not, There is some standards we have to following for creating the CDS view, you already have an idea How we declare the basic view, interface view and as well as composite view.
Regards,
kiran
12-24-2020 5:23 AM
The below link should be useful to you.
https://wiki.scn.sap.com/wiki/display/BI/CDS+Views%3A+Tools+and+Tables
The below video should also help you quite a bit
Also refer the attached document
Thanks & Regards
12-24-2020 2:48 PM
Check if the view is in table DDLDEPENDENCY. Fields in DD03L, I think.
If in doubt, do and SQL trace (ST05), and then look at what you know is a CDS view in SE11. Then look at the trace and see which tables are hit.
12-28-2020 2:02 PM
Use table DDLDEPENDENCY, it maintains relationship between the CDS core entity and automatically generated database view as below.