Skip to main content

@EndUserText

BETA This annotation is beta and should be reviewed for completion and correctness.

Introduction

To allow an intuitive consumption of the data model in (End User) UIs, further metadata needs to be defined which helps the end user to understand the semantics of the underlying data model artifacts. Depending on the concrete context different types of UI texts are required. The UI text is displayed on the screen in the logon language of the user (if the text was translated into this language).

Reference i18n keys

In the @EndUserText annotations it is also possible to reference i18n entries that are embedded into the CSN document. In this case, the string has to include {i18n> as a prefix, then the key and end with }

Example: {i18n>AD01PROFNR@ENDUSERTEXT.HEADING}

Schema Definitions

Annotations Overview

AnnotationScopeDescription
@EndUserText.labelEntity, Type, Service, ContextThe property contains a human-readable text to be displayed on UIs (besides or instead of the technical name).

Corresponds to CAP CDS @title annotation.
@EndUserText.headingTypeDefines a human-readable text that is displayed as column headers.
@EndUserText.quickInfoEntity, Type, Service, ContextDefines a human-readable text that provides additional information compared to the label text.
The quickInfo is used for accessibility hints or the "Mouse over" function.

Corresponds to CAP CDS @description annotation.

@EndUserText.label

The property contains a human-readable text to be displayed on UIs (besides or instead of the technical name).

Corresponds to CAP CDS @title annotation.

Type: string
Scope: Entity, Type, Service, Context
Extending: EntityDefinition, BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition, ServiceDefinition, ContextDefinition

Example Values
"Sales Order Header"
"{i18n>AD01PROFNR@ENDUSERTEXT.LABEL}"

@EndUserText.heading

Defines a human-readable text that is displayed as column headers.

Type: string
Scope: Type
Extending: BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition

@EndUserText.quickInfo

Defines a human-readable text that provides additional information compared to the label text. The quickInfo is used for accessibility hints or the "Mouse over" function.

Corresponds to CAP CDS @description annotation.

Type: string
Scope: Entity, Type, Service, Context
Extending: EntityDefinition, BooleanType, StringType, LargeStringType, IntegerType, Integer64Type, DecimalType, DoubleType, DateType, TimeType, DateTimeType, TimestampType, UUIDType, AssociationType, CompositionType, CustomType, TypeDefinition, ServiceDefinition, ContextDefinition

Example Values
"Sales Order Header that contains data relevant for all items"

Complete Examples

{
"csnInteropEffective": "1.0",
"$version": "2.0",
"definitions": {
"SalesOrderHeader": {
"kind": "type",
"type": "cds.String",
"@EndUserText.label": "Sales Order Header",
"@EndUserText.quickInfo": "Sales Order Header that contains data relevant for all items"
}
}
}
{
"csnInteropEffective": "1.0",
"$version": "2.0",
"definitions": {
"AD01PROFNR": {
"kind": "type",
"type": "cds.String",
"length": 8,
"@EndUserText.heading": "{i18n>AD01PROFNR@ENDUSERTEXT.HEADING}",
"@EndUserText.label": "{i18n>AD01PROFNR@ENDUSERTEXT.LABEL}",
"@EndUserText.quickInfo": "{i18n>AD01PROFNR@ENDUSERTEXT.QUICKINFO}"
}
}
}