ABAP Tips: Find the Root Package of a CDS View
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.
Related: How to Extend a CDS View with ABAP
How to Find the Root Package of a CDS view
- Logon to ABAP ADT perspective in Eclipse
- 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.
- 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.
- 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
- Go back to Eclipse ABAP perspective and navigate to S_NWDEMO_BASIS to find the SABAPDEMOS package you are looking for.
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.
Find More SAP Tips
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.
Looking for other advice on running SAP? We also have more tips on how to optimize your SAP system for your organization’s needs, including How to Send an Email Alert when and XS Job Fails, New vs. Old ABAP Table Summarizing, and Dynamic Selection Screen with ALV IDA and Excel.Continue to follow Rizing for more SAP tips this week and beyond, and contact us for any questions about your SAP system.