How to Navigate Within ABAP CDS Source Code and Between ABAP CDS Objects?
Hi ABAP community,
welcome back to one of my blogs!
In this blog, I will describe how to …
- navigate within ABAP CDS source code,
- come to another CDS/Dictionary object
- navigate within the ABAP CDS object you currently work on
… using ABAP development tools for Eclipse (ADT) a.k.a. ABAP in Eclipse.
Note: When I talk about objects, I mean CDS objects such as data definitions and/or relating ABAP Dictionary objects such as database tables, classic views and so on.
Now, lay back and check out the following possibilities:
Do you already know the Relation Explorer? It helps you to understand how objects are related to each other. In the context of ABAP CDS, related objects can be, for example CDS extend views and CDS metadata extensions.
To open it, you can choose, for example, Show In > Relation Explorer from the context menu in the editor or from the relevant object in the Project Explorer.
After execution, the Relation Explorer will be opened and displays the relating objects in a hierarchical way.
From here, you can select the relevant object and choose the relevant function from the context menu.
For more information, see the …
Results From the Where-Used List
The where-used search finds and visualizes the development objects that use a specific object in accordance to their dependencies.
To open it, you can choose, for example, Get Where-Used List from the context menu in the editor or from the relevant object in the Project Explorer. In addition, you can also use the Ctrl + Shift + G shortcut.
From here you can navigate to the used object(s) by clicking it.
Using F3 in the Source Code
To navigate to an object, field, or element, click F3 on the relevant occurrence, for example the name of the datasource …
… or on the name of the field/element.
Using Ctrl + Click
You can also use Ctrl + click for navigation.
For example, select the relevant CDS annotation and keep Ctrl pressed. Click then the underlined segment of the annotation. In a new editor, the CDS annotation will be opened.
The Outline view represents the structure of your object that is opened in the active editor. If you don’t know it; you can find the Outline on the left side under the Project Explorer or you can open it by choosing Window > Show View > Other… > Outline from the menu.
To navigate to the relevant field or element within your object, just click it in the tree. In the ABAP CDS source code, you can choose the supported ABAP CDS keywords, fields, or elements in order to skim through the outline.
The Dependency Analyzer evaluates the relationships and complexity from a CDS entity with regards to its SQL definition.
To open it, choose Open With > Dependency Analyzer from the context menu in the editor or from the relevant object in the Project Explorer.
SQL Dependency Tree
The SQL Dependency Tree displays SQL dependencies of a CDS view on other database objects.
To open the object, field or element in question, just double-click its name in the tree.
SQL Dependency Graph
The SQL Dependency Graph visualizes SQL dependencies between ABAP Dictionary objects and CDS views.
To open the object, field or element in question, just double-click its name in the graph.
Further Help Content
Do you know the ABAP CDS Development: Tools User Guide? It’s provided in your ADT client (Help > Help Contents from the menu) as well as online on the SAP Help Portal.
In this guide, you also find the following CDS content relating to navigation:
If you have some feedback or if you want to share your own tips & tricks to this subject, just leave me a comment. Let’s share our experience!
I look forward to hearing from you and wish you happy ABAP CDS coding!