Application Development 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: 

"To many" associations (cardinality [n..*]) are not allowed here

vadamalai
Discoverer
0 Kudos
1,245

I am trying to create entity with association vbak and vbap.

define view entity z_association as select from vbak

association[0..*] to vbap as _item

on $projection.vbeln = _item.vbeln

association[1] to kna1 as _customer

on vbak.kunnr = _customer.kunnr

{

key vbeln,

vkorg,

ernam,

kunnr,

_item,

_customer

} where _item.matnr = 'C101'

I'm getting error "To many" associations (cardinality [n..*]) are not allowed here

SAP also given in help

  • When an association is used in a WHERE condition, 1 must be specified for max.

If I change [0..1] then I am getting warning "Cardinality 1 of Association _ITEM does not match to the ON-condition"

Why this contradiction and what is the solution please.

1 REPLY 1

matt
Active Contributor
0 Kudos
1,015

Try editing your question and this time use the CODE button in the editor to put your code in. Then it is readable.