Skip to Content
Technical Articles
Author's profile photo Subrahmanyam Potturi

Implementation of CDS Extensibility for S/4 HANA


Extensibility allows customers to adopt standard business software to their business requirement and it offers more convenience for customers in their end to end scenarios.

To achieve this we need to prepare suitable extension points by defining corresponding DDIC artefacts, registering extension options and preparing application code for dealing with the extended structures at runtime. It is applicable for both on-premise and cloud customers.

The following entities can be extended.

  1. CDS Views
  2. Screens
  3. Reports
  4. Email and form templates
  5. BAdi Implementations

In this blog, we will see how to implement CDS Extensibilty.

Advantages of CDS Extensibility

  • Custom fields can be extended along with SAP standard fields.
  • Enables to add the association of custom field extend CDS view with standard extensible CDS view.
  • Possible to extend unions and views with aggregations.

Scenario: For On-Premise customers, they can extend any standard CDS views by using backend tools like ADT(ABAP Development Tools) or HANA Studio. Whereas cloud customers, cannot add their custom fields to any standard CDS views as they don’t have access to backend tools. In order to overcome this, we will create CDS extensibility where they can do the same by using “Custom Fields and Logic” App.

Required Steps for Extensibility Enablement of the CDS Model:

  1. Create two Extension Include DDIC Structures.
  2. Include Persistent Extension Include DDIC Structure into DB Table.
  3. Create Extension Include CDS View.
  4. Create Associations from the Extensible CDS views to the Extension Include CDS View.
  5. Create Business Context in Extensibility Registry.
  6. Define Extensible CDS Views in Extensibility Registry.

Step 1: Create two Extension Include DDIC Structures.

Creation of Persistent Structure and Transient Structure and their naming conventions as shown below.

Extension Include DDIC Structure for Persistent Extension Fields.


Extension Include DDIC Structure for Transient Extension Fields(This will be used for OData Extensibility)


Step 2: Include Persistent Extension Include DDIC Structure into DB Table.


Step 3: Create Extension Include CDS View

Step 4: Create Associations from the Extensible CDS views to the Extension Include CDS View.

Step 5: Create Business Context in Extensibility Registry.


Create Business Context in T-code “SCFD_REGISTRY” and provide Persistence Include, Transient Include which has been created in Step 1.

Field Suffix: All the custom fields which will be created by “Custom Fields and Logic” App will be suffixed with the name ‘XX1’ given in “Business Context”.


Step 6: Define Extensible CDS Views in Extensibility Registry.


In  “Extensibility Registry” Navigate to “Extensible CDS View” tab and create Extensible CDS view by providing the details which has been created in previous steps as shown below.


Creation of custom fields to Extensible view using “Custom Fields and Logic” App.

  1. Login to Fiori Launchpad.
  2. Search for “Custom Fields and Logic” App.
  3. Navigate to “Custom Fields and Logic” App.
  4. Click on “Custom Fields” tab.
  5. Click on Add New Field( ‘+’ ).
  6. Select “Business Context” Description from the drop-down list and provide the custom field details.
  7. Click on the “Create” button.


Enable Usage and Publish Enablement

  1. Click on “UIs and Reports” tab and click on “Enable Usage” for extensible CDS view.
  2. Publish the custom field by click on “Publish” button.


DDIC Artifacts after Publishing a Custom Field:

After publishing the custom field the following DDIC objects Domain, Data Element, Append Structure will be generated in Backend. The append structure will be included in Persistent Structure and Custom field will be inserted in the DDIC table.

Extension of Extensible CDS views with the custom field.

A spiral symbol will appear at Extensible CDS view with the Extended custom field and added custom field will be displayed in the result set of CDS view along with standard fields.

In this way, we will implement CDS Extensiblity so that the customers can create their custom fields along with standard fields by using “Custom Fields and Logic” App.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Michelle Crapo
      Michelle Crapo

      Nice!   I created my own ABAP CDS.  (First time)  I'm now wondering if I could have just used an extension.  I know I will be looking at libraries from this point forward.

      Thank you,


      Author's profile photo Diwakar Matham
      Diwakar Matham

      Interesting!! Thanks for your lucid explanation 🙂

      Author's profile photo Markus Hapke
      Markus Hapke

      Hello Potturi, pretty comprehensive illustration .


      Question Does this only work for a S4/HANA or a regular on-premise Installation ( provided the release level is sufficient ) ?

      Thank you in advance,


      Author's profile photo Alessandro Spadoni
      Alessandro Spadoni

      Hi, this is an interesting option,

      but how you created a custom business context?

      If I try to create from SCFD_REGISTRY it seems can't be created if the system is not an internal SAP System



      Author's profile photo Paul McFarling
      Paul McFarling

      Same here. We've reached out to SAP, will let you know what they say. I assume customers/partners aren't supposed to be doing this. The internal check checks for the existence of a packagee that is not on our systems.