Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Where used functionality for ABAP CDS views?

eddy_declercq
Active Contributor
22,420

Hi,

Is there a way to have a where used functionality for ABAP CDS views, eg in which other CDS views, ABAP programs, classes, ... is a certain ABAP CDS view reused?

This in order to find out what the impact will be if a certain change is done in a ABAP CDS.

Cheers

Eddy

Hi,

Is there a way to have a where used functionality for ABAP CDS views, eg in which other CDS views, ABAP programs, classes, ... is a certain ABAP CDS view reused?

This in order to find out what the impact will be if a certain change is done in a ABAP CDS.

Cheers

Eddy

19 REPLIES 19
Read only

Sathya_Gunasekaran
Contributor
13,259

Right click on the view name ( the one after the define view statement) and choose get where used list...

Read only

eddy_declercq
Active Contributor
13,259

Hi,

I've already tried that, but I'm getting the message "Where-used is not supported at this position. Select a supported object and perform the search again".

Cheers

Eddy

Read only

nabhish_saxena
Product and Topic Expert
Product and Topic Expert
13,259

Hi Eddy,

In t-code SDDLAR (CDS Analysis and Repair Tools) in backend ABAP system, you can find other ABAP CDS views consuming the current view based on name.


Choose option 'Display DDL Source' and click on 'Analyze' button.
In the 'Regular Expression (partial match)' section, provide the name of ABAP CDS for which you want to do where used and check the 'Ignore Case' flag.
Click Execute.

It will scan through the other ABAP CDS views to find the name of the searched view in their code.
Since this is a code scan of the ABAP CDS, it might also return some additional results based on usage of name as regular expression.

-Nabhish

Read only

13,259

thomasfiedler Is there anything planned for the future? I'm still missing that feature (where-used list for DDL Sources/CDS Views) in the latest S/4HANA Release and the latest ADT Version.

Best regards, Thomas

Read only

0 Likes
13,190

Thanks! Screenshots of SDDLAR to help people (S/4HANA 2023 ABAP 7.58).

Sandra_Rossi_1-1706901819404.png

F8

Sandra_Rossi_3-1706903018833.png

F8 (wait for a few minutes, a long list may be displayed)

Sandra_Rossi_2-1706902999481.png

 

Read only

0 Likes
10,533

Is there a cloud equivalent of this transaction? This solution won't work when transactions are no longer available.

Read only

Bogdan7
Explorer
13,259

Although CDS views themselves are very powerful feature then lack of 'where-used' functionality in Eclipse makes my life more difficult :-(. Hopefully it will be implemented in the new upcoming versions. Best regards Bogdan

Read only

PH
Participant
13,259

Hello,

I found out that it worked for me, if i right-click on the CDS view in the outline view and select "Get Where-used List".

Regards,

Philipp

Read only

0 Likes
13,259

Thanks Philipp it works for me as well!

Read only

0 Likes
13,260

This worked! Thanks Philipp!

Read only

DmitryKuznetsov
Product and Topic Expert
Product and Topic Expert
13,260

Eddy, you need to right-click on a CDS View definition in the code editor, not the DDL source file in Project Explorer! I still bounce into the same thing after 3 years myself 😉

Cheers,

Dmitry Kuznetsov

BI Consulting

https://www.linkedin.com/comm/mynetwork/discovery-see-all?usecase=PEOPLE_FOLLOWS&followMember=daqze
Read only

Sandra_Rossi
Active Contributor
0 Likes
13,181

It doesn't work i.e. it doesn't find the CDS views which use a given CDS view (that was the question). Test done in S/4HANA 2023, ABAP 7.58.

Example with I_TextObjectPlainLongText, it doesn't find A_EquipmentLongText and many other CDS views:

Sandra_Rossi_4-1706903394026.png

 

Read only

0 Likes
9,476

@Sandra_Rossi : Did you find a solution on this? I can even see less entries than you. It looks to me, that eclipse filters the object types that are displayed. But I don't know how to enhance this. 

Read only

9,464

Do you mean the solution provided here by an SAP employee doesn't work for you? What did you try? What is your issue? Please post a question (here, it was just a discussion).

Read only

0 Likes
9,412
Read only

shanthi_bhaskar
Active Contributor
0 Likes
13,260
Read only

13,260

Where used list is working when right click the CDS entity name in definition. But it doesn't show the roles / access controls for that CDS view. How can i find the role / access control for any CDS view?

Read only

0 Likes
13,171

Almost good, but it doesn't work well:

It doesn't seem to extract all CDS views, e.g. S/4HANA 2023, running with "Object Flow Up" and CDS View I_TEXTOBJECTPLAINLONGTEXT, it doesn't find A_EQUIPMENTLONGTEXT.

By running the transaction code SDDLAR, I get the correct result. See more in this post: Re: Where used functionality for ABAP CDS views? - SAP Community.

 

Read only

g_horn
Explorer
13,260

Table DDDDLSRC holds all the source code of your CDS views. We commonly use TVARVC variables and before we make changes to these variables (because multiple programs and/or CDS views may use the same variables) we scan our ABAP and our CDS views.

  • Transaction CODE_SCANNER or program RS_ABAP_SOURCE_SCAN to search code
  • Table DDDDLSRC to scan CDS view source code. The below SQL will find all the custom CDS views that contain the string 'ZWF_INV_ICON_AGENT'
select ddlname
from ddddlsrc
where ddlname like 'Z%'
and source like '%ZWF_INV_ICON_AGENT%'