How To Fix ESH_ENG_CDSVAL_ES058 - 'hidden' must be annotated at view level


SAP Error Message - Details

  • Message type: E = Error

  • Message class: ESH_ENG_CDSVAL_ES - ES-CDS/ABAP: Validation of domain @EnterpriseSearch

  • Message number: 058

  • Message text: 'hidden' must be annotated at view level

  • Show details Hide details
  • What causes this issue?

    @EnterpriseSearch.hidden can be annotated at view level only.

    System Response

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.

    How to fix this error?

    Remove the annotation except for the view level.

    Procedure for System Administrators


    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message ESH_ENG_CDSVAL_ES058 - 'hidden' must be annotated at view level ?

    The SAP error message ESH_ENG_CDSVAL_ES058 indicates that a field in a Core Data Services (CDS) view is marked as 'hidden', but this annotation is not properly defined at the view level. This error typically arises when you are trying to use a field that is intended to be hidden in a way that requires it to be explicitly annotated.

    Cause:

    The error occurs when:

    1. A field in the CDS view is marked as 'hidden' but lacks the necessary annotation at the view level.
    2. The CDS view is being used in a context (like a query or an OData service) where the hidden field is expected to be defined.

    Solution:

    To resolve this error, you need to ensure that the 'hidden' annotation is correctly defined at the view level. Here are the steps to do that:

    1. Open the CDS View: Access the CDS view in the ABAP Development Tools (ADT) or the relevant development environment.

    2. Add the Annotation: Ensure that the field you want to hide is annotated correctly. You can do this by adding the following annotation to the field in the CDS view definition:

      @AbapCatalog.sqlViewName: 'Your_SQL_View_Name'
      @AbapCatalog.compiler.compareFilter: true
      @AccessControl.authorizationCheck: #CHECK
      @EndUserText.label: 'Your View Description'
      define view Your_CDS_View_Name
      as select from Your_Table
      {
          key field1,
          field2,
          @AbapCatalog.hidden: true
          field3
      }
    3. Check for Other Annotations: Ensure that there are no conflicting annotations that might affect the visibility of the field.

    4. Activate the CDS View: After making the changes, activate the CDS view to apply the new annotations.

    5. Test the Changes: Run the query or the OData service again to verify that the error has been resolved.

    Related Information:

    • CDS Annotations: Familiarize yourself with the various annotations available in CDS views, especially those related to visibility and access control.
    • SAP Documentation: Refer to the official SAP documentation for Core Data Services for more detailed information on annotations and best practices.
    • Debugging: If the error persists, consider debugging the CDS view or checking the logs for additional context on the error.

    By following these steps, you should be able to resolve the ESH_ENG_CDSVAL_ES058 error and ensure that your CDS view is correctly configured.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
The AI Support Assistant is great. It provides comprehensive assistance even on the most difficult issues. I highly recommend this service.
Rate 1
John Jordan
SAP Consultant & Author