Posts

Showing posts with the label CDS Views

Difference between Associations and Table Funcctions in CDS Views

 Associations: 1.Keep only base table/CDS view fields in the selection list. 2.Keep association as public/expose association 3.AD-Hoc Association - Showing the Association field name in first CDS view 4.Path expressions, 5.Change the default outer join as inner join 6.Cardinality Table functions: 1.Whic supports the additional functionalities which are not supported by CDS. 2.SQL statements will written and will use SQL functions and methodologies. 3.Table function has optional input parameters and return parameters. 4.Needs class and method to define. -Class: Public, Method: Static 5.The statement Interface: IF_AMDP_MARKER_HDB must be use. method get_data by database functions for HDB                 Language SQL OPTIONS READ-ONLY Using tables-names method get_data by database procedures for HDB                 Language SQL OPTIONS R...

CDS Views: Table Functions with Example

Image
1.Which supports the additional functionalities which are not supported by CDS. 2.SQL statements will written and will use SQL functions and methodologies. 3.Table function has optional input parameters and return parameters. 4.Needs class and method to define. -Class:Public, Method:Static 5.The statement Interface:IF_AMDP_MARKER_HDB must be use. 1.Creation of Table Function: Create a Data Definition and select template 'Define Table Function with Parameters' @EndUserText.label: 'Prod Order TF' define table function ZVB_TF_PROD_ORD //with parameters parameter_name : parameter_type returns { client : abap . clnt ; Prod_order : aufnr ; order_type : auart ; } implemented by method zvb_class_tf => get_ord_details ;   2.Creation of Class: CLASS zvb_class_tf DEFINITION PUBLIC . PUBLIC SECTION. CLASS-METHODS: get_ord_details FOR TABLE FUNCTION ZVB_TF_PROD_ORD . INTERFACES: IF_AMDP_MARKER_HDB . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. ...