SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

Find ABAP CDS View Name using DDL Source Name on SAP


Let's assume ABAP developer has created a CDS View named "Z_SOM_CUST_V" in the ABAP dictionary using SAP HANA Studio. Any developer can use SE11 and search for the CDS view by typing the CDS View name. To open CDS view on SE11 ABAP Dictionary screen by only knowing the DDL Source name, programmer can use DDL Source name to query DDLDependency SAP table for CDS View name.


search for a CDS view on ABAP Dictionary

If ABAP programmer checks the attributes of the CDS View, DDL SQL View name and DDL Source name takes the attention.

SAP CDS View and DDL Source name in ABAP Dictionary transaction screen

If you double click on the DDL Source textbox, you can see the source code of the CDS view.

DDL Source code of a CDS View

Using SE11 transaction code, it is not possible to display CDS view definition using the DDL Source name.
The ABAP user has to know the view name.

So for ABAP developers or SAP users who know the DDL Source name but don't know the corresponding CDS View name, it is difficult to find and display the view contents on SE11 ABAP Dictionary transaction.
So the question is that: How to display CDS view using its DDL Source name?
Or how can you display CDS view definition on SAP GUI using SE11 without view name?

To find the answer for these questions might take some time if you don't know where to look at.

SAP table DDLDEPENDENCY "DD: Objects in a DDL Source" stores object dependencies related with DDL sources.
DDLNAME field is used for the bame of a DDL Source
OBJECTNAME field is used for the name of the ABAP Dictionary object, or the CDS View name we are looking for.

ABAP table for CDS view and DDL Source relation

If you query the database table DDLDEPENDENCY using the DDL Source name by filtering for it on DDLNAME column, as seen in below screenshot, the row with OBJECTTYPE is equal to VIEW returns the CDS View name in OBJECTNAME column.

find CDS view name using DDL Source name on SAP GUI

Now the SAP user or the ABAP programmer can use this OBJECTNAME on SE11 transaction to find the ABAP Dictionary Object and display its details.

Following ABAP code can be also used to query

data I_DDLNAME type DDLNAME.
data E_OBJECTNAME type E_OBJECTNAME.

select single objectname into e_objectname
from ddldependency
where ddlname = e_objectname and
 objecttype = 'VIEW'.
Code


SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.