Skip to Content

No representative key element found in CDS view Z2I_GLACCOUNTINCHARTOFACCOUNTS

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 13, 2017 at 10:38 AM

    Try adding a representative key via annotation:

    @ObjectModel.representativeKey: '<fieldname>'

    Regards,

    Abhishek

    Add comment
    10|10000 characters needed characters exceeded