Get the error "The association _I_XXX cannot be used locally in the view" while publishing CDS View
SAP S/4HANA Cloud
Reproducing the Issue
1. Creat a CDS view in the app Custom CDS View
2. Associate several data source to the primary data source. For example, the primary data source is A. The associated data source are B,C.
3. When define the "ON" condition for data source D, the filed of data source B is used instead of the field of data source A.
4. Publish the CDS viw, there is an error: "The association _I_XXX cannot be used locally in the view"
When performing the association, the field of the primary data source should be used in the right hand side of the join condition
- Edit the custom CDS view
- Change the right hand side of the join condition to the field of the primary data source
- If there is no relevant field in the primary data source then create another custom CDS view to join the Data source A and data source B. Then this new data source will have the field.
The association, cannot be used locally in the view, Custom CDS View , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem