Skip to Content
Technical Articles
Author's profile photo Dmitry Kuznetsov

Which CDS views do I have per application component?

I get asked quite frequently, “is there a list of all CDS Views” or, “how many views do we have in every area”. This happens both by colleagues on S/4HANA project and course participants (I sometimes get to teach S4H400, S4H410 and S4D430 for SAP). Everybody seems to want a “spreadsheet” or so 🙂

 

So, I decided to put together a few steps that will help you answer this question yourself based on S/4HANA system you got.

 

In short it is the following two steps: create a CDS view that reads metadata, consume it in reporting tools.

 

1. CDS view sample:

@AbapCatalog.sqlViewName: 'ZCVWBRWS'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'ViewBrowser Cube'
@Analytics.dataCategory: #CUBE
define view Z_C_ViewBrowser
  as select from Cds_Views_Pkg_Appcomp
{
  DDLSourceName,
  ApplicationComponentName,
  @EndUserText.label: 'Application Component'
  replace(left(ApplicationComponentName, 3), '-', '') as ApplComp,
  @DefaultAggregation: #SUM
  1                                                   as Cnt
}

 

2. Use Transaction RSRT

Query is 2CZCVWBRWS/!2CZCVWBRWS

+ Drill down by “Appl Comp”

 

* Optionally, you can showcase it in Fiori

Need to adjust the host and port in the URL

https://<your_fiori_host>:<your_fiori_port>/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html#AnalyticQuery-analyze?XQUERY=!2CZCVWBRWS

 

So, with this simple query you have an elegant way of looking at information about CDS Views, be that standard or your custom ones.

 

Cheers,

Dmitry Kuznetsov

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.