Skip to content

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

This functionality is not yet released and must not be used

ABAP CDS - DEFINE ROLE, role_annot

Other versions: 7.31 | 7.40 | 7.54

Syntax


... @annotation ...

Effect

Specifies an annotation annotation in the definition of a CDS role of the ABAP CDS before statement DEFINE ROLE. The character @ must be placed before the name annotation of the annotation. The table below shows the possible predefined annotations, which can be specified, and their meanings. All other annotations are user-defined annotations.

annotation value Default Value Meaning
EndUserText.label Character string with a maximum of 60 characters - Short description of the role..
MappingRole true, false false If true, the role is amapping role. This role is assigned to all users automatically regardless of the client and is based on classicauthorizations. If false, the role is an assignment role that must be assigned explicitly.

The first column shows the name annotation of a predefined annotation, the second column shows the possible values value and the third column shows the value, which is implicitly set for value (if the annotation is not explicitly used). If nothing is specified for value, the annotation should be specified without a value.


Note

Assignment roles cannot yet be used, since there is currently no tool for assigning them to users. The annotation @MappingRole should currently always have the value true.


Example

Defines a role demo_role with the annotation @EndUserText.label whose text can, for example, be displayed by users on the interface. The annotation @MappingRole is set explicitly to false, which is the default value.

EndUserText.label: 'Role to view sales orders'
@MappingRole: false
ROLE demo_role {
   grant SELECT on sacm_cds_snwd_so; }