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: 037
Message text: '@UI' must be annotated (at header and elements)
The presentation of search results on a generic search UI relies on the
annotations of domain @UI. Therefore, these annotations are mandatory.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Add @UI-annotation, at least in their minimal scope for
@UI.headerInfo.title, @UI.identification. See consulting note 2407921
for the relevant annotations and their effect.
Error message extract from SAP system. Copyright SAP SE.
ESH_ENG_CDSVAL_ES037
- '@UI' must be annotated (at header and elements) ?The SAP error message
ESH_ENG_CDSVAL_ES037 '@UI' must be annotated (at header and elements)
typically occurs in the context of Core Data Services (CDS) views in SAP, particularly when working with annotations for UI elements in Fiori applications. This error indicates that the required UI annotations are missing from the CDS view definition.Cause:
The error arises when:
- The CDS view is expected to have UI annotations that define how the data should be presented in the user interface, but these annotations are not present.
- The
@UI
annotation is required at both the header level of the CDS view and for the individual elements (fields) that are part of the view.Solution:
To resolve this error, you need to ensure that the necessary
@UI
annotations are included in your CDS view definition. Here are the steps to do this:
Open the CDS View Definition: Access the CDS view in the ABAP Development Tools (ADT) or the relevant development environment.
Add UI Annotations:
- At the header level of the CDS view, you should include the
@UI
annotation to define the overall UI behavior.- For each field (element) in the CDS view, you should also add the appropriate
@UI
annotations to specify how each field should be displayed in the UI.Example:
@AbapCatalog.sqlViewName: 'Z_MY_CDS_VIEW' @AbapCatalog.compiler.compareFilter: true @UI.headerInfo: { typeName: 'My Type', typeNamePlural: 'My Types' } define view Z_MY_CDS_VIEW as select from my_table { key field1 as Field1, field2 as Field2, @UI.lineItem: [{ position: 10 }] field3 as Field3 }
Check for Required Annotations: Ensure that you are using the correct annotations as per your requirements. Common
@UI
annotations include:
@UI.lineItem
: For defining fields that should be displayed in a list.@UI.headerInfo
: For defining header information.@UI.selectionField
: For fields that should be available for selection in filters.Activate the CDS View: After making the necessary changes, activate the CDS view to apply the annotations.
Test the Changes: Once activated, test the CDS view in the Fiori application or the relevant UI to ensure that the error is resolved and the UI behaves as expected.
Related Information:
By ensuring that the required @UI
annotations are properly defined in your CDS view, you should be able to resolve the error and enhance the usability of your Fiori applications.
Get instant SAP help. Start your 7-day free trial now.
ESH_ENG_CDSVAL_ES036
'&1' is currently not considered in ABAP
What causes this issue? Annotation &V1& is not considered in ABAP.System Response The annotation is checked and validated to prevent syntact...
ESH_ENG_CDSVAL_ES035
'filteringFacet': Empty object does not make sense (&1)
What causes this issue? Annotation object @EnterpriseSearch.filteringFacet is defined without any further specification. This does not make sense.Sys...
ESH_ENG_CDSVAL_ES038
'order.by' and 'order.byReference' are mutually exclusive (&1)
What causes this issue? The element is annotated by @EnterpriseSearch.filteringFacet.order.by and by @EnterpriseSearch.filteringFacet.order.byReferen...
ESH_ENG_CDSVAL_ES039
Annotation &1 is obsolete
What causes this issue? Annotation &V1& is obsolete. There is no annotation to be used instead.System Response The annotation has never been...
Click on this link to search all SAP messages.