cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP CDS view Association in HANA - Cardinality

ssurampally
Active Contributor
0 Kudos

Hi I am trying to get a better understanding of using Cardinality syntax during an association while creating the CDS view.

In this process, I would like to know, how the view is going to provide the out put differently for the below cardinality definition. My tables to be used in this association are CSKS (attributes- Cost Center) and CSKT (Text - Cost Center).

[0..1]

[0..*]

[1..1]

Please provide me with an example, that would help a lot. I have gone through sap help documentation, but still not clarified.

https://help.sap.com/doc/abapdocu_740_index_htm/7.40/en-US/index.htm?file=abencds_path_expression_at...

Thanks

Sreekanth

Accepted Solutions (1)

Accepted Solutions (1)

horst_keller
Product and Topic Expert
Product and Topic Expert

Answers (1)

Answers (1)

ssurampally
Active Contributor
0 Kudos

Thanks Horst, now I understood that, cardinality [0..1] or [1..1] are Left outer joins to the Target table. With this specification, if no field from right table is selection in the view definition, join does not occur. With the other cardinality [0..*] or [1..*] the join will definitely occur though i did not select any fields from right table and also I can't use target object columns in where condition is my understanding correct?

if my association is formed as Inner join, because of overriding option with attribute, the above cardinality rules still work as same as in above right?

Thanks

Sreekanth