Skip to Content
Author's profile photo Jerry Wang

My CDS view self study tutorial – Part 2 what objects are automatically generated after you activate one CDS view

You paste the following source code for a simple CDS view into ABAP development studio and activate it:

@AbapCatalog.sqlViewName: 'zjerrySQL0208'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'test 233'
@ObjectModel: {
   createEnabled,
   deleteEnabled,
   updateEnabled
}
define view Zjerrytest20160208
as select from spfli association [0..1] to scarr as _scarr
on _scarr.carrid = spfli.carrid {
       key spfli.carrid,
       key _scarr.carrname,
       key spfli.connid,
       spfli.cityfrom,
       spfli.cityto
}

And you would like to know what objects are automatically generated during CDS view activation.

Automatically generated ABAP objects during CDS view activation

You could query table TADIR with following parameters:

/wp-content/uploads/2016/03/clipboard1_905418.png

And get answer:

DDLS: Data Definition Language SourceSTOB: Structured Object

/wp-content/uploads/2016/03/clipboard2_905419.png
The relationship among these objects is listed below:

/wp-content/uploads/2016/03/clipboard3_905468.png

And if you use the same approach described in tutorial part1, you can realize that lots of database tables “DD*” are involved during CDS view activation, for example DDLDEPENDENCY. A small tip here is, if you click “Display Object List” button, you will navigate to the package where other related ABAP artifacts within the same package are displayed as well.

/wp-content/uploads/2016/03/clipboard4_905469.png

/wp-content/uploads/2016/03/clipboard5_905470.png

Now we can go through each database table one by one.

Automatically inserted table entries during CDS view activation

Several table entries are inserted to the database tables in package SDDL during view activation.

DDDDLSRC

Query this table by specifying DDLNAME as CDS view name we specified in ABAP development studio, the name after keyword “define view” : Zjerrytest20160208, and we can find view source code stored in field SOURCE.

/wp-content/uploads/2016/03/clipboard6_905471.png

DDDDLSRC02BT

Text table which stores the view description specified via annotation @EndUserText.label.

/wp-content/uploads/2016/03/clipboard7_905472.png

DDHEADANNO

It stores all header annotation specified in CDS view source code with corresponding value.

/wp-content/uploads/2016/03/clipboard8_905473.png

DDLDEPENDENCY

It maintains relationship between the CDS core entity and automatically generated database view.

/wp-content/uploads/2016/03/clipboard9_905474.png

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Steve Mo
      Steve Mo

      Nice blog. Thanks for sharing, keep going!

      BR,

      Steve

      Author's profile photo Former Member
      Former Member

      Hi Jerry,

      Thanks a lot for your sharing.

      it's amazing that so much tables was automatically insert lines when active a CDS view.

      I also found more "DD*" tables in Package SDCBO. In a word, it's cool!

      /wp-content/uploads/2016/05/23_960018.png

      Author's profile photo Pramod Singh
      Pramod Singh

      Hi Jerry,

      Very good info :).

      Thanks for sharing and keep it on 😛 for us

      Author's profile photo Mark Saksornyuth
      Mark Saksornyuth

      Thanks for sharing. Good blog as always.

      Thanks,
      Mark