Adding Field Labels and Descriptions

End-user texts, such as field labels or field descriptions, are taken from ABAP Dictionary data elements to which the corresponding element is bound - unless you redefine the texts using CDS annotations. Unlike technical element names, the header texts, field labels and descriptions are language-dependent. For example, the field 'SalesOrder' would have a language-dependent label 'Sales Order Header'.

Such texts must be translated. Therefore, the CDS development infrastructure is able to extract them from the source code and transfer the extracted texts to the actual translation infrastructure of the corresponding delivery package.

Relevant Annotations

Annotation

Effect

@EndUserText.label: '<text>' This annotation is used to define translatable semantic short texts (with maximum 60 characters) for an element of the CDS view (label text).
@EndUserText.quickInfo: '<text>' The annotation defines a human-readable <text> that provides additional information compared to the label text. The quick info is used for accessibility hints or the mouse over function.

Example

The listing below demonstrates the usage of @EndUserText annotation at the view and element (field) level:

  ...
  @EndUserText.label: 'List with Sales Orders'  -- Annotation at the view level
	
  DEFINE VIEW SalesOrderHeader as ... {
	... 
	
	-- Annotation at the field level
	@EndUserText: { label:  'Sales Order Header', 
	quickinfo: 'Sales Order Header that provides data relevant for all items' }
	SalesOrder as Header; 
	...