Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
subbu_p
Member

Extensibility


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.

T-code : SCFD_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.

T-code:  SCFD_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.
8 Comments