Check Table exist and display its records in CDS

Hi Experts,

I have a scenario where I want to fetch records from standard table ‘A’ and display in a CDS.
Also, need to get records from custom table ‘B’ if it exists in server and display in same CDS.

So, if table – B exists then CDS should have records from both the tables (A & B)
else records from table A only.

kindly suggest me some way to get this resolved.

Thanks.

Scroll to Top