Leveraging Bex queries in S/4 Embedded Analytics

In an ideal Virtual Data Model, we will have consumption CDS acting is the query for reporting integration. Either it can be used in UI5 development or in analytical reporting – SAC, Power BI, Tableau etc.

S/4 Embedded Analytics project works on the core VDMs and allows the high level of customization to the existing CDS by copying the standard into custom CDS. The beauty of VDM is its attribute of reusability.

However, there will be situations where the consumption CDS will have some limitations and the solution needs Bex to be implemented on top of composite views.

This is in line with SAP’s standard Bex query which are built on top of BW info provider within S/4 landscape without having need of a separate BW box. However, going live with and without BW box is altogether a new topic and we have many articles on the similar line, which is not in the scope of this blogpost.

There are many out of the box SAP standard Bex queries provided which are working behind the scenes of FIORI applications.

The only effort in this topic is to bring the awareness of Bex inside S/4 Embedded Analytics and make your analytical solutioning more powerful to address any level of customization,

In an ideal Virtual Data Model, we will have consumption CDS acting is the query for reporting integration. Either it can be used in UI5 development or in analytical reporting – SAC, Power BI, Tableau etc.

S/4 Embedded Analytics project works on the core VDMs and allows the high level of customization to the existing CDS by copying the standard into custom CDS. The beauty of VDM is its attribute of reusability.

However, there will be situations where the consumption CDS will have some limitations and the solution needs Bex to be implemented on top of composite views.

This is in line with SAP’s standard Bex query which are built on top of BW info provider within S/4 landscape without having need of a separate BW box. However, going live with and without BW box is altogether a new topic and we have many articles on the similar line, which is not in the scope of this blogpost.

There are many out of the box SAP standard Bex queries provided which are working behind the scenes of FIORI applications.

The only effort in this topic is to bring the awareness of Bex inside S/4 Embedded Analytics and make your analytical solutioning more powerful to address any level of customization.

Consumption CDS:

  • ABAP CDS Consumption Views are exposed as BW Queries and can be consumed by S/4 HANA Query Browser and BI Clients like Analysis for Office and Design Studio or any other reporting tool.
  • The consumption view is written on top of composite view which provides factual and cube data.
  • @VDM.Viewtype: #CONSUMPTION

Example – Consumption CDS – Trial Balance:

Standard Scenario – as per VDM:

Bex Query:

Business Explorer (BEx) is a component of SAP BI that provides flexible reporting and analysis tools that we can use for strategic analysis

Enables the data analysis in the BI system by defining queries for Info-Providers (or Composite CDS) using the BEx Query Design

S/4 standard Fiori apps based on Bex queries.

Bex capabilities:

  • Variables – customized default value
  • ABAP integration – Custom code
  • Restricting characteristics to characteristic values – at the query level
  • Restricted Key Figures
  • Exception handling – Exception or threshold for query
  • Exception Cells – Cell specific and intersection
  • High level of customization with structure

Example – Bex query – Cost Centers Plan/Actual

Bex Scenario – Architecture

Case Study:

There will be scenarios, where user wants to view the customized grouping in the report, which will be difficult to achieve at the reporting side. And to include such detailed level of customized grouping in the CDS needs hard coding and flagging for each grouping. This is very bad way of programming and results in performance bottleneck. Here is an example demonstrating the same.

Conclusion: To achieve this level of customized grouping which is very much simpler in Bex when compared to CDS and keeping the performance as one of the metrics the solution in S/4 Embedded project is to include Bex queries as highlighted in the below architecture diagram. Since Consumption CDS is not that matured or powerful, in most of the cases, the limitation of Consumption CDS will be addressed using Bex query.