Ansicht
Dokumentation

ABENCDS_CUSTOM_ENTITIES - CDS CUSTOM ENTITIES

ABENCDS_CUSTOM_ENTITIES - CDS CUSTOM ENTITIES

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

- Custom Entities

A CDS custom entity is defined in the DDL source code of a CDS data definition using the statement DEFINE CUSTOM ENTITY in the CDS DDL of the ABAP Core Data Services (CDS). The name of the CDS custom entity must match the name of the DDL source code.

Purpose and use cases:

CDS custom entities allow developers to implement their own data provision using ABAP. Data retrieval is implemented via an ABAP class and performed at runtime. On CDS level, only an interface is defined, while the implementation of the logic is encapsulated in the application server artifact. Custom entities are used if data access cannot be done via means of SQL and the available CDS feature set and other CDS entity types. For example, custom entities can be used when

  • data is stored in non-relational storage, for example in a BLOB.
  • data is stored in SAP liveCache and access is done via ABAP APIs.
  • data cannot be computed by means of CDS due to additional application-server-side logic.
  • a data model can be defined via CDS views, but the DCL feature set is not sufficient to define the necessary authorizations.

Data retrieval is also possible using an http client.

In the context of the ABAP RESTful Application Programming Model, custom entities are used as a data model basis for RAP unmanaged queries.

A CDS custom entity represents all type attributes of a CDS entity:

A CDS custom entity can be used as follows:

  • ABAP CDS

  • Since no SQL artifact is generated for CDS custom entities and the query is implemented in ABAP, a CDS custom entity cannot be used as a data source of SELECT statements or used by SQL path expressions in other CDS entities.

  • ABAP Programs
  • The structured type of the CDS custom entity is known in ABAP programs. Like the type of any CDS entity, it can be used after the addition TYPE. The attributes of the structured type can be evaluated using RTTI.

  • Frameworks

  • The parameters and the CDS associations of CDS custom entities can be evaluated by frameworks such as the RAP query engine.

An instance of a CDS custom entity is not created as a database object and client handling is not defined.

  • Development guide for the ABAP RESTful Application Programming model, section Query.

Notes

  • Custom entities can be nodes in RAP business objects, for example root, parent and/or child nodes using ROOT and composition relationships.





Fill RESBD Structure from EBP Component Structure   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 8236 Date: 20240425 Time: 152725     sap01-206 ( 82 ms )