By

Understanding ABAP CDS Table Functions

ABAP CDS table functions are used to define table functions that are executed directly on the database. These functions can be called within CDS views and leverage the HANA platform’s code pushdown capabilities in ABAP CDS.


➢A CDS table function is created using the ABAP CDS statement DEFINE TABLE FUNCTION and can be utilized as a data source in Open SQL read statements.


➢Each CDS table function consists of the following components:

  • CDS entity
  • CDS table function implementation (The implementation occurs within an AMDP method of an AMDP class and is handled as an AMDP function by the AMDP framework in the database system)


➢Sample Example:

Table Function Definition


▪To create table function definition, you need to login in eclipse.
▪Right click on Core Data Services >> New Data Definition


▪Use table function template


Table Function Implementation


▪Create a new class and add an AMDP Marker interface. (if_amdp_marker_hdb)
▪Define a static method with addition FOR TABLE FUNCTION with table function name. Add implementation for the method as below.
▪Save and activate.


➢To clarify, table functions do not replace CDS views; rather, they serve as an additional tool for handling more complex logic than what can be managed within a CDS view. This can greatly streamline the overall VDM architecture.

Thanks for visiting!

Sangeeta Singh

One response to “Understanding ABAP CDS Table Functions”

  1. […] If you are not aware about CDS Table Function check this article first: CDS TABLE Functions […]

Leave a Reply

Discover more from HANAxABAP

Subscribe now to keep reading and get access to the full archive.

Continue reading