With SAP NW ABAP 7.4 SP5 the first instalment of Core Data Services (CDS) support in ABAP was delivered (see
New Data Modeling Features in SAP NW ABAP 7.4 SP5). Since CDS is a relatively new technology, new features are constantly being added. Below is a short overview of which features were released with which SAP NW ABAP version and support package. For details about the features you should check out the
7.40 ABAP Keyword Documentation,
7.50 ABAP Keyword Documentation and
7.51 ABAP Keyword Documentation.
ABAP Core Data Services (ABAP CDS)
SAP NW ABAP |
SQL Joins |
SQL Set Operations |
SELECT Clauses |
7.4 SP5 |
- INNER JOIN
- LEFT OUTER JOIN
- RIGHT OUTER JOIN
|
|
|
7.4 SP8 |
|
|
|
7.5 |
|
|
|
7.51 |
|
|
|
SAP NW ABAP |
Literals |
Arithmetic Operators |
Conditional Expressions |
7.4 SP5 |
- In SELECT list, e.g. 'literal' AS fieldName
- As RHS value
|
|
- Boolean Operators
- Comparison Operators
- BETWEEN, = , <>, <, >, <=, >=, LIKE
- IS [NOT] NULL**
** Only in WHERE conditions |
7.4 SP8 |
|
|
|
7.5 |
|
|
|
7.51 |
|
|
|
SAP NW ABAP |
Aggregate Functions |
Numeric Functions |
String Functions |
7.4 SP5 |
- AVG( [DISTINCT] )
- MAX
- MIN
- SUM( [DISTINCT] )
- COUNT( [DISTINCT] )
- COUNT( * )
|
|
|
7.4 SP8 |
|
- ABS
- DIV (Integer-based division)
- DIVISION (Decimal-based division)
- FLOOR
- ROUND
|
|
7.5 |
|
|
- CONCAT_WITH_SPACE
- INSTR
- LEFT
- LENGTH
- LTRIM
- RIGHT
- RPAD
- RTRIM
|
7.51 |
- AVG( [AS] ) to specify return type
|
|
|
SAP NW ABAP |
Byte String Functions |
Date and Time Functions |
Other Functions |
7.4 SP5 |
|
|
- CAST to built-in DDIC types, e.g.: abap.fltp
|
7.4 SP8 |
|
|
- COALESCE
- CURRENCY_CONVERSION
- UNIT_CONVERSION
- DECIMAL_SHIFT
|
7.5 |
|
- DATS_DAYS_BETWEEN
- DATS_ADD_DAYS
- DATS_ADD_MONTHS
- DATS_IS_VALID
- TIMS_IS_VALID
- TSTMP_IS_VALID
- TSTMP_CURRENT_UTCTIMESTAMP
- TSTMP_SECONDS_BETWEEN
- TSTMP_ADD_SECONDS
|
- CAST
- to data elements, e.g. CHAR80
- can be nested
|
7.51 |
|
- ABAP_SYSTEM_TIMEZONE
- ABAP_USER_TIMEZONE
- TSTMP_TO_DATS
- TSTMP_TO_TIMS
- TSTMP_TO_DST
- DATS_TIMS_TO_TSTMP
|
- CAST
- PRESERVING TYPE
- SSTRING to other types
- CLNT, LANG, TIMS, UNIT to data elements of type CHAR and SSTRING
- CHAR, SSTRING, NUMC to ACCP and vice versa
- Aggregate function as operand
|
SAP NW ABAP |
Conditional (CASE) Expressions |
Extensibility |
(Unmanaged) Associations |
7.4 SP5 |
- "Simple" CASE (behaves like switch statement)
- Nested CASE statements
|
$EXTENSION.* (support for database table extensions) |
- Path expressions in
- SELECT list
- FROM clause
- WHERE clause
- HAVING clause
- Filter conditions in path expressions, e.g.: Products._Texts[ langu = 'EN' ] as english_name
|
7.4 SP8 |
- "Searched" CASE (behaves like if ... else if)
|
EXTEND VIEW**
** Added elements cannot be input parameters, path expressions or aggregate expressions |
|
7.5 |
- CASE expressions can be used as operands in CAST functions
|
EXTEND VIEW**
** Input parameters, path expressions and conversion, date and time functions can be added/used |
|
7.51 |
|
EXTEND VIEW**
** Views with aggregate functions, GROUP BY clauses and UNIONs can be extended |
- Association definitions in views with UNIONs
- Default filters for associations (WITH DEFAULT FILTER)
- Cardinality "to many" ( *: ) can be specified in path filters
|
SAP NW ABAP |
Session Variables |
Input Parameters |
Other |
7.4 SP5 |
|
|
|
7.4 SP8 |
|
- Input parameters on most DBs**
** Use ABAP API cl_abap_dbfeatures=>use_features to check if your DB supports CDS views with input parameters |
|
7.5 |
- $session.user (sy-uname)
- $session.client (sy-mandt)
- $session.system_language (sy-langu)
|
- Input parameters on AnyDB
|
** SAP HANA only |
7.51 |
- $session.system_date (sy-datum)
|
|
- Metadata Extensions (separate annotation "files")
|
SAP NW ABAP |
"Core" Annotations |
Further Information |
7.4 SP5 |
- End-user Texts
- (Implicit) Client Handling
- SAP Buffering
- Reference Fields for amounts/quantities
|
ABAP CDS in Release 7.40, SP05 |
7.4 SP8 |
- Data Aging
- Compiler (compare filter conditions of path expressions to reduce number of JOINs)
|
ABAP CDS in Release 7.40, SP08 |
7.5 |
- Environment.systemField (assign ABAP system fields as default values to input parameters). Possible values:
- #CLIENT (sy-mandt)
- #SYSTEM_DATE (sy-datum)
- #SYSTEM_TIME (sy-uzeit)
- #SYSTEM_LANGUAGE (sy-langu)
- #USER (sy-uname)
|
ABAP CDS in Release 7.50 |
7.51 |
- Enhanced client-handling (@ClientHandling replaces @ClientDependent)
- Specify key fields of CDS database view (@AbapCatalog.preserveKey)
- NULL values for annotations
|
ABAP CDS in Release 7.51 |