Do you have any question about this error?
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'
@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.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
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.
Error message extract from SAP system. Copyright SAP SE.
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:
@EnterpriseSearch
annotation but have not included the required @Search
annotation.@Search
annotation to define how the data should be indexed and searched.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:
@Search
Annotation: Include the @Search
annotation in your CDS view definition. This annotation typically specifies the search fields and their properties.Here is an example of how to define both annotations in a CDS view:
@AbapCatalog.sqlViewName: 'Z_MY_CDS_VIEW'
@AbapCatalog.compiler.compareFilter: true
@Search: {
search: true,
searchFields: [ 'field1', 'field2' ]
}
@EnterpriseSearch: {
search: true
}
define view Z_MY_CDS_VIEW as select from my_table
{
key field1,
field2,
field3
}
@EnterpriseSearch
and @Search
.By ensuring that both annotations are correctly defined, you should be able to eliminate the error and successfully implement Enterprise Search capabilities in your SAP environment.
Get instant SAP help. Start your 7-day free trial now.
ESH_ENG_CDSVAL_ES020
'presentationMode' HIDDEN cannot be combined with others (&1)
What causes this issue? While the other presentation modes - like #TITLE, #SUMMARY - can be used at the same time, presentation mode #HIDDEN is mutua...
ESH_ENG_CDSVAL_ES019
At least 1 'presentationMode' TITLE required
What causes this issue? @EnterpriseSearch.presentationMode defines how a search result is displayed in a generic search UI. Without this annotation, ...
ESH_ENG_CDSVAL_ES022
'usageMode' should be annotated at some element
What causes this issue? @Saerch.defaultSearchElement defines that an element participates in the free-style search. @EnterpriseSearch.usageMode offer...
ESH_ENG_CDSVAL_ES023
'fieldGroupForSearchQuery' needs tag 'name'
What causes this issue? @EnterpriseSearch.fieldGroupForSearchQuery defines a named group; therefore it is mandatory to indicate the ID of the group.S...
Click on this link to search all SAP messages.