Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Data Definitions 

ABAP CDS - Table Functions

A CDS table function is defined in the DDL source code of a CDS data definition in the ABAP Development Tools using the statement DEFINE TABLE FUNCTION in the CDS DDL of the ABAP Core Data Services (CDS). DCL source code in a CDS table function can also be displayed in Repository Browser in ABAP Workbench. A CDS table function includes the following:

A CDS table function is declared as a CDS entity cds_entity using the statement DEFINE TABLE_FUNCTION. As a data type in ABAP Dictionary, the CDS entity represents a structured type with the elements of the CDS table function as components and can be used like any CDS entity.
  • In ABAP CDS, the CDS entity can be used as a data source of other CDS entities.
  • In ABAP, the CDS entity can be used as a data type and in ABAP SQL read statements.
A CDS table function is located in the namespace of the data types in ABAP Dictionary and in the namespace of the global object types in the class library.
CDS table functions are implemented in platform-specific SQL in a special AMDP method and the implementation is managed as an AMDP table function by the AMDP in the database system.
The AMDP method is specified after the addition IMPLEMENTED BY in the definition of the CDS table function using DEFINE TABLE_FUNCTION. It must be declared as a special AMDP function implementation for precisely one CDS table function using the addition FOR TABLE FUNCTION.
The parameter interface of the AMDP table function is defined using the input parameters and the element list of the CDS table function.

Like a CDS view, a CDS table function is client-specific by default and implicit client handling is applied in ABAP SQL reads.

Other versions: 7.31 | 7.40 | 7.54


  • CDS table functions can only be used in a database system that supports AMDP.

  • When a CDS table function is created, the CDS entity must be activated first, before the associated AMDP function implementation is created.

  • When a CDS table function is transported, the CDS entity is first transported as part of the dictionary transport objects and then the AMDP function implementation as part of the ABAP transport objects. Depending on the size of the transport, there can be a considerable delay between these two phases where the CDS table function is not in a usable state.


ABAP CDS - Client Handling in CDS Table Functions