SAP Knowledge Base Article - Public

2930441 - No Association found for Key Field

Symptom

You have modified an existing custom CDS view in the current 2005 release and you are getting errors when trying to export it.

Environment

S4HC 2005

Reproducing the Issue

  1. Modify a custom CDS View CUSTOM_CDS_VIEW_1 that was created in a prior release.
      
  2. Try to export it.
      
  3. In Export software collection app, you can find error logs referring to the CUSTOM_CDS_VIEW_1 data sources.
       
  4. You try to republish/modify the underlying data sources CUSTOM_CDS_VIEW_2 with the Custom CDS View app.

    --> Error: No Association found for Key Field KEY_FIELD_1. No Association found for Key Field KEY_FIELD_2.

Cause

An underlying data source CUSTOM_CDS_VIEW_2 has one or more key fields without an association defined.

Resolution

The affected custom CDS view CUSTOM_CDS_VIEW_2 is a dimension and according to the data modeling rules for a dimension "All key fields except the Representative Key field and the date/time fields must have an association to a Master Data View". See SAP Note 2657021 - Creating Custom CDS Views for Analytical Scenarios

So please first remove the usage of the key field 'KEY_FIELD_1' and 'KEY_FIELD_2' in the dependent objects and then come back to the view 'CUSTOM_CDS_VIEW_2', edit and select a master data view association for the key fields 'KEY_FIELD_1' and 'KEY_FIELD_2'. Publish the view and then add the field again in the dependent objects.

See Also

2874206 - Custom CDS Views - New App Version

Keywords

key field, association, custom cds view, data source, S/4HANA Cloud, S4HC , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem

Product

SAP S/4HANA Cloud 2005