cancel
Showing results for 
Search instead for 
Did you mean: 

Hana XSA CDS: View Join

draschke
Active Contributor
0 Kudos

Hi,

I found this difficult sample code for an join of different entities.

Please, could somebody show me, if I would only join E and G by "id", how this should look like. I don't get it to work.

Thanks!

entity E {
  key id : Integer;
  a : Integer;
};
entity F {
  key id : Integer;
  b : Integer;
};
entity G {
  key id : Integer;
  c : Integer;
};
view V_join as select from E join (F as X full outer join G on X.id = G.id) on E.id = c {
  a, b, c
};
}
View Entire Topic
rutika_bodas
Participant
0 Kudos

Additionally, you can use the CDS Graphical Editor for your CDS modelling if you are using SAP Web IDE for SAP HANA. It is available from HANA 1.0 SPS11 onwards with baisc features like CDS Entitites, contexts, associations etc. From the release HANA2.0 SPS00, the graphical editor supports CDS View modelling as well.

With the graphical editor, you can easily create, associate, and model your CDS artifacts with a simple drag and drop paradigm and you will not have to write all this CDS script anymore.

Here is a documentation for the same:

https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.00/en-US/60b2d45a8a964efea2e88e2914...

Regards,

Rutika