Do you have any question about this error?
Message type: E = Error
Message class: SD_CDS_ENTITY - Messages for STOBS/entities
Message number: 117
Message text: Entities subject to access control should declare a key (see long text)
CDS entity may be subject to access control but does not declare a key.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
This situation is reported as warning.
The declared key columns may be utilized by CDS access control to
construct an extension to database statements for this entity to
enforce the access control conditions.
When there are no declared key columns, this enforcement is still
possible, but it must then consider all columns of the entity as
necessary to formulate this integration. For entities with many
columns, this might result in large join conditions.
Furthermore, for some types of integration, it requires the usage
of temporary database objects with a DISTINCT property, which is
also an expensive operation.
Unless there are comprehensive business reasons which make the
declaration of a key not feasible, specify which columns of the entity
represent a key property of the entity, that is, there are not two
records with the same set of values in those columns. When doing so, you
must ensure that this condition is fulfilled. Specification of a key
column set which does not have the uniqueness property may result in
duplicate records being returned once access control becomes active.
When you use aggregation functions, those duplications might produce
wrong results.
Error message extract from SAP system. Copyright SAP SE.
SD_CDS_ENTITY117
- Entities subject to access control should declare a key (see long text) ?The SAP error message SD_CDS_ENTITY117 indicates that there is an issue with the definition of a Core Data Services (CDS) view in the context of access control. Specifically, it suggests that the entities defined in the CDS view do not have a key declared, which is necessary for access control mechanisms to function properly.
Cause:
The error typically arises when:
- A CDS view is defined without a primary key or unique identifier for the entity.
- The system requires a key to enforce access control rules, and without it, the system cannot determine how to apply these rules effectively.
Solution:
To resolve this error, you need to ensure that the CDS view includes a key declaration. Here are the steps to do this:
Open the CDS View Definition: Go to the ABAP Development Tools (ADT) in Eclipse or the relevant transaction in SAP GUI where the CDS view is defined.
Add a Key Declaration: In the CDS view definition, you need to specify a key for the entity. This is typically done using the
@Key
annotation. For example:define view my_cds_view as select from my_table { key field1, field2, field3 }
Activate the CDS View: After making the changes, activate the CDS view to ensure that the changes take effect.
Test the CDS View: After activation, test the CDS view to confirm that the error has been resolved and that access control is functioning as expected.
Related Information:
By ensuring that your CDS views are properly defined with keys, you can avoid this error and maintain effective access control in your SAP environment.
Get instant SAP help. Start your 7-day free trial now.
SD_CDS_ENTITY116
Field &1 is still used in join condition of entity &2
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
SD_CDS_ENTITY115
Field &1 is still used in having condition of entity &2
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
SD_CDS_HIER001
Hierarchy entity & could not be created.
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
SD_CDS_PROJECTION000
Annotation &1&2&3&4 is not allowed in projection views.
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.