Ansicht
Dokumentation

ABENC0_DEMO_SERVICE_PROJ - C0 DEMO SERVICE PROJ

ABENC0_DEMO_SERVICE_PROJ - C0 DEMO SERVICE PROJ

CL_GUI_FRONTEND_SERVICES - Frontend Services   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Example: C0 Released Service Projection, Design and Consumption

This topic provides an example for the design of a C0 released CDS view entity. It also shows an example for an extension to this released API from the restricted ABAP language version ABAP for Cloud Development.

CDS view entity as C0 released API

The following CDS view entity DEMO_CDS_PRODUCTTP_E is based on the DDIC database table DEMO_PRODUCT and it fulfills all requirements for C0 release:

  • It defines the necessary extensibility annotations.
  • It is part of a transactional RAP application (indicated by the ROOT characteristic).
  • It defines the stable data source Persistence which fulfills all requirements necessary for C0 release.

This CDS view entity demonstrates the design of a released API, but it is not actually released for C0, since it is not intended to serve as released API.

CDS view entity extension to a C0 released API

The following CDS view entity extension DEMO_CDS_EXTEND extends the view entity displayed above and it fulfills all requirements for consuming a C0 released API from the restricted ABAP language version ABAP for Cloud Development:

  • The extension fields are derived from the stable data source Persistence and use the alias name of the stable data source as prefix.
  • The newly defined association _ii_ToUnit_EMO uses the mandatory element suffix EMO.
  • The association target DEMO_CDS_UNIT of the newly defined association _ii_ToUnit_EMO is C1 released.

The prefix ii is representative. It is meant as reminder to use the correct namespace prefix. In customer systems, the namespace prefix yy or zz must be used.

The program DEMO_CDS_RELEASED_API_VE provides type information of the enhanced CDS view entity. It also includes the view fields added by the extension.






Addresses (Business Address Services)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 3187 Date: 20240511 Time: 130740     sap01-206 ( 26 ms )