Table Function in CDS Views
Table Function in CDS Views
}
implemented by method zamdp_deli=>get_b_qty;
2. Create AMDP
Use class-METHODS <method> for the table function after the
amdp_marker Implement the Method
CLASS zamdp_deli DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES : if_amdp_marker_hdb.
class-METHODS get_b_qty for table FUNCTION ZCDS_TBL1.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
*&
*& Report zamdp_cds_tbl_fun_rtp
*&
*&
*&
REPORT zamdp_cds_tbl_fun_rtp.
select * from ZCDS_TBL1 into TABLE @data(gt_so). cl_demo_output=>display( gt_so ).
4. Output
The ABAP pgm uses a select statement to fetch records from CDS Table function.
The AMDP class via the implemented method takes care of creation of rows in the
table.
Everything happens in the run time.