Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Access Control →  ABAP CDS - DCL Statements →  ABAP CDS - DEFINE ROLE 

ABAP CDS - DEFINE ROLE, role_annot

Other versions: 7.31 | 7.40 | 7.54

Syntax

... @annotation ...

Effect

Specifies an annotation annotation as a role annotation in front of the statement DEFINE ROLE in the definition of a CDS role. The character @ must be placed in front of the name annotation of the annotation. The annotation must be defined as a CDS object in a CDS annotation definition and the annotation definition annotation @Scope must be specified here using the value #ROLE.

The table below shows the possible ABAP annotations that can be specified, and their meanings. No other annotations can be specified.

The first column of the table displays the (possibly structured) name annotation of an ABAP annotation and the second column displays its meaning. The third column shows the possible annotation values. The fourth column shows the value set implicitly for the annotation value if the annotation is not used explicitly. The fifth column displays the default value set implicitly for value in accordance with the annotation definition if the annotation is specified without a value. If nothing is specified for the annotation value, the annotation should be specified without a value.

EndUserText Annotations

Translatable texts of the CDS role.

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
EndUserText.label Translatable short text of the CDS role Character string with maximum 60 characters - -


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.

MappingRole Annotations

Assign the CDS role to users.

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
MappingRole Defines the assignment of the CDS role true:
The role is assigned to all users regardless of the client.The access rules are defined by access conditions, which are usually user-specific.
false:
This value cannot be used.
false true


Note

Every definition of a CDS role must contain the ABAP annotation MappingRole with the value true.


This translation does not reflect the current version of the documentation.