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 Key Problem

Former Member
0 Likes
901
First CDS

{
t.etkno,
sum( t.menge ) as menge
}
where
(
(t.gnkod = 'ASD' and t.statu = '1')
or
(t.gnkod = 'QWE' and t.statu = '2')
)
group by t.etkno

Hi,

I have a problem with the key.


I made 2 cds;

In first cds, I used sum and group by so it will collect menge for each label.

The other cds collect many fields on many tables and menge in the first cds.

I have put menge at the end of cds but cds creates a key for all fields till menge.

How can I fix this problem?

Can someone help me?

Thanks in advace.

2 REPLIES 2
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
590

Yes, in the documentation

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
590

Open the Documentation , search for KEY, select the CDS hit, find the appropriate annotation AbapCatalog.preserveKey ...