Technical Articles
Identifying CDS views based on fields in S/4 HANA
In order to use a CDS view we need to know which the fields available are. If we know the CDS View you need to go to the SQL View to know the fields.
In SE11 we can’t directly see the CDS view, above image is an example for that.
In-order to get CDS views based on fields, this tool will help us to find CDS view based on fields.
We will be creating join conditions between 2 tables to achieve it.
- DDLDEPENDENCY – This table stores all the information about CDS views and their SQL views.
- DD03L – This has all the table fields stored in it.
I will be creating Quick view using SQVI transaction.
Enter Quick view name and click on create.
Enter Title.
Select datasource as Table join on Basis mode.
Insert 2 table names and have join conditions as shown above and click back.
Please add following fields
Below fields are used for selection criteria. Click on save, once completed.
Execute the tool which we just built.
I have given a field from FI which is AKONT (Reconciliation field)
Below are the CDS views based on AKONT field, choose as per your requirement and use accordingly.
Excellent utility..thanks for sharing
With code completition you get all fields of the structure!
Another easy way is to use Eclipse with ADT to view and edit CDS.
And if you haven't Eclipse try report RUTDDLSSHOW or RUTDDLSSHOW2.
It's more a "Where used thing". If you know a field and want to see in which CDS you can find it.
Hi Ashok,
still trx. SQVI? In S/4 HANA? What about creating CDS View?
Regards, Uladzislau
Yeah, that would also be a nice possibility!
Feel encouraged to share such a solution (a CDS view combining DDLDEPENDENCY + DD03L) with us!
best
Joachim
Hi ashok nannuri ,
Thanks for sharing!
At first I didn't know what you where going at.
(With your first screenshot showing SE11 with ACMTST_DDL_BP2 , my immediate thought (like Andrea Clöß already mentioned ) was: "well, we can go to AdT/Eclipse, alt+shift+a to open that object, and there we see the fields right there in the source)
But then I read the rest of your post.
Now I understand your idea to combine DDLDEPENDENCY + DD03L in a quick view.
And how you use it to answer questions like in your example given: what CDS-views do contain fields based on data element AKONT.
Very nice, I like it!
Best
Joachim
Nice blog, I wrote a blog to get the info through AMDP and table function
https://blogs.sap.com/2019/04/17/s4-hana-cds-view-field-information/
Thanks, good hint. I was so deep into thinking only of CDS and Eclipse that I missed that puzzle piece.
So just to complete the idea: This way you could also go by other DD0* tables. You could see which field using certain domains or having certain strings in description texts (etc,...) are used in CDS views.
Thank you!
Based on Ashoks suggestion, here is a CDS snippet for your copy paste convenience.
It is extended by Domname (which I usually heavily rely on) and the checktable. Searching for any of these gives you varying results.
Please note searching for domain enhances the result list compared to only checking for fieldnames:
Example usage:
I want to know which (standard) CDS View represents the table MVKE.
I pick one or more representativ fields from that table. Here I go with only MVKE-KONDM, especially its associated domain "KONDM".
Checking the Views I could narrow it down to I_ProductSalesDelivery.
I would love to have an easy way to search the CDS code, which is stored in DDDDLSRC-SOURCE but I think there is something to it. If I have the time, I'll try to build something to do a full text search over it or is this available already and I've just missed it?
Nice document. I was struggling to find the CDS view for SD condition record , combining 2 tables in S4Hana - A304 and KONP.
Thanks