How To Fix ESH_ENG_CDSVAL_ES021 - '@EnterpriseSearch' requires '@Search'


ESH_ENG_CDSVAL_ES021 - Overview

  • Message type: E = Error

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

  • Message number: 021

  • Message text: '@EnterpriseSearch' requires '@Search'

  • Show details Hide details
  • What causes this issue?

    @EnterpriseSearch is an extension to domain @Search; all the annotations
    defined there are relevant for Enterprise Search. Currently, the view
    has @EnterpriseSearch-annotations, but none from domain @Search.

    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?

    If you want the view to be consumable in Enterprise Search, add the
    mandatory @Search-annotations.
    If you do not want to annotate the view as @Search.searchable, remove
    all @EnterpriseSearch-annotations or annotate the view explicitly with
    @EnterpriseSearch.enabled: false.

    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_ES021 - '@EnterpriseSearch' requires '@Search' ?
    The SAP error message ESH_ENG_CDSVAL_ES021 indicates that there is a requirement for the '@Search' annotation when using the '@EnterpriseSearch' annotation in a Core Data Services (CDS) view. This error typically arises in the context of SAP's Enterprise Search functionality, which allows for enhanced search capabilities across various data sources.
    
    Cause: The error occurs when: You have defined a CDS view with the @EnterpriseSearch annotation but have not included the required @Search annotation. The system expects the @Search annotation to define how the data should be indexed and searched.
    Solution: To resolve this error, you need to ensure that your CDS view includes the @Search annotation along with the @EnterpriseSearch annotation. Here’s how you can do that: Modify the CDS View: Open the CDS view definition in the ABAP Development Tools (ADT) or the relevant development environment. Add the @Search Annotation: Include the @Search annotation in your CDS view definition. This annotation typically specifies the search fields and their

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