Skip to Content
Technical Articles
Author's profile photo Andrea Schlotthauer

Feature Matrix: Data Modeling with ABAP Core Data Services

This page offers an overview of all available CDS DDL features. It can be used like a cheat sheet to look up features and their release dates. It also offers links to data sources with further information on each feature. It will be updated regularly to always reflect the current ABAP CDS DDL feature scope. | Last update: 2023-08

ABAP CDS Feature Tables in the ABAP Keyword Documentation

Contents:

  1. CDS entities
  2. CDS user-defined types
  3. CDS user-defined functions
  4. CDS associations (regular, compositions, and to-parent)
  5. Joins
  6. Clauses
  7. Operands and expressions
    1. Operands
      1. Typed literal
      2. Untyped literal
      3. Field
      4. Parameter
      5. Session variable
    2. Expressions
      1. Arithmetic expression
      2. Aggregate function
      3. Case distinction (simple and complex)
      4. Cast expression (including new casts since release 7.55)
      5. Reusing expressions from the SELECT list with $projection 
      6. Relational operators
      7. Path expressions
      8. Amounts and quantities in expressions
    3. Built-in functions
      1. Numeric functions
      2. String functions
      3. Coalesce function
      4. Conversion functions (type conversion, unit and currency conversion, date and time conversion)
  8. CDS system entities
  9. CDS tuning objects
  10. CDS entity extensions
  11. Development pipeline
  12. Documentation resources
  13. ABAP Learning Resources

1. CDS entities

The following CDS entities are available in release ABAP Platform 2022 for data modeling.

Note: Column Release lists three release numbers. The first one refers to the ABAP release, the second one to the kernel release and the third one to the ABAP Platform Classic release.

CDS entity type ABAP CDS statement Purpose Release Further info

CDS view entity

 

DEFINE VIEW ENTITY
  • Data selection
  • VDM consumption view

7.55

7.80

2020

Docu

Blog post

CDS projection view of type transactional query DEFINE VIEW ENTITY
PROVIDER CONTRACT
TRANSACTIONAL_QUERY
AS PROJECTION ON
  • Exposing data of the underlying CDS data model
  • Top-most layer of a CDS data model
  • Used within RAP for modeling the projection layer of a RAP BO.

7.54

7.76

1909

 

Docu

Blog post

CDS projection view of type transactional interface DEFINE VIEW ENTITY
PROVIDER CONTRACT
TRANSACTIONAL_INTERFACE
AS PROJECTION ON
  • Stable public interface. Should be released under a stability contract, such as C1 or C0.
  • Sits on top of a CDS data model.
  • Another layer of CDS transactional queries can be built on top of a transactional interface.
  • Used within RAP as basis for a RAP BO interface.

7.57

7.86

2022

 

Docu

Blog post

CDS projection view of type analytical query DEFINE TRANSIENT VIEW ENTITY
PROVIDER CONTRACT
ANALYTICAL_QUERY
AS PROJECTION ON
  • Sits on top of an analytical cube view and defines an analytical query.
  • The runtime of an analytical projection view is an analytical engine.
  • Transient artifact, that means, no SQL view is created on the database.

7.57

7.86

2022

Docu

Blog post

CDS table function DEFINE TABLE FUNCTION
  • Encapsulates an AMDP function in a CDS object.
  • SAP HANA breakout.

7.50

7.61

1511

Docu

Blog post

CDS hierarchy DEFINE HIERARCHY
  • Models an SQL hierarchy in CDS.

7.53

7.73

1808

Docu

Blog post

CDS custom entity DEFINE CUSTOM ENTITY
  • Allows developers to implement their own data retrieval via an ABAP class.
  • Used within RAP to implement an unmanaged query.
  • Not created on the database and therefore, not accessible with ABAP SQL.

7.54

7.75

1909

Docu
CDS abstract entity DEFINE ABSTRACT ENTITY
  • Represents a data type.
  • Not created as a database object and therefore, not accessible with ABAP SQL.
  • Used within RAP as action or function parameter.

7.53

7.70

1809

 

Docu

CDS DDIC-based view (obsolete) DEFINE VIEW
  • Data selection.
  • Superseded by CDS view entities.
  • Obsolete since 7.56, since CDS view entities and a migration tool have been available.

7.40 SP05

7.41

 

Docu

Did you know?

  • Check our Data Source Matrix to learn how to combine data sources in CDS: Data sources after FROM and association targets.
  • CDS entities are like chameleons: even after you’ve activated and transported an entity, you can change the type of your CDS entity. For example, you have a CDS view and want to convert it into a custom entity for specialization. Or you want to convert an abstract entity into a view to have more options. As long as the consumers are not affected, just change the syntax and activate and transport the changed object.

2. CDS user-defined types

CDS Simple Types

CDS simple types define elementary data types natively in ABAP CDS. A CDS simple type can be enriched with metadata using CDS annotations. The syntax statement for defining a CDS simple type is DEFINE TYPE.

Example:

@EndUserText.label: 'This is a simple type'
define type myType : abap.char(5);

CDS Enumerated Types

CDS enumerated types make the concept of enumerations available in ABAP CDS.

With a CDS enumerated type, you can define a fixed set of predefined constants. Variables or data objects typed with an enumerated type only accept one of the predefined values as input. Any wrong input leads to an error message. Thus, enumerations contribute to type safety and data consistency.

The syntax statement for defining a CDS enumerated type is DEFINE TYPE … ENUM.

Example:

@EndUserText.label: 'CDS enum type with base type char'
define type DEMO_CDS_ENUM_CHAR : abap.char(1) enum
{
  initial_value = initial;
  first_value   = 'A';
  second_value  = 'B';
}

3. CDS user-defined functions

SQL-based scalar functions

An SQL-based scalar function is a user-defined function that accepts multiple input parameters and returns exactly one scalar value. A scalar function allows developers to encapsulate complex algorithms into manageable, reusable code that can then be used in all operand positions of CDS view entities that expect scalar values. A scalar function is linked with an AMDP function in which it is implemented using SQLScript.

A SQL-based scalar function consists of three repository objects:

  • CDS scalar function definition defined in ABAP CDS using DEFINE SCALAR FUNCTION.
  • A CDS scalar function implementation reference that binds the scalar function to a runtime engine and to an AMDP function implementation.
  • An AMDP method that implements the CDS scalar function as database function in SQLScript.

Example:

CDS scalar function definition:

define scalar function DEMO_CDS_SCALAR_RATIO
  with parameters
    portion: numeric
    total  : type of portion
  returns abap.decfloat34;

CDS scalar function implementation reference:

AMDP function implementation:

  METHOD execute BY DATABASE FUNCTION
                 FOR HDB
                 LANGUAGE SQLSCRIPT
                 OPTIONS READ-ONLY.
    result = portion / total * 100;
  ENDMETHOD.

4. CDS associations

Associations describe the relationships between CDS entities. They define a join that is instantiated only when fields are retrieved from the associated entity.

Use cases of CDS associations and how they are transformed into joins are documented here. Moreover, there’s a blog post: From Open SQL Joins to CDS Associations | SAP Blogs.

Types of associations:

Regular, not specialized CDS association

  • Available since ABAP release 7.4 SP5.
  • Available in CDS view entities, CDS projection views, CDS custom entities, CDS abstract entities, and CDS DDIC-based views.
  • Docu
  • Syntax:
ASSOCIATION [ OF {EXACT ONE | MANY | ONE} TO {EXACT ONE | MANY | ONE} ] 
  TO target [AS _assoc] 
  ON cds_cond 
  [ WITH DEFAULT FILTER cds_cond ]

CDS composition

  • Specialized CDS association that defines the current entity as parent and the composition target as child.
  • Available since ABAP release 7.75, ABAP Platform Classic 1809 SP01.
  • Available in CDS view entities, CDS projection views, CDS custom entities, CDS abstract entities, and CDS DDIC-based views.
  • Docu
  • Syntax:
COMPOSITION [ OF {EXACT ONE | MANY | ONE} 
              TO {EXACT ONE | MANY | ONE} ] 
  target [AS _compos]

Association to parent

  • Specialized CDS association that defines the current entity as child and the association target as parent. The child depends on the parent and cannot exist without the parent. For example, a sales order item (composition child) always belongs to a sales order header (composition parent).
  • Available since ABAP release 7.75, ABAP Platform Classic 1809 SP01.
  • Available in CDS view entities, CDS projection views, CDS custom entities, CDS abstract entities, and CDS DDIC-based views.
  • Docu
  • Syntax:
ASSOCIATION TO PARENT target [AS _assoc] ON $projection.cds_cond

5. Joins

In ABAP CDS, the following join types are available for modeling relationships between CDS entities:

Join type Available as of
Inner join 7.4 SP05
Left outer join 7.4 SP05
Right outer join 7.4 SP05
Cross join 7.51

6. Clauses

Note: Column Release lists three release numbers. The first one refers to the ABAP release, the second one to the kernel release and the third one to the SAP BTP ABAP Environment release.

Clause Function Release Further info
WHERE Defines a filter condition. ABAP release 7.4 SP5 Docu
GROUP BY Groups the rows in the result set by their content. Required as soon as there are aggregate expressions. ABAP release 7.4 SP5 Docu
HAVING Can be used together with GROUP BY to specify a further filter condition. ABAP release 7.4 SP5 Docu
EXCEPT

Returns all distinct rows of the first result set that are not part of the following result sets.

7.56

7.85

2108

Docu
INTERSECT

Returns all distinct rows that are part of all result sets.

7.56

7.85

2108

UNION

Merges the result sets of all queries.

ABAP release 7.4 SP5

7. Operands and expressions

7.1 Operands

Note: Column Release lists three release numbers. The first one refers to the ABAP release, the second one to the kernel release and the third one to the SAP BTP ABAP Environment release.

Operand Explanation Release Further info
Typed literal

Data types: Int1, int2, int4, int8, dec, decfloat16, decfloar34, fltp, char, string, sstring, raw, rawstring, numc, clnt, lang, dats, datn, tims, timn, utcl, curr, cuky, quan, unit.

Syntax: abap.dtype’value’

Example: utcl’2020-01-02 23:59:59,1234567′

7.56

7.83

2102

Docu
Untyped literal

Data types: char, int1, int2, int4, int8, fltp.

Note: Typed should be preferred over untyped!

ABAP release 7.4 SP5 Docu
Field Field of a data source of the current entity. Alias name using AS. If several data sources, prefix recommended. ABAP release 7.4 SP5 Docu
Parameter Input parameter from the parameter list. ABAP release 7.4 SP8 Docu
Session variable System fields that can be accessed with the syntax $session.<name>. Similar to ABAP system fields (sy-<name>). The following session variables are available:

  • user
  • client
  • system_language
  • system_date
  • user_timezone
  • user_date
ABAP release 7.5, some were added later Docu

7.2 Expressions

Arithmetic expressions

  • Available since ABAP release 7.4 SP5
  • Docu
Operator Meaning
+ Addition
Subtraction
* Multiplication
/ Division

Aggregate functions

  • Available since ABAP release 7.4 SP5
  • Docu
Function Meaning
MAX (ALL | DISTINCT arg) Returns the greatest value of arg.
MIN (ALL | DISTINCT arg) Returns the least value of arg.
AVG (ALL | DISTINCT arg) Average value of arg. Must be specified with the addition AS dtype.
SUM (ALL | DISTINCT arg) Sum of arg.
COUNT (DISTINCT arg) The number of distinct values of arg is counted.
COUNT(*) The number of rows in the result set is counted.

Case distinction

  • Simple case is available since ABAP release 7.4 SP5
  • Searched case is available since 7.4 SP8
  • New in release kernel release 7.89 | ABAP release 7.57 | SAP BTP ABAP Environment 2208: THEN ELSE NULL is available to explicitly define the null value as return value if no matches are found.
  • Docu

A case expression in ABAP CDS always returns exactly one value, depending on the conditions. The simple case expression compares an expression to several other expressions for equality:

CASE operand 
           WHEN operand1 THEN result1 
          [WHEN operand2 THEN result2] 
           ... 
          [{ELSE resultn | ELSE NULL}] 
      END

The complex case expression (aka ‘searched case’) evaluates N independent conditions. The first case to be evaluated to TRUE returns the result. If none of the conditions are true, the result is determined by the ELSE branch:

CASE WHEN cds_cond1 THEN result1 
        [WHEN cds_cond2 THEN result2] 
        [WHEN cds_cond3 THEN result3] 
          ... 
        [{ELSE resultn | ELSE NULL}] 
    END

Cast expression

  • Data type conversion
  • Available since ABAP release 7.4 SP5, but the cast matrix has been extended over time.
  • Docu (including full cast matrix)
  • Syntax:
  • CAST( <expression> AS <datatype> [PRESERVING TYPE])
  • New casts since ABAP release 7.55
  • FROM TO
    SSTRING DECCURRQUANINT1INT2INT4INT8DECFLOAT16, and DECFLOAT34
    CHAR DECCURRQUANINT1INT2INT4INT8DECFLOAT16, and DECFLOAT34
    DATS DECCURRQUANINT1INT2INT4INT8DECFLOAT16, and DECFLOAT34
    TIMS DECCURRQUANINT1INT2INT4INT8DECFLOAT16, and DECFLOAT34
    DECFLOAT16 CHAR
    DECFLOAT34 CHAR
    FLTP DECCURRQUANINT1INT2INT4INT8DECFLOAT16, and DECFLOAT34

Reusing expressions from the SELECT list

  • $projection.elementName reuses an expression from the SELECT list in another operand position of the same CDS entity. This enables further processing of calculated fields and avoids the workaround of building a view stack for that purpose.
  • Available since ABAP release 7.56 | kernel release 7.84 | SAP BTP ABAP Environment 2105
  • Docu
  • Example:
  • define view entity DEMO_CDS_EXPRESSION_REUSE 
      as select from demo_expressions 
    { 
          //arithmetic expression 
          abap.decfloat34'123.45E6'              as arith, 
          $projection.arith * 2                  as arith_reuse, 
    
          //cast expression 
          cast(char1 as abap.numc(10))           as cast1, 
          coalesce($projection.cast1, numc2)     as cast_reuse, 
    
          //built-in function 
          abs(dec1)                              as builtIn, 
          cast($projection.builtIn as abap.int4) as builtIn_reuse, 
    }
    

Relational operators

Operator Meaning Release
= Equal ABAP release 7.4 SP5
<> Not equal ABAP release 7.4 SP5
< Less than ABAP release 7.4 SP5
> Greater than ABAP release 7.4 SP5
<= Less than or equal to ABAP release 7.4 SP5
>= Greater than or equal to ABAP release 7.4 SP5
[NOT] BETWEEN Interval comparison ABAP release 7.4 SP5
LIKE Pattern comparison ABAP release 7.4 SP5
IS [NOT] NULL Identifies the null value ABAP release 7.4 SP5
IS [NOT] INITIAL Identifies initial values ABAP release 7.73

Path expressions

Path expressions can be used to include fields from associated sources in the field list of the CDS entity. A path expression can also go over several levels. It is also possible to add attributes to the evaluation of the associations, for example to filter or to define the join type.

Example:

_Items[1:currency <> 'EUR'].material = 'WOOD' 

Amounts and quantities in expressions

Amount and quantity handling in expressions in ABAP CDS has been overhauled since ABAP release 7.56 | kernel release 7.84 | SAP BTP ABAP Environment 2105. See the following blog post for details: ABAP CDS Cheat Sheet: Amounts and Quantities in ABAP CDS | SAP Blogs.

7.3 Built-in functions

Numeric functions 

Function Description Release
ABS(arg) Positive absolute value of arg. ABAP release 7.4 SP8
CEIL(arg) Rounding up arg to the nearest integer ABAP release 7.4 SP5
DIV(arg1, arg2) Integer part of the division ABAP release 7.4 SP8
DIVISION(arg1, arg2, dec) arg1 divided by arg2 rounded to dec digits ABAP release 7.4 SP8
FLOOR(arg) Rounding down arg to the nearest integer ABAP release 7.4 SP8
MOD(arg1, arg2) Remainder of division of arg1 by arg2 (modulus) ABAP release 7.4 SP5
ROUND(arg,pos) Commercial rounding of argpos decimal places ABAP release 7.4 SP8

String functions

Function Description Release
CONCAT(arg1,arg2) Concatenate arg1 and arg2. ABAP release 7.4 SP8
CONCAT_WITH_SPACE(arg1, arg2, spaces) Concatenate strings arg1 and arg2. The number of blanks specified in spaces is inserted between arg1 and arg2. ABAP release 7.5
INSTR(arg,sub) Position of the first occurrence of sub in arg. ABAP release 7.5
LEFT(arg,len) Left part of arg of length len. ABAP release 7.5
LENGTH(arg) Length of the string arg. ABAP release 7.5
LOWER(arg) Converts the string arg to lower case letters. ABAP release 7.51
LPAD(arg,len,src) Filling arg from left with src up to len. ABAP release 7.4 SP5
LTRIM(arg,char) Remove all occurrences of a character char from the left of arg, e.g. leading 0 or blank. ABAP release 7.5
REPLACE(arg1, arg2, arg3) Replaces arg2 in arg1 with arg3. ABAP release 7.4 SP8
REPLACE_REGEXPR(
PCRE  => pcre,
VALUE =>arg1,
WITH  => arg2,
RESULT_LENGTH => res,optional:[OCCURRENCE],
[CASE_SENSITIVE],
[SINGLE_LINE],
[MULTI_LINE],
[UNGREEDY])

Replaces the Perl Compatible Regular Expression (PCRE) pcre in the string arg1 with the character string arg2.

Only available in CDS view entities.

ABAP release 7.57

kernel release 7.81

SAP BTP ABAP Environment 2208

RIGHT(arg,len) Right part of arg of length len ABAP release 7.5
RPAD(arg,len,src) Filling arg from right with src up to len. ABAP release 7.5
RTRIM(arg,char) Remove all occurrences of a character char from the right of arg, e.g. trailing 0 or blank. ABAP release 7.5
SUBSTRING(arg,pos,len) Substring arg from the position pos with length len. ABAP release 7.4 SP5
UPPER(arg) Converts the string arg to upper case letters. ABAP release 7.51

Coalesce function

The coalesce function checks for null values.

Syntax:

COALESCE( arg1, arg2 )

It checks whether arg1contains a null value. If yes, then it returns the value of arg2. If no, then it returns the value of arg1. If both arg1and arg2are null, then the null value is returned.

Docu

Available since ABAP release 7.4 SP08

Conversion functions

Type conversion functions

  • Cover special data types that cannot be handled using a cast expression
  • Docu
Function Description Release
FLTP_TO_DEC( arg AS dtype ) Converts arg of data type FLTP to a packed number. ABAP release 7.51
BINTOHEX( arg ) Converts a byte string arg to a character string. ABAP release 7.5
HEXTOBIN( arg ) Converts a character string arg to a byte string. ABAP release 7.5

Unit and currency conversion functions

Function Description Release
UNIT_CONVERSION Performs a unit conversion ABAP release 7.4 SP8
CURRENCY_CONVERSION Performs a currency conversion ABAP release 7.4 SP8
GET_NUMERIC_VALIE Returns the numeric value of a currency or quantity field without its currency or unit key.

ABAP release 7.56

Kernel release 7.83

SAP BTP ABAP Environment 2102

CURR_TO_DECFLOAT_AMOUNT Converts a currency field of data type CURR into a currency field of data type DECFLOAT34.

ABAP release 7.56

Kernel release 7.83

SAP BTP ABAP Environment 2102

Date and time conversion functions

  • Perform operations with dates, times, and timestamps.
  • Docu
Function Description Release
DATN_DAYS_BETWEEN(date1,date2) Calculates the difference between date1 and date2. ABAP release 7.54
kernel release 7.77
SAP BTP ABAP Environment 1908
DATN_ADD_DAYS(date,numdays) Adds numdays days to date. ABAP release 7.54
kernel release 7.77
SAP BTP ABAP Environment 1908
DATN_ADD_MONTHS(date,nummonths) Adds nummonths months to date. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
DATS_IS_VALID(date) Determines whether date contains a valid date. ABAP release 7.5
DATS_DAYS_BETWEEN(date1,date2) Calculates the difference between date1 and date2. ABAP release 7.5
DATS_ADD_DAYS(date,numdays,on_error) Adds numdays days to date. ABAP release 7.5
DATS_ADD_MONTHS(date,nummonths,on_error) Adds nummonths months to date. ABAP release 7.5
TIMS_IS_VALID(time) Determines whether time contains a valid time. ABAP release 7.5
UTCL_CURRENT() Generates a UTC time stamp (data type UTCLONG). ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
UTCL_ADD_SECONDS(utcl,numseconds) Adds numseconds seconds to the timestamp utcl. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
UTCL_SECONDS_BETWEEN(utcl1,utcl2) Calculates the difference between utcl1 and utcl2. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
TSTMP_IS_VALID(tstmp) Determines whether tstmp contains a valid time stamp. ABAP release 7.5
TSTMP_CURRENT_UTCTIMESTAMP() Generates a UTC time stamp (data type DEC). ABAP release 7.5
TSTMP_SECONDS_BETWEEN(tstmp1,tstmp2,on_error) Calculates the difference between tstmp1 and tstmp2. ABAP release 7.5
TSTMP_ADD_SECONDS(tstmp,numseconds,on_error) Adds numseconds seconds to the timestamp tstmp. ABAP release 7.5
ABAP_SYSTEM_TIMEZONE(clnt,on_error) Returns the current system time zone. ABAP release 7.51
ABAP_USER_TIMEZONE(user,clnt,on_error) Returns the current user time zone. ABAP release 7.51
TSTMP_TO_DATS(tstmp,tzone,clnt,on_error) Extracts the local data for the time zone specified in tzone from a time stamp tstmp. ABAP release 7.51
TSTMP_TO_TIMS(tstmp,tzone,clnt,on_error)

Extracts the local time for the time zone specified in tzone from a time stamp tstmp.

ABAP release 7.51
TSTMP_TO_DST(tstmp,tzone,clnt,on_error)

Extracts the daylight saving time marker for the time zone specified in tzonefrom a time stamp tstmp.

ABAP release 7.51
DATS_TIMS_TO_TSTMP(date,time,tzone,clnt,on_error)

Constructs a time stamp from  date and timein the time zone tzone.

ABAP release 7.51
TSTMPL_TO_UTCL(tstmpl,on_error,on_initial) Converts a time stamp from data type TIMESTAMPL to UTCLONG. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
TSTMPL_FROM_UTCL(utcl,on_null) Converts a time stamp from data type UTCLONG to TIMESTAMPL. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
DATS_TO_DATN(dats,on_error,on_initial)

Converts a date from data type DATS to data type DATN.

ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
DATS_FROM_DATN(datn,on_null) Converts a date from data type DATN to data type DATS. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
TIMS_TO_TIMN(tims,on_error) Converts a time from data type TIMS to data type TIMN. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908
TIMS_FROM_TIMN(timn,on_null) Converts a time from data type TIMN to data type TIMS. ABAP release 7.54
Kernel release 7.77
SAP BTP ABAP Environment 1908

Expressions and built-in functions can be nested within each other. The expression matrix has been enhanced in the past releases.

Example:

  • Nesting of case and cast
  • Substring with cast, parameter, and arithmetic expression as operands
  • Nesting of case with another case.
 case cast( _a.char1 as char3)
          when substring( cast( 'AA' as char2), $parameters.p1, 2*2)  then 'text1'
          when case 'a' when 'b' then 'c' end                         then 'text2'
          else NULL
          end                 as CaseExp

8. CDS system entities

  • CDS system entities are CDS entities delivered with an ABAP Platform that implement basic functionality, similar to ABAP system classes.
  • Can be used as data source in other CDS entities or in ABAP SQL.
  • Available since ABAP release 7.56 | kernel release 7.84 | SAP BTP ABAP Environment 2105
  • Docu
System entity Description

SERIES_GENERATE_DATE

CDS table function that creates a table with a series of dates.

SERIES_GENERATE_INTEGER

CDS table function that creates a table with a series of numbers.

SERIES_GENERATE_TIME

CDS table function that creates a table with a series of times.

SERIES_GENERATE_TIMESTAMP

CDS table function that creates a table with a series of time stamps.

Example: Creating a series of dates using the CDS system entity SERIES_GENERATE_DATE:

FINAL(current_date) = sy-datum.
FINAL(one_year_later) = current_date + 365.

SELECT * FROM series_generate_date( step       = 30,
                                    from_value = @current_date,
                                    to_value   = @one_year_later )
  ORDER BY element_number
  INTO TABLE @FINAL(date_series_gen).

cl_demo_output=>display( date_series_gen ).

Returns a series of dates:

9. CDS tuning objects

10. CDS entity extensions

Note: Column Release lists three release numbers. The first one refers to the kernel release, the second one to the SAP BTP ABAP Environment release and the third one to the ABAP release.

Statement Can be used for Available since
EXTEND VIEW ENTITY
  • CDS view entity
  • CDS projection view
7.87 | 1911 | 7.55
EXTEND CUSTOM ENTITY CDS custom entity 7.89 | 2208 | 7.57
EXTEND ABSTRACT ENTITY CDS abstract entity 7.84 | 2105 | 7.56
EXTEND VIEW CDS DDIC-based view ABAP release 7.40, SP08

11. Development pipeline

What can you expect to see in future releases? The following features appeared in my crystal ball. But hey: no guarantee, no legal claims to be made:

  • CDS aspects: Reusable artifacts in CDS. CDS aspects allow decomposing entity definitions into parts with different lifecycles, in this way enabling separation of concerns. The approach is borrowed from disciplines like aspect-oriented programming.
  • CDS table entities: Similar to database tables defined in ABAP Dictionary, CDS table entites define structured data types in ABAP CDS. Syntax: DEFINE TABLE ENTITY.

Just can’t get enough of feature tables? The ABAP Keyword Documentation contains feature tables that list all available syntax statements plus release dates. Check them out!

ABAP CDS – Feature Tables

12. Documentation resources

13. ABAP learning resources

You can acquire more skills on the modern ABAP programming available on SAP BTP and SAP S/4HANA in the SAP Learning Journeys, such as

More role-based learning resources and opportunities to get certified are available in one place on the SAP Learning site: SAP Learning

Assigned Tags

      13 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Marc Bernard
      Marc Bernard

      Nice blog. However, I call this product documentation and expect this on help.sap.com 🙂

      How about adding a "cross-release" section there?

      Author's profile photo Andrea Schlotthauer
      Andrea Schlotthauer
      Blog Post Author

      This is a condensed version of the ABAP Keyword Documentation with the intention to give an overview of all features, without too many details.

      The ABAP Keyword Documentation is an F1 Help and we know from a survey that people do not read it top-down, but topic-wise.

      Yes you are right, there should be a Development Guide on SAP Help Portal with all this info. We are working on it 🙂

       

       

      Author's profile photo Marc Bernard
      Marc Bernard

      F1 is great and the preferred way, I agree.

      As background, many of us are building apps that need to run on several releases. That’s why such “what works where” details are essential - especially if topics are changing rapidly as visible above.

      Author's profile photo Andrea Schlotthauer
      Andrea Schlotthauer
      Blog Post Author

      Hi Marc Bernard

      here you go:

      Feature tables for the complete ABAP language plus release date are currently under construction.

      Author's profile photo Mio Yasutake
      Mio Yasutake

      Thank you for this post. It's truly helpful.
      This might be a beginner question, but what do each of the 3 releases indicate?
      For example, for typed literals, there are 7.56, 7.83 and 2102. I assume 7.83 is about ABAP release and 2102 is about BTP ABAP Environment, but what is 7.56?

      Best regards,

      Mio

      Author's profile photo Andrea Schlotthauer
      Andrea Schlotthauer
      Blog Post Author

      Hi Mio,

      good point, I should have explained that. Release numbers can be so confusing.

      I have added the release info for each feature directly in the text.

      Typed literals are available since ABAP release 7.56 (on-premise), kernel release 7.83, SAP BTP ABAP Environment 2102.

      Release info in the ABAP Keyword Documentation is available here.

      Hope this helps.

      Best regards

      Andrea

      Author's profile photo Mio Yasutake
      Mio Yasutake

      Hi Andrea,

      Thanks for your reply and updating the content. Now it's clear to me.

      Also, the ABAP keyword Documentation you shared is very helpful.

      Author's profile photo Sunil Sharma
      Sunil Sharma

      Very nice blog. Thank you!! Andrea to share this knowledge with so much of detail 🙂

      Author's profile photo Umut Turan
      Umut Turan

      Hi Andrea,

      it i a very good and helpful blog. Thank you for documenting it so thoroughly and making it available to us.

      Author's profile photo Chandra Shekar Agrawal
      Chandra Shekar Agrawal

      Hi Andrea,

      Do we have any function to get the Date from the UTCL type?  Like UTCL_TO_DATE or  TSTMP_FROM_UTCL(without long details) or any other approach to get a date from UTCL type.

      thanks,

      Chandra

      Author's profile photo Andrea Schlotthauer
      Andrea Schlotthauer
      Blog Post Author

      Hi Chandra,

      tstmp_to_dats( cast(tstmpl_from_utcl(utcl_current(), 'NULL') as abap.dec(15,0)), 'CET', $session.client, 'NULL') as DateExtract

      This works for a CDS view entity.

      Best

      Andrea

      Author's profile photo Chandra Shekar Agrawal
      Chandra Shekar Agrawal

      perfect! Thank you.

      Author's profile photo Nitish Chawla
      Nitish Chawla

      great post. Will be a go to place for me for any recall/future updates. 🙂