Skip to Content
Personal Insights

DDIC-objects that miss an enhancement-category – part 2 – use CDS-views!

First part:

I created a cds view doing the needed join:

@AbapCatalog.sqlViewName: 'z_i_tabdevc'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'DDIC-Tables (+Structures) with associated Packages'
define view zz_i_tablesDevclas as select from dd02l
left outer join tadir
on dd02l.tabname = tadir.obj_name

left outer join tdevc on
tadir.devclass = tdevc.devclass
tabname as tableName,
tabclass as tableClass,
exclass ,
dd02l.as4user as lastChagedBy,
as4date as lastChangedAtDate,
as4time as lastChangedAtTime,

tadir.devclass as devPackage,


…and on top of that another one implementing the where clause:

@AbapCatalog.sqlViewName: 'z_i_noenhcat'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'DDIC-Tabellen mit fehlender Erweiterungskategorie'
define view zz_i_tablesNoEnhCat as select from zz_i_tablesDevclas
where exclass = '0'

I tested if it works like expected using the preview (F8) in AdT as well as the SQL-console.Then I switched back to my report.

I changed the typing to the CDS-view:

gty_data type zz_i_tablesnoenhcat

And the select as well:

* select * from dd02l
* into CORRESPONDING FIELDS OF table ct_data
* where tabname in so_tabna
* and exclass = 0

select * from zz_i_tablesNoEnhCat into CORRESPONDING FIELDS OF TABLE @ct_data
where tablename in @so_tabna .

…and – using the filter in the SALV table to only see “our” component – I was done!


– I made 2 separate views as I think the first one might be re-used in some other case, maybe. (And the extra view was very little overhead).
– not sure if I should have created yet another vie – a consumption view – to use in the report?!
– I won’t do it (now) but it sure would be easy to build a FioriElements ListeReportApp on top of what I created (it is one of the benefits of this approach )
– it’s not hard to to, it’s only hard to get started – next time will be better, as I now have a reference
– naming the SE11 view part if the cds is not easy – so few characters! 🙁

Do you use CDS-views already? How does it work for you?



Editr: Next part:

1 Comment
You must be Logged on to comment or reply to a post.
  • I’ve started with CDS views.  They are still strange to me.  I tend to stack them on top of each other like you did in this example. (Two views)  I keep thinking that I’ll be able to reuse what I’ve created.  Sadly, I have not had a lot of time on FIORI apps.  So using my CDS views are within an ABAP type UI.

    My recent project is workflow!  It’s been awhile and I’m looking forward to it.  But now I’ll step away from CDS views for a bit.  I think.  I could use them………..  I’m thinking now and that’s dangerous.

    Thank you for both blogs!