3 Ways to Find ABAP CDS Views Examples and Demos by SAP

Here are three ways to find ABAP CDS Views examples and demos provided by SAP.

SAP’s implementations offer valuable guidance on their approaches and the best practices they advocate.

However, locating meaningful ABAP CDS View demos or examples in R/3, ECC, or S/4HANA systems can be challenging.

So if you want to know how to find ABAP CDS Views within your SAP system, then this article is for you.

Let’s get started!

3 Methods to locate ABAP CDS Views implemented by SAP for orientation

First, besides ABAP CDS Views, there are also HANA CDS Views. This article is about ABAP CDS Views.

You can find HANA CDS Views in the HANA XSA (Extended Application Services Advanced).

Let’s kick things-off with way #1!

#1 ABAP CDS Views demo package in an R/3, ECC, or S/4HANA system

Good news, everyone!

SAP provides an ABAP CDS Views demo package full of tasty ABAP CDS demo files.

The demo package is called SABAPDEMOS, and you can find it either in the transaction SE80 or in Eclipse.

It’s available in every system that runs at least ABAP 7.40 SP05.

Depending on your ABAP version, there might be more or fewer demo files in the SABAPDEMOS package because SAP keeps adding new files.

Whenever ABAP was updated and CDS Views got new features, the package grew.

Anyway, here’s how to get the demo package:

In Eclipse, open the ABAP Development Object Dialog by pressing CTRL + SHIFT + A (CMD + SHIFT + A) or through the menu:

Navigate > Open ABAP Development Object.

Once the dialog is open, enter in the search field SAPABAPDEMOS.

Now you should see the SABAPDEMOS package.

Just double-click it to open it.

But be careful with the naming conventions of these files.

The naming conventions of many files in the demo package do not match the naming conventions of SAP for CDS Views, such as:

  • Starting Basic and Composite CDS Views with an I_.
  • Starting Consumption CDS Views with a C_.

Who knows why—do you, or do you have a guess? (leave a comment)

Anyway, depending on the ABAP version you have (remember you need at least 7.40 SP05), you might find these files.

  • ABAP CDS Views with different types of joins, union, and associations
  • ABAP CDS View with currency and unit conversion
  • ABAP CDS Views with parameters
  • ABAP CDS Views with SQL functions
  • ABAP CDS Views with different annotations
  • ABAP CDS Views with extensions
  • ABAP CDS Views with table functions
  • ABAP CDS Views with authorization checks
  • Table functions
  • Access Controls (Authorization checks)

Pretty nice, isn’t it?

By the way, see here for the difference between ABAP CDS Views and ABAP Dictionary Views.

#2 Fiori Standard Apps OData Services in an S/4HANA system

SAP Fiori standard apps and their OData services are either already installed or you can install them in an S/4HANA system.

The OData services are generated by CDS Views.

Therefore, these CDS Views exist in the S/4HANA system.

Here is how you can find them:

  1. Go to the SAP Fiori Apps Library.
  2. Navigate in the left menu: All apps for SAP S/4HANA > All apps.
  3. Select one of the applications in the list on the left—for example, the application Change Process Analysis for Business Partner.
  4. On the detail view of the application, select IMPLEMENTATION INFORMATIONS in the tab bar.
  5. Expand the Configuration panel.
  6. Get the name of the OData service under OData Service(s). For example, the OData service of the application Change Process Analysis for Business Partner is called MDC_PROC_BP_ALP_SRV.
  7. Copy the name of the OData service without the _SRV at the end. For example, from MDC_PROC_BP_ALP_SRV copy just MDC_PROC_BP_ALP.
  8. Go to the transaction SEGW in your S/4HANA system.
  9. Click on Open Project.
  10. Paste the OData service name without the _SRV of the Fiori standard application.
  11. Select the project and open it.
  12. Open the project in the SEGW navigator on the left.
  13. Open in the project the folders Data Model > Data Source References > CDS-Entity Exposures > Entity Types.
  14. Here you see the names of the ABAP CDS Views associated with this OData service. For example, an entity of the OData service MDC_PROC_BP_ALP of the application Change Process Analysis for Business Partner is C_MDBusPartChangeProcessType.
  15. Copy an entity, and therefore ABAP CDS View name and go to Eclipse.
  16. Press CTRL + SHIFT + A or go to Navigate > Open ABAP Development Object… in the top menu of Eclipse.
  17. Paste the entity name into the input field of the Open ABAP Development Object dialog. For example, C_MDBusPartChangeProcessType.
  18. Remove the Type from the entity name to get the ABAP CDS View name. For example, change C_MDBusPartChangeProcessType to C_MDBusPartChangeProcess.
  19. Open the ABAP CDS View.

#3 Eclipse ABAP Development Object Type Search in an SAP R/3, SAP ECC, or SAP S/4HANA System

S/4HANA comes with a bunch of CDS Views.

Here’s how to find them:

  1. Open Eclipse.
  2. Press CTRL + SHIFT + A (CMD + SHIFT + A) or navigate in the top menu to Navigate > Open ABAP Development Object…
  3. Enter in the Open ABAP Development Object input field any string and type:ddls. For example, I* type:ddls. Use type:dcls for access controls.
  4. Now you see all ABAP CDS Views which names are starting with an I in the result list. You can use in good old SAP manner the * in the search query. For those who don’t know the * yet: the * is a wildcard character.
  5. Go through the result list and open an ABAP CDS View which sounds interesting.
  6. Bonus tip: SAP does not continuously stick to it with their implementations, but the naming conventions for ABAP CDS Views are that Basic and Composite CDS Views start with an I_ and that Consumption CDS Views start with a C_. Therefore, a search for I_* type:ddls results in a search for Basic and Composite CDS Views and a search for C_* type:ddls results in a search for Consumption CDS Views.

2 thoughts on “3 Ways to Find ABAP CDS Views Examples and Demos by SAP”

  1. Hi,

    Thank you very much for sharing. This is very helpful.
    Your tips work for me, except that it seems that I have to remove the ‘Type’ suffix from the end of the Entity Type name in transactoin SEGW.
    E.g. SEGW project CPD_MASTERPROJECT_OVERVIEW:
    Entity Type = C_MDBusPartChangeProcessType –> CDS view = C_MDBusPartChangeProcess

    Kind regards.

    Reply

Leave a Reply to James Cancel reply