There are three ways to find a CDS view:
- From the data source name
- By name
- Using a custom ABAP code
1. From the Data Source Name:
For the sake of this tutorial, we will search for the name of the CDS ‘ZTEST’
- Log into the SAP GUI
- Open the ABAP Dictionary screen using the SE11 TCode
- In the View tab, enter the name of the table
- Navigate to the ‘Where-Used List’ tab in the menu bar
- Then click ‘Search for Views’
- Deselect all the checkboxes except the DDL Definitions
- Click Continue
On the next page, you should have the list of data sources for the view. Double-click and navigate to the CDS view.
- You can also use the ‘Where-Used List’ in Eclipse
- Highlight the name of the CDS view in your DDL definition. Then click the ‘Where-used List’ tab.
- A tab will open showing the Data Sources connected to the view
2. Finding CDS Views By Name:
- Click the ‘Open ABAP Development Object’ or press the CTRL+SHIFT+A simultaneously to spring up the development object search box.
- Enter the object name you want to search for (Usually starts with a Z for custom CDSs)
- Search for Z* to get a list of all the custom objects in the system.
- To filter your search, add “type:ddls” to specify and restrict your search to specific DDLs source files (CDS Views and Table functions).
- Locate the matching item and double-click to open it.
- You can also type “type:ddls” into the field to get all the DDLs in the system.
3. Using a custom ABAP code:
This is particularly useful if you want to get the list of all the CDS views that used a table. You can write a custom ABAP code that accepts a table name as an input and prints out the list of views that used a particular. The name of the custom code I will use is ZCDS_VIEW
- Go to the ABAP Editor screen using the SE38 Tcode.
- Write the name of the program you want to run - ZCDS_VIEW.
- Execute
- On the new screen, enter Table Name – MBEW - and execute
- The output gives you the list of CDS views connected to the table.