Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Data Definitions →  ABAP CDS - DDL for Data Definitions →  ABAP CDS - DEFINE TABLE FUNCTION 

ABAP CDS - DEFINE TABLE FUNCTION, function_annot

Other versions: 7.31 | 7.40 | 7.54

Syntax

... @annotation ...

Effect

Specifies an annotation annotation in the definition of a CDS table function in front of the statement DEFINE TABLE FUNCTION as a function notation. The character @ must be placed in front of the name annotation of the annotation. The annotation should be defined as a CDS object in a CDS annotation definition and the annotation definition annotation @Scope should be specified here using the value #TABLE_FUNCTION.

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 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.


Note

Alongside the function annotations shown here, the globally valid entity annotations can also be specified for a table function.

AccessControl Annotations

Defines access control for the CDS table function.

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
AccessControl.authorizationCheck Defines implicit access control when ABAP SQL is used to access the CDS table function #CHECK:
If ABAP SQL is used to access the table function,access control is applied implicitly if aCDS role is assigned to thetable function. If there is no role for the table function, a syntax check warning occurs.
#NOT_REQUIRED:
Like #CHECK, but there is no syntax check warning.
#NOT_ALLOWED:
Noaccess control is performed. This produces a syntaxcheck warning in the DCL source code of a role for the table function.
#PRIVILEGED_ONLY:
Privileged CDS association (evaluated bySADL).
#CHECK #CHECK


Notes

  • The value #NOT_REQUIRED is recommended for CDS table functions not subject to access control when created, but for which roles can be defined later.

  • The value #NOT_ALLOWED switches implicit access control off when the CDS table function is accessed in ABAP SQL. The addition WITH PRIVILEGED ACCESS can be used in the FROM clause to switch access control off for table functions not annotated with this annotation.

  • CDS access control does not work for cross-client access. This is why in ABAP SQL, the addition USING and the obsolete addition CLIENT SPECIFIED can only be used when accessing CDS entities where access control is disabled. It is recommended that the annotation AccessControl.authorizationCheck:#NOT_ALLOWED is only specified for CDS table functions that are subject to cross-client access.

ClientDependent Annotations (Obsolete)

Obsolete control of client handling for the CDS table function.

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
ClientDependent Defines client handling when ABAP SQL is used to access the CDS table function (obsolete). true:
The CDS table function is client-specific. When accessed using SELECT,implicit client handling is applied.
false:
The CDS table function is a cross-client table function. Noimplicit client handling is applied.
- true


Notes

  • The obsolete annotation @ClientDependent is replaced by the annotation @ClientHandling.type.

  • The obsolete annotation @ClientDependent does not have a default value if it is not used. If neither of the annotations @ClientDependent or @ClientHandling.type are specified, the default values of the @ClientHandling annotation apply.

  • The obsolete annotation @ClientDependent cannot be specified together with the annotation @ClientHandling.type.

ClientHandling Annotations

Control of the client handling for the CDS table function.

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
ClientHandling.type Defines client handling when ABAP SQL is used to access the CDS table function. #CLIENT_DEPENDENT:
The CDS table function is client-specific. When accessed using SELECT,implicit client handling is applied.
#CLIENT_INDEPENDENT:
The CDS table function is a cross-client function. Noimplicit client handling is applied.
#CLIENT_DEPENDENT #CLIENT_DEPENDENT


Notes

  • Any other annotations specified using the main annotation ClientHandling and any other values than those shown here cannot be specified in the definition of a CDS table function.

  • An annotation @ClientHandling cannot be specified together with the obsolete annotation @ClientDependent.

DataAging Annotations

Defines data aging for the CDS table function.

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
DataAging.noAgingRestriction Defines how data aging is respected on aSAP HANA database when the CDS table function is accessed using ABAP SQL. true:
ABAP SQL reads all data
false:
ABAP SQL reads current data only
false true

ObjectModel Annotations

...

Annotation Meaning Annotation Values Default Value if Not Used Default Value if Used Without Value
ObjectModel.usageType.dataClass ... ...:
...
...:
...
... ...
ObjectModel.usageType.serviceQuality ... ...:
...
...:
...
... ...
ObjectModel.usageType.sizeCategory ... ...:
...
...:
...
... ...

...


Notes

  • ...