cancel
Showing results for 
Search instead for 
Did you mean: 

CDS View - delete entries with duplicate key

Former Member
18,184

Hello,

does someone know if there is a way to remove entries that have the same key from a CDS View? Distinct or Group By actually removes only duplicate entries, not entries that have just a duplicate key. Is there a way to use the select "DISTINCT" on only the key fields?

Thank you and best regards,

Cristina

former_member328158
Discoverer
0 Kudos

Hello Cristina,

I have the same issue.

Can you please provide the Source code of the solution ?

View Entire Topic
sanju_joseph
Product and Topic Expert
Product and Topic Expert
0 Kudos

it is a combination of min and group by clause that does the filter, for example if i don't want to have business partner repeated for different role.
then i have to use

min ( tb003t.role ) as xyz and i should not use tb003t.role in group clause ,which is also the way above code works.