Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPCLASS-METHODS_FOR_TABFUNC - CLASS-METHODS FOR TABFUNC

ABAPCLASS-METHODS_FOR_TABFUNC - CLASS-METHODS FOR TABFUNC

CPI1466 during Backup   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

CLASS-METHODS, FOR TABLE FUNCTION

Short Reference



CLASS-METHODS meth FOR TABLE FUNCTION cds_tabfunc.

Effect

This statement declares the static method meth as an AMDP function implementation that implements a CDS table function cds_tabfunc as an AMDP table function. This statement can only be specified in the public visibility section of an AMDP class and not in an interface. The method must be implemented using the addition BY DATABASE FUNCTION of the statement METHOD.

cds_tabfunc expects a CDS table function defined using the statement DEFINE TABLE FUNCTION in the ABAP CDS CDS DDL. For this function, the current class and the method meth are specified after the addition IMPLEMENTED BY METHOD.

No other additions are possible. The interface parameters in the AMDP function implementation are added to the CDS table function as follows:

  • Mandatory input parameters of the AMDP function implementation are generated from the input parameters of the CDS table function. The names are copied, and the ABAP types are derived from the dictionary types.
  • A return value of the type of a standard table with an empty table key with the name result with a structured row type is generated from the elements of the CDS table function. The names of the components of the row type correspond to the names of the elements and the data types are derived from their dictionary types.

AMDP functions






ABAP Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 3101 Date: 20221203 Time: 160639     sap01-206 ( 46 ms )