cancel
Showing results for 
Search instead for 
Did you mean: 

No representative key element found in CDS view Z2I_GLACCOUNTINCHARTOFACCOUNTS

Former Member

Hi,

I copied the CDS view I_GLACCOUNTINCHARTOFACCOUNTS and created a new one Z2I_GLACCOUNTINCHARTOFACCOUNTS. The intention is to create the same master data without the hierarchy association, but i get the error "no representative key element".

Where is the error? the CDS view is exactly the same as the original but i cannot correct the error and i dont know how to correct the problem.

I have the following CDS definition:

@EndUserText.label: 'G/L Account In Chart Of Accounts'

@Analytics: {dataCategory: #DIMENSION, dataExtraction.enabled: true} @VDM.viewType: #BASIC @AbapCatalog.sqlViewName: 'ZZZIFIGLAcc' @ObjectModel.representativeKey: 'GLAccount2c'

//@AccessControl.authorizationCheck: #CHECK

@AbapCatalog.buffering.status: #NOT_ALLOWED @ObjectModel.usageType.sizeCategory: #M

@ObjectModel.usageType.dataClass: #MASTER @ObjectModel.usageType.serviceQuality: #A

@ClientHandling.algorithm: #SESSION_VARIABLE @Metadata.ignorePropagatedAnnotations: true

//@AccessControl.authorizationCheck: #CHECK

and the key fields:

@ObjectModel.foreignKey.association: '_ChartOfAccounts' //Inserted by VDM CDS Suite Plugin

key ska1.ktopl as ChartOfAccounts,

@ObjectModel.text.association: '_Text'

// @ObjectModel.Hierarchy.association: '_GLAccountHierarchyNode'

key ska1.saknr as GLAccount2c,

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192430
Active Participant
0 Kudos

Try adding a representative key via annotation:

@ObjectModel.representativeKey: '<fieldname>'

Regards,

Abhishek