Skip to Content
4
Oct 31, 2019 at 08:36 AM

How to test cds table function?

904 Views

Hi All
I've created the CDS table function and would like to write unit test for it:

define table function Z_COMP_CODE
  with parameters
    @Environment.systemField: #CLIENT
    clnt    : abap.clnt,
    sel_opt : abap.char( 1000 )
returns
{
  Client         : abap.clnt;
  CompanyCodeOld : bukrs;
  ProfitCenter   : prctr;
  ValidFrom      : datab;
  ValidTo        : datbi;
  CompanyCodeNew : bukrs;
}
implemented by method
  ycl_cme_table_function=>QUERY_COMPANY_CODE; 

Is it possible to write unit test for table functions?

Thanks