Enable CDS views for SAP Analytics
SAP Analytics Query Browser 1) gives users ability to create, consume and share SAP data using a variety of tables, charts and graphs 2) has zero maintenance or development requirements outside initial enablement detailed below and 3) leverages existing CDS views created for other business purposes for full reuse and interoperability. Below steps will quickly help validate Query Browser, update CDS views with required annotations, and quickly create the wrapper analytical queries.
First enable Query Browser
Launch Query Browser at https://<host:port>/sap/bc/ui2/flp#AnalyticQuery-browse
Ensure service VDM_VIEW_BROWSER activated from SICF transaction.
Run program SAP_RSADMIN_MAINTAIN (RSBICS_INA_RFC_DEFAULT_ALIAS,<HANA SYSTEM>) as per SAP Note 2356997 the table RSADMIN should contain entry for destination S4 system. Otherwise upon launch of any CDS view the error “Could not instantiate data source “DS_1” for query “2C<Analytical view>” will persist.
Secondly enable CDS view for Query Browser
Update existing CDS views with @Analytics.dataCategory: #CUBE and field-level annotations for summation, currency, unit of measure, etc.
- @DefaultAggregation: #SUM
- @Semantics.amount.currencyCode: ‘Currency’
- @Semantics.unitOfMeasure: true
The activation will generally guide you through all the field-level annotations which is extremely useful and time-saving.
Finally create wrapper Analytical Query
New wrapper view with @Analytics.query: true. Utilization of the code completion from Eclipse makes this quick exercise.
Launch new query from Query Browser or directly https://<host:port>/sap/bc/ui2/flp#AnalyticQuery-analyze?XQUERY=2C<Analytical Query>
Optional: Add Analytical View to Home page and try the feature “Extract to MS Excel”
From Query Browser -> Select analytical/CDS view -> drag and drop Dimensions to Rows -> when ready find Actions, send out, icon in upper right-hand corner -> “Save as Tile…”
In conclusion the Query Browser is a fantastic tool which should be leveraged by Fiori users wherever possible. Because the effort to enable these views is so minimal, it seems worthwhile to enable all your custom CDS views for use in SAP Analytics Query Browser. Therefore, with CDS views and SAP Analytics, the consumption of SAP data is easily accessible in way which is straightforward to filter, display in variety of useful ways and extract without need for any development or guidance.
Thanks for reading