How To Fix SD_CDS_ENTITY117 - Entities subject to access control should declare a key (see long text)


SD_CDS_ENTITY117 - Overview

  • 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)

  • Show details Hide details
  • What causes this issue?

    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.

    System Response

    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.

    How to fix this error?

    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.


Smart SAP Assistant

  • What is the cause and solution for SAP error message 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,

    Already have an account? Login here!




Instant HelpGet instant SAP help. Sign up for our Free Essentials Plan.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo simplifies finding the accurate answers to SAP message errors. I now use every week. A must have tool for anyone working with SAP! Highly recommended!
Rate 1
Kent Bettisworth
Executive SAP Consultant