Here’s a scenario for SAP developers: You are given a CDS view tech name, but you don’t know which ABAP package to which it belongs. When you find the root package, it is helpful as you may end up creating more CDS views in the same package. It also helps to explore what other CDS views have already been created.

Does finding a root ABAP package for a CDS View sound useful for you? In this blog, we’ll explain how to do this in a step-by-step way.

How to Find the Root Package of a CDS view

  • Logon to ABAP ADT perspective in Eclipse

How to find Root Package CDS view ABAP SAP

  • Hit Control+Shift+A and paste the Tech name of the CDS view you are looking for. In my case, I am looking at DEMO_CDS_ASSOC.

SAP ABAP

  • As you notice, on the left-hand pane, you won’t see the ABAP package, although you see the definition of CDS view on right pane.

How to find Root Package CDS view ABAP SAP

  • Go to SE11 and give the SQL View Tech name and navigate to Attributes tab and you would find the Package.

  • The above step would only give you half of the details as you still need to find the Root Package. For more, double-click on the Package- SABAPDEMOS and go to Package Hierarchy. You would now notice the actual root package which is S_NWDEMOS_BASIS

How to find Root Package CDS view ABAP SAP

  • Go back to Eclipse ABAP perspective and navigate to S_NWDEMO_BASIS to find the SABAPDEMOS package you are looking for.

How to find Root Package CDS view ABAP SAP

Quick Tip: If you find above process cumbersome to find the root package, go to Table TDEVC and the field PARENTCL (Superpackage) would give you the Super Package or the root node you are looking for.

Keep Going

Now that you’ve gone through this step-by-step guide to find the root package of a CDS view, you are ready to either create more CDS views from your existing root ABAP packages, or you can check to see which CDS views have already been created.