Skip to Content
0
Jun 30, 2020 at 05:02 PM

Doing JOIN in CDS services

105 Views Last edit Jul 01, 2020 at 02:46 PM 2 rev

Hi All,

I am trying to expose the JOIN of 2 CDS entities on the service layer based on a condition,but I am not getting the syntax right.

Please find below the code snippet:

service DataService {
  entity A as projection on x.A;
  entity B as projection on x.B;
  entity C as (SELECT from x.A {*} JOIN (SELECT from x.B {*})  ) on x.A.Id = x.B.Id; //NOT RIGHT
}

How do I fix the entity C syntax?

Thanks & Regards,

Harish