SAP NetWeaver AS ABAP Release 751, ©Copyright 2017 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Dictionary → ABAP CDS in ABAP Dictionary → ABAP CDS - Data Definitions → ABAP CDS - DDL for Data Definitions → ABAP CDS - parameter →ABAP CDS - parameter_annot
Syntax
... @annotation ...
... @<annotation ...
Effect
Specifies an annotation annotation in the definition of an input parameter parameter of a CDS view or a CDS table function as a parameter name. Parameter annotations can be specified before and after the parameter:
The following tables show the possible ABAP annotations that can be specified and their meanings. The ABAP annotations are evaluated by the ABAP runtime environment for every CDS entity. Annotations with other identifiers are usually framework-specific annotations. These are not evaluated by the ABAP runtime environment but by other SAP frameworks instead.
The first column displays the name annotation of an ABAP annotation and the second column displays its meaning. The third column shows the possible values value. The fourth column displays the value, which has been set implicitly for value, if the annotation is not used explicitly. The fifth column displays the value that is set implicitly for value if the annotation is specified without a value. If nothing is specified for value, the annotation should be specified without a value.
EndUserText Annotations
Translatable texts of the parameter..
Annotation | Meaning | Possible Values | Default Value if Not Used | Default Value if Used Without Value |
EndUserText.label | Translatable short text of the parameter | Character string with maximum 60 characters | - | - |
EndUserText.quickInfo | Translatable tooltip of the parameter | String | - | - |
Note
ABAP annotations introduced using EndUserText are used to define translatable semantic texts for a CDS object.
The value of an annotation like this is saved in special tables that have a language key and that are translatable. The value specified in the source code should consist of text in the original language of the CDS source code and is translated into the required languages. The methods of the class CL_DD_DDL_ANNOTATION_SERVICE read these texts as specified by an input parameter for the language. If no language is passed to the input parameter, the logon language is used as the default. If no text is found for the language, the secondary language in AS ABAP is used.
Environment Annotations
Controls submission of parameters to a CDS view.
Annotation | Meaning | Possible Values | Default Value if Not Used | Default Value if Used Without Value |
Environment.systemField | Assigns an ABAP system field to the input parameter for implicit parameter passing in Open SQL. | #CLIENT: sy-mandt #SYSTEM_DATE: sy-datum #SYSTEM_TIME: sy-uzeit #SYSTEM_LANGUAGE: sy-langu #USER: sy-uname |
- | - |
An input parameter can be annotated strictly once with the annotation Environment.systemField. If the CDS entity is used as a data source of a SELECT statement in Open SQL, this assignment has the following consequences:
Any other values for value are ignored using an exception. Instead of the value #USER, the value #APPLICATION_USER can be specified too. This is, however, only offered for reasons of downward compatibility.
Notes
Example
The following CDS view associates all input parameters with ABAP system fields and the SELECT list consists only of the input parameters. The ABAP program DEMO_CDS_SYSTEM_FIELDS accesses the CDS view by specifying parameters in full implicitly and explicitly and produces both results.