Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS associations - please help

Former Member
0 Likes
2,599

What is the purpose of the new 1: addition before a filter condition?

For illustration purposes, i've created a 1 to many association between Articles and Units of Measure.  (Tables MARA & MARM).  Then, I created another view to 'consume' the association.  No problem, but I get the following warning:  Association uoms can influence the cardinality of the resulting set.  (see exclamation marks in yellow triangles):

OK, fix that using the 1: addition, and the warning goes away:

My expectation now is a 1 to 1 association between Article and Units of Measure, but the result set is still 1 to many.  What then does the  1: addition mean?  

1 ACCEPTED SOLUTION
Read only

pfefferf
Active Contributor
0 Likes
1,223

Hello Eric,

with "1:" you can define that the association is monovalent because of the filter (to avoid syntax errors). But during runtime it is not checked that it is really monovalent.

For more information have a look to the online documentation ABAP CDS - 1:.

Best Regards,

Florian

What is the purpose of the new 1: addition before a filter condition?

For illustration purposes, i've created a 1 to many association between Articles and Units of Measure.  (Tables MARA & MARM).  Then, I created another view to 'consume' the association.  No problem, but I get the following warning:  Association uoms can influence the cardinality of the resulting set.  (see exclamation marks in yellow triangles):

OK, fix that using the 1: addition, and the warning goes away:

My expectation now is a 1 to 1 association between Article and Units of Measure, but the result set is still 1 to many.  What then does the  1: addition mean?  

1 REPLY 1
Read only

pfefferf
Active Contributor
0 Likes
1,224

Hello Eric,

with "1:" you can define that the association is monovalent because of the filter (to avoid syntax errors). But during runtime it is not checked that it is really monovalent.

For more information have a look to the online documentation ABAP CDS - 1:.

Best Regards,

Florian