SAP CDS LANGUAGE ELEMENTS



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS - Feature Tables
The following sections shows all available language elements of the CDS TDL , CDS DDL, and CDS DCL in ABAP CDS and their release dates. For further information on the release dates, see TITLE .
ITOC
In addition to the language elements shown here, CDS source code can also contain annotations with metadata.

TDL

CDS Type Definitions

Keywords and Additions Language ElementMeaningABAP Release
DEFINE TYPE
TOKEN DEFINE TYPE Defines a CDS simple type in CDS TDL. 7.91, 7.58

FDL

CDS Function Definitions

Keywords and Additions Language ElementMeaningABAP Release
DEFINE SCALAR FUNCTION ... WITH PARAMETERS ... RETURNS ...
TOKEN DEFINE SCALAR FUNCTION WITH PARAMETERS RETURNS Defines a CDS scalar function 7.93, 7.58
TYPE OF
TOKEN TYPE OF Typing by reference to another parameter in a CDS scalar function. 7.93, 7.58
WITH REFERENCE TYPE
TOKEN WITH REFERENCE TYPE CDS amount and quantity handling in CDS scalar functions. 7.93, 7.58
WITH REFERENCE TYPE CASEH WHEN ... $[AND ... $] THEN ... $[ELSE ... $] END
TOKEN WITH REFERENCE TYPE CASE WHEN AND THEN ELSE END Dynamic specification of a reference type in CDS scalar functions. 7.93, 7.58

DDL

CDS Annotation Definitions

Keywords and Additions Language ElementMeaningABAP Release
define annotation ...
TOKEN DEFINE ANNOTATION Defines a CDS annotation 7.69, 7.52
enum
TOKEN ENUM Defines enumeration symbols of a CDS annotation 7.69, 7.52
default
TOKEN DEFAULT Defines default values of a CDS annotation 7.69, 7.52
array of
TOKEN ARRAY OF Defines an annotation arras. 7.69, 7.52

CDS View Entities

Keywords and Additions Language ElementMeaningABAP Release
DEFINE VIEW ENTITY... AS Defines a CDS view entity . 7.80, 7.55
ROOT
TOKEN ROOT Defines a CDS view entity as a root entity 7.75, 7.54
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters of a CDS view entity. 7.80, 7.55
SELECT ... FROM
TOKEN SELECT FROM SELECT statement of a CDS view entity. 7.80, 7.55
SELECT DISTINCT ... FROM
TOKEN SELECT DISTINCT FROM Duplicates are removed from the result set. 7.83, 7.56
INNER JOIN ... ON
TOKEN INNER JOIN ON Inner join in a SELECT statement7.80, 7.55
LEFT$|RIGHT OUTER JOIN ... ON
TOKEN LEFT RIGHT OUTER JOIN ON Outer join in a SELECT statement7.80, 7.55
CROSS JOIN ... ON
TOKEN CROSS JOIN ON Cross join in a SELECT statement7.80, 7.55
ASSOCIATION ... TO ... AS ... ON
TOKEN ASSOCIATION TO AS ON Defines a CDS association in a SELECT statement. 7.80, 7.55
OF ${{EXACT ONE} | MANY | ONE$} TO ${{EXACT ONE} | MANY | ONE$}
TOKEN OF EXACT ONE MANY ONE TO EXACT ONE MANY ONE Cardinality specification written in words. 7.91, 7.58
[min...max]
TOKEN min max Numeric cardinality specification. 7.80, 7.55
WITH DEFAULT FILTER
TOKEN WITH DEFAULT FILTER Specifies a default filter condition of a CDS association. 7.80, 7.55
1:
TOKEN 1: Attribute of a path expression 7.80, 7.55
INNER ... WHERE
TOKEN INNER WHERE Attribute of a path expression 7.80, 7.55
LEFT OUTER ... WHERE
TOKEN LEFT OUTER WHERE Attribute of a path expression 7.80, 7.55
COMPOSITION ... OF
TOKEN COMPOSITION OF Defines a CDS composition. 7.75, 7.54
ASSOCIATION TO PARENT ... AS ... ON
TOKEN ASSOCIATION TO PARENT AS ON Defines a CDS to-parent association. 7.75, 7.54
KEY
TOKEN KEY Defines an element of a SELECT list as key field. 7.80, 7.55
AS
TOKEN AS Defines an alias name for an element of a SELECT list. 7.80, 7.55
$PROJECTION.*
TOKEN $PROJECTION.* Reuses expressions from the SELECT list of a CDS view entity lbr in an operand position of the SELECT list of the same CDS view entity.7.84, 7.56
WHERE ...
TOKEN WHERE WHERE clause of a SELECT statement. 7.80, 7.55
GROUP BY ...
TOKEN GROUP BY GROUP-BY clause of a SELECT statement. 7.80, 7.55
HAVING ...
TOKEN HAVING HAVING clause of a SELECT statement. 7.80, 7.55
EXCEPT ...
TOKEN EXCEPT EXCEPT clause of a SELECT statement.7.85, 7.56
INTERSECT ...
TOKEN INTERSECT INTERSECT clause of a SELECT statement.7.85, 7.56
UNION $[ALL$]
TOKEN UNION ALL UNION clause of a SELECT statement. 7.85, 7.56

Elementary Operands OperatorsMeaningABAP Release
Untyped literal Defines an untyped literal. 7.80, 7.55
Typed literal Defines a typed literal. 7.83, 7.56
$parameters.* Specifies an input parameter. 7.80, 7.55
$session.user Defines a session variable.7.80, 7.55
$session.client Defines a session variable.7.80, 7.55
$session.system_language Defines a session variable. 7.80, 7.55
$session.system_date Defines a session variable. 7.80, 7.55
$session.user_timezone Defines a session variable. 7.81, 7.55
$session.user_date Defines a session variable. 7.81, 7.55
$session.bs_instance_id Defines a session variable. 7.86, 7.57
$session.bs_zone_id Defines a session variable.7.86, 7.57

Expressions OperatorsMeaningABAP Release
MAX, MIN, AVG $[AS dtype$], SUM, COUNT
TOKEN MAX MIN AVG SUM COUNT Aggregate expression in a SELECT statement. 7.85, 7.56
+, -, *, /
TOKEN + - * / Arithmetic expression in a SELECT statement. 7.85, 7.56
CASE, WHEN, THEN, ELSE, END
TOKEN CASE WHEN THEN END Case distinction in a SELECT statement. 7.85, 7.56
ELSE NULL
TOKEN ELSE NULL Optional addition for a case distinction. 7.89, 7.57
CAST
TOKEN CAST Cast expression in a SELECT statement. 7.85, 7.56
=, <>, < , > , < =, >=, BETWEEN, LIKE, IS NULL, NOT, AND, OR
TOKEN = <> < > <= >= BETWEEN LIKE IS NULL NOT AND OR Relational expression in a SELECT statement. 7.85, 7.56

Built-In Functions FunctionMeaningABAP Release
ABS, CEIL, DIV, DIVISION, FLOOR, MOD, ROUND
TOKEN ABS CEIL DIV DIVISION FLOOR MOD ROUND Numeric function in a SELECT statement. 7.80, 7.55
CONCAT, CONCAT_WITH_SPACE, INSTR, LEFT, LENGTH, LPAD, LOWER, LTRIM, REPLACE, RIGHT, RPAD, RTRIM, SUBSTRING, UPPER
TOKEN CONCAT LENGTH LPAD LTRIM REPLACE RTRIM SUBSTRING
TOKEN CONCAT_WITH_SPACE INSTR LEFT LOWER RIGHT RPAD RTRIM UPPER String function in a SELECT statement. 7.80, 7.55
REPLACE_REGEXPR
TOKEN REPLACE_REGEXPR String function in a SELECT statement. 7.81, 7.55
BINTOHEX, HEXTOBIN
TOKEN BINTOHEX HEXTOBIN Byte string function in a SELECT statement. 7.80, 7.55
COALESCE
TOKEN COALESCE Coalesce function in a SELECT statement. 7.80, 7.55
FLTP_TO_DEC
TOKEN FLTP_TO_DEC Type conversion function in a SELECT statement.7.80, 7.55
UNIT_CONVERSION, CURRENCY_CONVERSION
TOKEN UNIT_CONVERSION CURRENCY_CONVERSION Conversion functions in a SELECT statement.7.80 ,7.55
GET_NUMERIC_VALUE, CURR_TO_DECFLOAT_AMOUNT
TOKEN GET_NUMERIC_VALUE CURR_TO_DECFLOAT_AMOUNT Conversion functions in a SELECT statement. 7.83, 7.56
DATN_DAYS_BETWEEN, DATN_ADD_DAYS, DATN_ADD_MONTHS, DATS_IS_VALID, DATS_DAYS_BETWEEN, DATS_ADD_DAYS, DATS_ADD_MONTHS
TOKEN DATN_DAYS_BETW DATN_ADD_DAYS DATN_ADD_MONTHS
TOKEN DATS_IS_VALID DATS_DAYS_BETWEEN DATS_ADD_DAYS DATS_ADD_MONTHS Date function in a SELECT statement. 7.80, 7.55
TIMS_IS_VALID
TOKEN TIMS_IS_VALID Time function in a SELECT statement. 7.80, 7.55
UTCL_CURRENT, UTCL_ADD_SECONDS, UTCL_SECONDS_BETWEEN, TSTMP_IS_VALID, TSTMP_CURRENT_UTCTIMESTAMP , TSTMP_SECONDS_BETWEEN, TSTMP_ADD_SECONDS
TOKEN UTCL_CURRENT UTCL_ADD_SECONDS UTCL_SECONDS_BETWEEN
TOKEN TSTMP_IS_VALID TSTMP_CURRENT_UTCTIMESTAMP
TOKEN TSTMP_SECONDS_BETWEEN TSTMP_ADD_SECONDS Time stamp function in a SELECT statement. 7.80, 7.55
ABAP_SYSTEM_TIMEZONE, ABAP_USER_TIMEZONE
TOKEN ABAP_SYSTEM_TIMEZONE ABAP_USER_TIMEZONE Time zone functions in a SELECT statement.7.80, 7.55
TSTMP_TO_DATS, TSTMP_TO_TIMS, TSTMP_TO_DST, DATS_TIMS_TO_TSTMP, TSTMPL_TO_UTCL, TSTMPL_FROM_UTCL, DATS_TO_DATN, DATS_FROM_DATN, TIMS_TO_TIMN, TIMS_FROM_TIMN Date/time conversion functions in a SELECT statement. 7.80,7.55

CDS Projection Views of Type Transactional Query

Keywords and Additions Language ElementMeaningABAP Release
DEFINE VIEW ENTITY... AS PROJECTION ON
TOKEN DEFINE VIEW ENTITY AS PROJECTION ON Defines a CDS transactional query . 7.76, 7.54
ROOT
TOKEN ROOT Defines a CDS transactional query as root entity.7.76, 7.54
PROVIDER CONTRACT TRANSACTIONAL_QUERY
TOKEN PROVIDER CONTRACT TRANSACTIONAL QUERY Sets the provider contract.7.83, 7.56
ASSOCIATION ... TO ... AS ... ON
TOKEN ASSOCIATION TO AS ON Defines a CDS association in a CDS transactional query. 7.80, 7.55
OF ${{EXACT ONE} | MANY | ONE$} TO ${{EXACT ONE} | MANY | ONE$}
TOKEN OF EXACT ONE MANY ONE TO EXACT ONE MANY ONE Cardinality specification written in words. 7.91, 7.58
[min...max]
TOKEN min max Numeric cardinality specification. 7.80, 7.55
WITH DEFAULT FILTER
TOKEN WITH DEFAULT FILTER Specifies a default filter condition of a CDS association. 7.80, 7.55
REDEFINE ASSOCIATION ... AS ... REDIRECTED TO PARENT | COMPOSITION CHILD
TOKEN REDEFINE ASSOCIATION Redefines an exposed association from the projected entity and redirects it to a new projection target.7.82, 7.56
KEY
TOKEN KEY Defines an element of a SELECT list as key field. 7.76, 7.54
VIRTUAL
TOKEN VIRTUAL Defines a CDS virtual element in a transactional query.7.76, 7.54
LOCALIZED
TOKEN LOCALIZED Displays text elements in the current system language.7.76, 7.54
REDIRECTED TO PARENT | COMPOSITION CHILD
TOKEN REDIRECTED TO Redirects a CDS association in a CDS projection view to a projection of the association target. 7.76, 7.54
CAST PRESERVING TYPE
TOKEN CAST PRESERVING TYPE Cast expression.7.76, 7.54
WHERE
TOKEN WHERE WHERE clause of a SELECT statement.7.76, 7.54

CDS Projection Views of Type Transactional Interface

Keywords and Additions Language ElementMeaningABAP Release
DEFINE VIEW ENTITY... AS PROJECTION ON
TOKEN DEFINE VIEW ENTITY AS PROJECTION ON Defines a CDS transactional interface. 7.86, 7.57
ROOT
TOKEN ROOT Defines a CDS transactional interface as root entity.7.86, 7.57
PROVIDER CONTRACT TRANSACTIONAL_INTERFACE
TOKEN PROVIDER CONTRACT TRANSACTIONAL INTERFACE Sets the provider contract.7.86, 7.57
KEY
TOKEN KEY Defines an element of a SELECT list as key field. 7.86, 7.57
REDIRECTED TO PARENT | COMPOSITION CHILD
TOKEN REDIRECTED TO Redirects a CDS association in a CDS projection view to a projection of the association target. 7.86, 7.57
CAST PRESERVING TYPE
TOKEN CAST PRESERVING TYPE Cast expression.7.86, 7.57

CDS Projection Views of Type Analytical Query

Keywords and Additions Language ElementMeaningABAP Release
DEFINE TRANSIENT VIEW ENTITY... AS PROJECTION ON
TOKEN DEFINE VIEW ENTITY AS PROJECTION ON Defines a CDS analytical projection view. 7.86, 7.57
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters for an analytical query.7.86, 7.57
PROVIDER CONTRACT ANALYTICAL_QUERY
TOKEN PROVIDER CONTRACT ANALYTICAL QUERY Sets the provider contract.7.86, 7.57
VIRTUAL
TOKEN VIRTUAL Defines virtual element in an analytical query. 7.86, 7.57
LOCALIZED
TOKEN LOCALIZED Displays text elements in the current system language. 7.86, 7.57
+, - , *, /
TOKEN + - * / Arithmetic expression in a SELECT statement. 7.85, 7.56
CAST PRESERVING TYPE
TOKEN CAST PRESERVING TYPE Cast expression.7.86, 7.57

ABAP_CDS_V1_VIEWS

Keywords and Additions Language ElementMeaningABAP Release
DEFINE VIEW... AS Defines a ABAP_CDS_V1_VIEW . 7.41
ROOT
TOKEN ROOT Defines a ABAP_CDS_V1_VIEW as a root entity 7.75
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters of a ABAP_CDS_V1_VIEW . 7.42
SELECT ... FROM
TOKEN SELECT FROM SELECT statement of a ABAP_CDS_V1_VIEW . 7.41
SELECT DISTINCT ... FROM
TOKEN SELECT DISTINCT FROM Duplicates are removed from the result set. 7.41
INNER JOIN ... ON
TOKEN INNER JOIN ON Inner join in a SELECT statement7.41
LEFT$|RIGHT OUTER JOIN ... ON
TOKEN LEFT RIGHT OUTER JOIN ON Outer join in a SELECT statement7.41
CROSS JOIN ... ON
TOKEN CROSS JOIN ON Cross join in a SELECT statement7.51
ASSOCIATION ... TO ... AS ... ON
TOKEN ASSOCIATION TO AS ON Defines a CDS association in a SELECT statement. 7.41
WITH DEFAULT FILTER
TOKEN WITH DEFAULT FILTER Specifies a default filter condition of a CDS association. 7.50
1:
TOKEN 1: Attribute of a path expression 7.41
INNER ... WHERE
TOKEN INNER WHERE Attribute of a path expression 7.41
LEFT OUTER ... WHERE
TOKEN LEFT OUTER WHERE Attribute of a path expression 7.41
COMPOSITION ... OF
TOKEN COMPOSITION OF Defines a CDS composition. 7.75, 7.54
ASSOCIATION TO PARENT ... AS ... ON
TOKEN ASSOCIATION TO PARENT AS ON Defines a CDS to-parent association. 7.75, 7.54
KEY
TOKEN KEY Defines an element of a SELECT list as key field. 7.41
AS
TOKEN AS Defines an alias name for an element of a SELECT list. 7.41
$PROJECTION.*
TOKEN $PROJECTION.* Reuses expressions from the SELECT list of a ABAP_CDS_V1_VIEW in an operand position of the SELECT list of the same ABAP_CDS_V1_VIEW .7.84, 7.56
WHERE ...
TOKEN WHERE WHERE clause of a SELECT statement. 7.41
GROUP BY ...
TOKEN GROUP BY GROUP-BY clause of a SELECT statement. 7.41
HAVING ...
TOKEN HAVING HAVING clause of a SELECT statement. 7.41
UNION $[ALL$]
TOKEN UNION ALL UNION clause of a SELECT statement. 7.41

Elementary Operands OperatorsMeaningABAP Release
Untyped literal Defines an untyped literal. 7.41
#domain.* Defines a literal with a domain prefix. 7.42
: | $parameters.* Specifies an input parameter. 7.42
$session.user Defines a session variable.7.50
$session.client Defines a session variable.7.50
$session.system_language Defines a session variable. 7.50
$session.system_date Defines a session variable. 7.51
$session.user_timezone Defines a session variable. 7.81, 7.55
$session.user_date Defines a session variable. 7.81, 7.55

Expressions OperatorsMeaningABAP Release
MAX, MIN, AVG $[AS dtype$], SUM, COUNT
TOKEN MAX MIN AVG SUM COUNT Aggregate expression in a SELECT statement. 7.41
+, -, *
TOKEN + - * Arithmetic expression in a SELECT statement. 7.41
/
TOKEN / Division in a SELECT statement. 7.42
CASE, WHEN, THEN, ELSE, END
TOKEN CASE WHEN THEN END Case distinction in a SELECT statement. 7.41
CAST
TOKEN CAST Cast expression in a SELECT statement. 7.41
=, <>, < , > , < =, >=, BETWEEN, LIKE, IS NULL, NOT, AND, OR
TOKEN = <> < > <= >= BETWEEN LIKE IS NULL NOT AND OR Relational expression in a SELECT statement. 7.41

Built-In Functions FunctionMeaningABAP Release
ABS, DIV, DIVISION, FLOOR, ROUND
TOKEN ABS DIV DIVISION FLOOR ROUND Numeric function in a SELECT statement. 7.42
CEIL, MOD
TOKEN CEIL MOD Numeric function in a SELECT statement. 7.41
CONCAT, REPLACE
TOKEN CONCAT REPLACE String function in a SELECT statement. 7.42
CONCAT_WITH_SPACE, INSTR, LEFT, LENGTH, LTRIM, RIGHT, RPAD, RTRIM
TOKEN CONCAT_WITH_SPACE INSTR LEFT LENGTH LTRIM RIGHT RPAD RTRIM String function in a SELECT statement. 7.50
LPAD, SUBSTRING
TOKEN LPAD SUBSTRING String function in a SELECT statement. 7.41
LOWER, UPPER
TOKEN LOWER UPPER String function in a SELECT statement. 7.51
BINTOHEX, HEXTOBIN
TOKEN BINTOHEX HEXTOBIN Byte string function in a SELECT statement. 7.50
COALESCE
TOKEN COALESCE Coalesce function in a SELECT statement. 7.42
FLTP_TO_DEC
TOKEN FLTP_TO_DEC Type conversion function in a SELECT statement.7.51
UNIT_CONVERSION, CURRENCY_CONVERSION, DECIMAL_SHIFT
TOKEN UNIT_CONVERSION CURRENCY_CONVERSION DECIMAL_SHIFT Conversion functions in a SELECT statement.7.42
DATN_DAYS_BETWEEN, DATN_ADD_DAYS, DATN_ADD_MONTHS Date functions in a SELECT statement 7.77, 7.54
DATS_IS_VALID, DATS_DAYS_BETWEEN, DATS_ADD_DAYS, DATS_ADD_MONTHS
TOKEN DATN_DAYS_BETW DATN_ADD_DAYS DATN_ADD_MONTHS
TOKEN DATS_IS_VALID DATS_DAYS_BETWEEN DATS_ADD_DAYS DATS_ADD_MONTHS Date functions in a SELECT statement. 7.50
TIMS_IS_VALID
TOKEN TIMS_IS_VALID Time function in a SELECT statement. 7.50
UTCL_CURRENT, UTCL_ADD_SECONDS, UTCL_SECONDS_BETWEEN
TOKEN UTCL_CURRENT UTCL_ADD_SECONDS UTCL_SECONDS_BETWEEN Time functions in a SELECT statement.7.77, 7.54
TSTMP_IS_VALID, TSTMP_CURRENT_UTCTIMESTAMP , TSTMP_SECONDS_BETWEEN, TSTMP_ADD_SECONDS
TOKEN UTCL_CURRENT UTCL_ADD_SECONDS UTCL_SECONDS_BETWEEN
TOKEN TSTMP_IS_VALID TSTMP_CURRENT_UTCTIMESTAMP
TOKEN TSTMP_SECONDS_BETWEEN TSTMP_ADD_SECONDS Time stamp functions in a SELECT statement. 7.50
ABAP_SYSTEM_TIMEZONE, ABAP_USER_TIMEZONE
TOKEN ABAP_SYSTEM_TIMEZONE ABAP_USER_TIMEZONE Time zone functions in a SELECT statement.7.51
TSTMP_TO_DATS, TSTMP_TO_TIMS, TSTMP_TO_DST, DATS_TIMS_TO_TSTMP
TOKEN TSTMP_TO_DATS TSTMP_TO_TIMS TSTMP_TO_DST DATS_TIMS_TO_TSTMP Date/time conversion functions in a SELECT statement. 7.51
TSTMPL_TO_UTCL, TSTMPL_FROM_UTCL, DATS_TO_DATN, DATS_FROM_DATN, TIMS_TO_TIMN, TIMS_FROM_TIMN Date/time conversion functions in a SELECT statement. 7.77, 7.54

CDS Entity Extensions

Keywords and Additions Language ElementMeaningABAP Release
EXTEND VIEW ENTITY... WITH Extends a CDS view entity or a CDS projection view using a CDS view entity extension 7.78, 7.55
EXTEND CUSTOM ENTITY... WITH Extends a CDS custom entity using a CDS custom entity extension 7.89, 7.57
EXTEND ABSTRACT ENTITY... WITH Extends a CDS abstract entity using a CDS abstract entity extension 7.84, 7.56
EXTEND VIEW ... WITH
TOKEN EXTEND VIEW WITH Extends a ABAP_CDS_V1_VIEW using a CDS view extension 7.42

CDS Table Functions

Keywords and Additions Language ElementMeaningABAP Release
DEFINE TABLE FUNCTION ... RETURNS ... IMPLEMENTED BY METHOD ...
TOKEN DEFINE TABLE FUNCTION RETURNS IMPLEMENTED BY METHOD Defines a CDS table function 7.61, 7.50
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters for a CDS table function 7.61, 7.50
KEY
TOKEN WITH PARAMETERS Defines an element as key element. 7.61, 7.50

CDS Hierarchies

Keywords and Additions Language ElementMeaningABAP Release
DEFINE HIERARCHY ...
TOKEN DEFINE HIERARCHY Defines a CDS hierarchy 7.73, 7.53
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters of a CDS hierarchy. 7.73, 7.53
AS PARENT CHILD HIERARCHY
TOKEN AS PARENT CHILD HIERARCHY Defines a CDS hierarchy using parent-child relationships. 7.73, 7.53
SOURCE ...
TOKEN SOURCE Specifies the data source of a CDS hierarchy. 7.73, 7.53
CHILD TO PARENT ASSOCIATION
TOKEN CHILD TO PARENT ASSOCIATION Specifies the hierarchy association of a CDS hierarchy. 7.73, 7.53
PERIOD FROM ... TO ... VALID FROM ... TO ...
TOKEN PERIOD FROM TO VALID FROM TO Defines a temporal hierarchy. 7.75, 7.54
DIRECTORY ... FILTER BY ...
TOKEN DIRECTORY FILTER BY Specifies a condition for the source of a CDS hierarchy. 7.85, 7.56
START WHERE ...
TOKEN START WHERE Specifies the start condition of a CDS hierarchy. 7.73, 7.53
SIBLINGS ORDER BY ... ASCENDING $| DESCENDING
TOKEN SIBLINGS ORDER BY Specifies the sort order of sibling nodes in a CDS hierarchy. 7.73, 7.53
DEPTH ...
TOKEN DEPTH Delimits the hierarchy levels of a CDS hierarchy. 7.73, 7.53
NODETYPE ...
TOKEN NODETYPE Defines an element as a node type for a CDS hierarchy. 7.73, 7.53
LOAD BULK $| INCREMENTAL
TOKEN LOAD BULK INCREMENTAL Specifies a load policy for a CDS hierarchy.7.74, 7.54
MULTIPLE PARENTS ... NOT ALLOWED $| LEAVES $| ALLOWED
TOKEN MULTIPLE PARENTS NOT ALLOWED LEAVES ALLOWED Defines the behavior that applies if multiple parent nodes are specified in a CDS hierarchy. 7.73, 7.53
ORPHANS ... IGNORE $| ERROR $| ROOT
TOKEN ORPHANS IGNORE ERROR ROOT Defines the behavior that applies if orphan nodes are specified in a CDS hierarchy. 7.73, 7.53
CYCLES ... IGNORE $| BREAKUP
TOKEN CYCLES IGNORE BREAKUP Defines the behavior that applies if node cycles are specified in a CDS hierarchy . 7.73, 7.53
GENERATE SPANTREE
TOKEN GENERATE SPANTREE Reduces a CDS hierarchy to a tree. 7.77, 7.54
CACHE ON $| OFF $| FORCE
TOKEN CACHE ON OFF FORCE Defines the caching policy for a CDS hierarchy. 7.82, 7.56
KEY
TOKEN KEY Defines an element as a key element. 7.73, 7.53

CDS Custom Entities

Keywords and Additions Language ElementMeaningABAP Release
DEFINE CUSTOM ENTITY ...
TOKEN DEFINE CUSTOM ENTITY Defines a CDS custom entity. 7.75, 7.54
ROOT
TOKEN ROOT Defines a CDS custom entity as a root entity. 7.75, 7.54
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters of a CDS custom entity. 7.75, 7.54
ASSOCIATION ... TO ... ON
TOKEN ASSOCIATION TO ON Defines a CDS association in the element list of a CDS custom entity. 7.75, 7.54
WITH DEFAULT FILTER
TOKEN WITH DEFAULT FILTER Specifies a default filter condition of a CDS association.7.75, 7.54
COMPOSITION ... OF
TOKEN COMPOSITION OF Defines a CDS composition in the element list of a CDS custom entity. 7.75, 7.54
ASSOCIATION TO PARENT ... ON
TOKEN ASSOCIATION TO PARENT ON Defines a CDS to-parent association in the element list of a CDS custom entity. 7.75, 7.54
KEY
TOKEN KEY Defines an element as key element. 7.75, 7.54

CDS Abstract Entities

Keywords and Additions Language ElementMeaningABAP Release
DEFINE ABSTRACT ENTITY ...
TOKEN DEFINE ABSTRACT ENTITY Defines an CDS abstract entity. 7.70, 7.53
ROOT
TOKEN ROOT Defines a CDS abstract entity as a root entity. 7.75, 7.54
WITH PARAMETERS
TOKEN WITH PARAMETERS Defines input parameters of an CDS abstract entity. 7.70, 7.53
ASSOCIATION ... TO ... ON
TOKEN ASSOCIATION TO ON Defines a CDS association in the element list of an CDS abstract entity. 7.70, 7.53
WITH DEFAULT FILTER
TOKEN WITH DEFAULT FILTER Specifies a default filter condition of a CDS association. 7.70, 7.53
COMPOSITION ... OF
TOKEN COMPOSITION OF Defines a CDS composition in the element list of a CDS abstract entity . 7.75, 7.54
ASSOCIATION TO PARENT ... ON
TOKEN ASSOCIATION TO PARENT ON Defines a CDS to-parent association in the element list of a CDS abstract entity. 7.75, 7.54
KEY
TOKEN KEY Defines an element as a key element.7.70, 7.53

CDS Metadata Extensions

Keywords and Additions Language ElementMeaningABAP Release
ANNOTATE VIEW ... WITH
TOKEN ANNOTATE VIEW Defines a CDS metadata extension for a CDS view.7.65, 7.51
ANNOTATE ENTITY ... WITH
TOKEN ANNOTATE ENTITY Defines a CDS metadata extension for a CDS entity. 7.70, 7.53
PARAMETERS
TOKEN PARAMETERS Extends the annotations of the input parameters of a CDS entity. 7.65, 7.51

CDS Tuning Objects

Keywords and Additions Language ElementMeaning ABAP Release
DEFINE VIEW ENTITY BUFFER ON
TOKEN DEFINE VIEW ENTITY BUFFER ON Defines a CDS entity buffer for a CDS view entity.7.87, 7.57
LAYER ${CORE $| LOCALIZATION $| INDUSTRY $| PARTNER $| CUSTOMER$}
TOKEN LAYER CORE LOCALIZATION INDUSTRY PARTNER CUSTOMER Defines the layer for which the entity buffer is valid. 7.87, 7.57
TYPE ${SINGLE $| GENERIC NUMBER OF KEY ELEMENTS $| FULL $| NONE$}
TOKEN TYPE SINGLE GENERIC NUMBER OF KEY ELEMENTS FULL NONE Defines the buffering type of a CDS entity buffer.7.87, 7.57

SDL

CDS Service Definitions

Keywords and Additions Language ElementMeaningABAP Release
DEFINE SERVICE
TOKEN DEFINE SERVICE Defines a CDS service definition in CDS SDL.7.75, 7.54
PROVIDER CONTRACTS
TOKEN PROVIDER CONTRACTS Defines a provider contract for a CDS service definition. Provider contracts specify the scenario for which the service definition is intended. The effect is that stricter syntax checks are applied. 7.89, 7.57
EXPOSE...AS
TOKEN EXPOSE AS Exposes CDS entities for a business service.7.75, 7.54

CDS Service Definition Extensions

Keywords and Additions Language ElementMeaningABAP Release
EXTEND SERVICE...WITH
TOKEN EXTEND SERVICE WITH Defines a CDS service definition extension.7.89, 7.57
EXPOSE...AS
TOKEN EXPOSE AS Exposes CDS entities for a business service as part of a CDS service definition extension. 7.89, 7.57

DCL

CDS Roles

Keywords and Additions Language ElementMeaningABAP Release
DEFINE ROLE
TOKEN DEFINE ROLE Defines a CDS role. 7.42
SWITCHABLE
TOKEN SWITCHABLE Addition to the DEFINE ROLE statement that makes the role conform to the switch state of the Switch Framework.7.89, 7.57
GRANT SELECT ON
TOKEN GRANT SELECT ON Defines an access rule in a CDS role. 7.42
GRANT SELECT ON ... AS PROJECTION ON ... FALLBACK ASSOCIATION
TOKEN GRANT SELECT ON AS PROJECTION ON FALLBACK ASSOCIATION Defines a special access rule for CDS transactional queries. 7.91, 7.58
WITH OPTIONAL ELEMENTS ... $[DEFAULT TRUE $| FALSE$]
TOKEN WITH OPTIONAL ELEMENTS DEFAULT TRUE FALSE Marks elements of an access condition as optional. 7.85, 7.56
ALL
TOKEN ALL With the addition ALL, access conditions can express that access is granted only if all values of a set-valued association satisfy the condition. 7.81, 7.55
EXISTS
TOKEN EXISTS Defines that different access conditions that use the same set-valued association should not be joined in their fields by means of a common join expression. 7.81, 7.55
COMBINATION MODE OR$|AND
TOKEN COMBINATION MODE Defines how the access conditions of multiple CDS access rules are combined. 7.77, 7.54
REDEFINITION
TOKEN REDEFINITION Makes the current access rules the only existing access rule to the effect that all other access rules are ignored. 7.77, 7.54
WHEREWHERE clause in a conditional access rule of a CDS role. 7.42
TRUE (GRANT SELECT ON ... WHERE)
TOKEN TRUE The Boolean predicate TRUE defines that the access condition in question is always met. 7.73, 7.53
FALSE (GRANT SELECT ON ... WHERE)
TOKEN FALSE The Boolean predicate FALSE defines that the access condition in question is always false. 7.73, 7.53
VOID (GRANT SELECT ON ... WHERE
TOKEN VOID Defines that the access condition in question is ignored. 7.77, 7.54
AND
TOKEN AND Boolean operator in a conditional access rule of a CDS role. 7.42
OR
TOKEN OR Boolean operator in a conditional access rule of a CDS role. 7.42
NOT
TOKEN NOT Boolean operator in a conditional access rule of a CDS role. 7.69, 7.52
INHERIT
TOKEN INHERIT Defines an inherited access rule of a CDS role. Obsolete as of 7.72, 7.53 7.65, 7.51
ASPECT pfcg_auth
TOKEN ASPECT PFCG condition as part of an access condition in a CDS role.7.42
ASPECT user
TOKEN ASPECT User condition for a CDS role 7.65, 7.51
FILTER BY (ASPECT)
TOKEN FILTER BY Uses an aspect condition to filter the rows of the protected entity. 7.85, 7.56
ASPECT aspect
TOKEN ASPECT User-defined aspect condition. 7.77, 7.54
DEFINE PFCG_MAPPING Specifies a PFCG mapping in a PFCG condition of a CDS role. 7.72, 7.53
= Operator of a comparison expression in a literal condition.7.42
<> Operator of a comparison expression in a literal condition.7.42
< $| > Operator of a comparison expression in a literal condition.7.42
<= Operator of a comparison expression in a literal condition.7.42
>= Operator of a comparison expression in a literal condition.7.42
?= Operator of a comparison expression in a literal condition.7.65, 7.51
BETWEEN Operator of a literal condition.7.69, 7.52
LIKE Operator of a literal condition.7.62, 7.50
IS INITIAL Operator of a literal condition.7.78, 7.55
IS NULL Operator of a literal condition.7.69, 7.52
BYPASS WHEN
TOKEN BYPASS WHEN Defines a condition for bypassing an authorization. 7.78, 7.55
IN SCENARIO
TOKEN IN SCENARIO Specifies a switchable authorization check for an authorization object. 7.77, 7.54
INHERITING CONDITIONS FROM ENTITY
TOKEN INHERITING CONDITIONS FROM ENTITY Defines an inheritance condition of a CDS role. 7.72, 7.53
INHERITING CONDITIONS FROM SUPER
TOKEN INHERITING CONDITIONS FROM SUPER Defines an inheritance condition of a CDS role. 7.77, 7.54
REPLACING
TOKEN REPLACING Can be used to modify inherited access conditions. 7.77, 7.54
IF ... THEN ... ELSE ...
TOKEN IF THEN ELSE Defines a control structure as part of an access condition in a CDS role.7.88, 7.57
SACF_CHECK_IN_USE
TOKEN SACF_CHECK_IN_USE DCL function. 7.85, 7.56
OPTIONAL_ELEMENT_EXISTS
TOKEN OPTIONAL_ELEMENT_EXISTS DCL function. 7.85, 7.56
SWITCH_RUNTIME_STATE
TOKEN SWITCH_RUNTIME_STATE DCL function. 7.91, 7.58
TOGGLE_RUNTIME_STATE
TOKEN TOGGLE_RUNTIME_STATE DCL function. 7.91, 7.58
BEGIN_SECTION SAP_ONLY
CONTEXT_NODE_EXISTS
TOKEN CONTEXT_NODE_EXISTS DCL function. 7.86, 7.57
CONTEXT_NODE_VALUES
TOKEN CONTEXT_NODE_EXISTS DCL function. 7.86, 7.57
END_SECTION SAP_ONLY

CDS Access Policy

Keywords and Additions Language ElementMeaningABAP Release
DEFINE ACCESSPOLICY
TOKEN DEFINE ACCESSPOLICY Defines a CDS access policy. 7.73, 7.53
DEFINE PFCG_MAPPING ...
TOKEN DEFINE PFCG_MAPPING Defines a PFCG mapping in an access policy.7.73, 7.53
CONSTRAINT ID
TOKEN CONSTRAINT ID Defines further restrictions for authorization fields of authorization objects in a CDS access policy.7.77, 7.54
DEFINE ASPECT ... AS SELECT FROM ...
TOKEN DEFINE ASPECT AS SELECT FROM Defines a user-defined aspect as part of a CDS access policy. 7.77, 7.54
WITH USER ELEMENT
TOKEN WITH USER ELEMENT Defines an element of an aspect entity as input field for the user name in the CDS access policy. 7.77, 7.54
WITH FILTER ELEMENTS
TOKEN WITH FILTER ELEMENTS Defines the filter element of an aspect entity in a CDS access policy. 7.85, 7.56
BYPASS WHEN
TOKEN BYPASS WHEN Defines a condition for bypassing an aspect in a CDS access policy. 7.77, 7.54