How To Fix ESH_ENG_CDSVAL_ES012 - @EnterpriseSearch-annotations require 'enabled' for the view


SAP Error Message - Details

  • Message type: E = Error

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

  • Message number: 012

  • Message text: @EnterpriseSearch-annotations require 'enabled' for the view

  • Show details Hide details
  • What causes this issue?

    There is some annotation of domain @EnterpriseSearch, but the view
    itself does not carry the annotation @EnterpriseSearch.enabled.

    System Response

    The system ignores all element-level annotations of @EnterpriseSearch;
    they are not even validated. No Enterprise Search connector is activated
    from this view.

    How to fix this error?

    If you want the view to be consumable by Enterprise Search, then add
    annotation @EnterpriseSearch.enabled on the view-level.
    If you do not want the view to be consumable by Enterprise Search, then
    remove all annotations of domain @EnterpriseSearch or annotate the view
    explicitly with @EnterpriseSearch.enabled: false.

    Procedure for System Administrators

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


    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_ES012 - @EnterpriseSearch-annotations require 'enabled' for the view ?

    The SAP error message ESH_ENG_CDSVAL_ES012 indicates that the Enterprise Search annotations are not enabled for a specific Core Data Service (CDS) view. This error typically arises when you are trying to use a CDS view in the context of Enterprise Search, but the necessary annotations that allow the view to be searchable are not properly configured.

    Cause:

    The error occurs because the CDS view lacks the required annotations that enable it for Enterprise Search. Specifically, the annotation @Search.searchable or similar annotations that indicate the view is intended for search purposes are missing or not set to 'enabled'.

    Solution:

    To resolve this error, you need to ensure that the CDS view is properly annotated for Enterprise Search. Here are the steps to do this:

    1. Open the CDS View: Use the ABAP Development Tools (ADT) in Eclipse or the SAP GUI to access the CDS view that is causing the error.

    2. Add Annotations: Ensure that the following annotations are included in your CDS view definition:

      • @Search.searchable: true - This annotation indicates that the view is searchable.
      • Other relevant annotations that may be required for your specific use case.

      Here is an example of how to add the annotation:

      @AbapCatalog.sqlViewName: 'Z_MY_CDS_VIEW'
      @AbapCatalog.compiler.compareFilter: true
      @Search.searchable: true
      define view Z_MY_CDS_VIEW as select from my_table
      {
          key field1,
          field2,
          field3
      }
    3. Activate the CDS View: After making the necessary changes, activate the CDS view to ensure that the annotations are applied.

    4. Re-index the Search: If you are using the view in an Enterprise Search scenario, you may need to re-index the search to ensure that the changes take effect.

    5. Test the Search: After re-indexing, test the Enterprise Search functionality to confirm that the error has been resolved and that the CDS view is now searchable.

    Related Information:

    • Documentation: Refer to the SAP Help Portal for detailed information on CDS views and Enterprise Search annotations.
    • SAP Notes: Check for any relevant SAP Notes that may provide additional guidance or updates related to this error.
    • Community Forums: Engage with the SAP Community or forums for insights from other users who may have encountered similar issues.

    By following these steps, you should be able to resolve the ESH_ENG_CDSVAL_ES012 error and enable your CDS view for use in Enterprise Search.

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