2017 Oct 18 5:48 PM
Hi Expert,
I create a ABAP CDS view with annotation as below:
@ObjectModel.representativeKey: 'FORM_ID'
@AbapCatalog.sqlViewName: 'ZTAB_LINEV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'table line text for replacing text universe' @Analytics.dataExtraction.enabled: true
@Analytics.dataCategory: #DIMENSION
when I activate this CDS view, I get error message below, even though I already define representive key in annotation
" No representative key element found in CDS view "
by following picture, you can see there is 'FORM_ID' field in the CDS view.

2017 Oct 19 1:56 PM
Hi Expert,
I create a ABAP CDS view with annotation as below:
@ObjectModel.representativeKey: 'FORM_ID'
@AbapCatalog.sqlViewName: 'ZTAB_LINEV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'table line text for replacing text universe' @Analytics.dataExtraction.enabled: true
@Analytics.dataCategory: #DIMENSION
when I activate this CDS view, I get error message below, even though I already define representive key in annotation
" No representative key element found in CDS view "
by following picture, you can see there is 'FORM_ID' field in the CDS view.

2017 Oct 19 1:56 PM
2017 Oct 19 2:24 PM
2020 Aug 26 8:01 AM
Hi,
i had experience in this issue and below is the way how i resolved it.
we need to provide the following Annotation to overcome this error.
@ObjectModel.representativeKey: [ 'Countrykey', 'Bankkeys', 'BankShortKey', 'Companycode' ]
Here the fields Mentioned in [ ] are key fields in my case.
Mention all the key fields in your CDS View with above annotation and activate the CDS View and test it . it will work.
Regards
Sri Ram
2021 Jul 26 8:37 AM
Thanks, worked fine. i was getting the error only for "master data extractor" and the code @ObjectModel.representativeKey: fixed it. Thanks again.