Annotation @EndUserText.label: '<text>'
This annotation is used to define (translatable) semantic short texts (with maximum of 60 characters) for an element of the CDS view (label text).
You can choose the level to add the label but the higher level definitions (for example type Query) will supersede lower level (type Cube) definitions.
see SAP HELP PORTAL
In case this annotation is not used for a field, the system tries to retrieve from ABAP Dictionary, see Using TransientProviders based on CDS Views in Query Designer.
CDS view of type CUBE
(1) The label 'Airline ID (characteristic)' gets displayed if no label is set in the query definition.
(2) We defined the label 'Connection number' in cube level but it gets overwrite it in the query definition (see next screenshot)
CDS view of type QUERY
(1) In the parameter section, you can define the text which you would like to see in the variable screen.
(2) Use above-mentioned annotation to define a label for the column head of the select element
(3) The definition in query level will overwrite the definition which has been done in cube level
(4) Here you can set a label for the query name
(1) Defined in the parameter section (variable screen)
(2) Characteristic label (column head)
Translate the label to required language (SE63)
You have set the annotation @EndUserText.label: '<text>' and now you would like to make the label language dependent then please follow the steps.
1. Open transaction SE63 and press ‘Short Texts’ from the toolbar
2. Expand node User Interface Texts and double click on sub-element DDLS CDS Views.
3. enter the name of DDL Source, the source and target language.
4. Change the text
Language Dependent / Time Dependent Text of characteristic values
We discussed in this page how you can define and translate labels for fields. In case you need more information about texts assigned to values of fields(in BW language: master data values of a characteristic) please read the following WIKI page: