Ansicht
Dokumentation
ABENCDS_F1_CUSTOM_QUERY - CDS F1 CUSTOM QUERY
Addresses (Business Address Services) TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
- DEFINE CUSTOM ENTITY, ABAP Class
... @ObjectModel.query.implementedBy : 'ABAP:class_name' ...
Effect
The annotation @ObjectModel.query.implementedBy binds an ABAP class class_name as a query provider class to a CDS custom entity. When a CDS custom query is accessed via a framework, such as the RAP query engine, the annotation is evaluated and the ABAP implementation is called to perform the query. The ABAP class must implement the predefined ABAP interface IF_RAP_QUERY_PROVIDER to connect it to the RAP query engine.
In the context of the ABAP RESTful Application Programming Model, CDS custom queries are referred to as RAP unmanaged queries.
For more information, see the ABAP RESTful Application Programming Model Developer guide, sections
- Using a CDS Custom Entity for Data Modeling and
- Implementing an Unmanaged Query
The annotation ObjectModel.query.implementedBy is mandatory for CDS custom entities when working in or .
Note
While the annotation ObjectModel.query.implementedBy
must be used for CDS custom entities in order to bind an ABAP class, it also can be used for other CDS
entities. Then it overrides the original query of an CDS entity when accessed by a framework that evaluates the annotation.
Example
The custom entity DEMO_CDS_CUSTOM_ENTITY is bound to ABAP class
CL_DEMO_CUSTOM_ENTITY_QUERY. This ABAP class implements the interface IF_RAP_QUERY_PROVIDER and it generates an internal table with random UUID values.
The executable example Implementing a custom query executes the query implementation class and returns data.
rdisp/max_wprun_time - Maximum work process run time BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 3230 Date: 20240420 Time: 095728 sap01-206 ( 74 ms )