Do you have any question about this error?
Message type: E = Error
Message class: CFD_REGISTRY_CHECK - Custom Fields: Messages for Registry Check
Message number: 121
Message text: On clause of Association &1 in CDS View &2 contains not only elements
In the on condition of the association you use $projections fields which
are calculated. This is currently not possible as such associations
cannot be used in view extensions and will lead to syntax errors
(General CDS restriction).
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Instead of using $projections fields which are calculated you have to
use the fields from the underlying data source.
Error message extract from SAP system. Copyright SAP SE.
CFD_REGISTRY_CHECK121
- On clause of Association &1 in CDS View &2 contains not only elements ?The SAP error message CFD_REGISTRY_CHECK121 indicates that there is an issue with the definition of an association in a Core Data Services (CDS) view. Specifically, the error message states that the "On clause of Association &1 in CDS View &2 contains not only elements." This typically means that the ON clause of the association is incorrectly defined, possibly including non-element expressions or conditions that are not valid for an association.
Cause:
- Incorrect ON Clause: The ON clause of the association may include conditions that are not based solely on the fields of the associated entities. For example, it might include calculations, functions, or other non-element expressions.
- Syntax Errors: There may be syntax errors or misconfigurations in the CDS view definition that lead to this error.
- Incompatible Data Types: The fields used in the ON clause may have incompatible data types or may not match the expected types for the association.
Solution:
Review the ON Clause: Check the ON clause of the association in the CDS view definition. Ensure that it only contains valid field references (elements) from the associated entities. Remove any non-element expressions or conditions.
Example of a correct ON clause:
association [0..1] to AnotherEntity as _AnotherEntity on $projection.Field1 = _AnotherEntity.Field2
Use Only Element References: Ensure that all references in the ON clause are to fields (elements) of the entities involved in the association. Avoid using calculations, functions, or other expressions.
Check Data Types: Verify that the data types of the fields being compared in the ON clause are compatible. If necessary, perform type conversions to ensure compatibility.
Syntax Validation: Use the ABAP Development Tools (ADT) in Eclipse or the SAP GUI to validate the syntax of your CDS view. This can help identify other potential issues.
Documentation and Examples: Refer to the official SAP documentation for CDS views and associations to ensure that you are following best practices and guidelines.
Related Information:
By following these steps, you should be able to resolve the CFD_REGISTRY_CHECK121 error and correctly define your CDS view associations.
Get instant SAP help. Start your 7-day free trial now.
CFD_REGISTRY_CHECK120
On clause of Association &1 in CDS View &2 contains cast statement
What causes this issue? In the on condition of the association you use $projections fields which have a CAST. This is currently not possible as such ...
CFD_REGISTRY_CHECK119
Condition Alias differs for active and draft entity of Bus.Ctxt &1
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
CFD_REGISTRY_CHECK122
On clause of Association &1 in CDS View &2 has not only 'equal' operator
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
CFD_REGISTRY_CHECK123
On clause of Association &1 in CDS View &2 has unsupported statement
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.