Page tree
Skip to end of metadata
Go to start of metadata

CDS Query: Exception Aggregation

As explained in AnalyticsDetails:ExceptionAggregation it is possible to use the OLAP feature Exception Aggregation in the context of CDS Queries. In general(see BWonHANA: Analytical Engine) features like a Exception Aggregation can be processed on the Hana database(called 'pushdown') in order to improve the performance. In case of CDS queries, such a pushdown is supported as of the releases BW753 and BW/4Hana 2. See Data Aging and Hana Pushdown for further details.

In the following we discuss some technical details of this annotation and the corresponding pushdown with the help of an example.


ABAP Perspective in Hana Studio

Definition of CDS Query(@Analytics.query: true):

This means, that the key figure 'Max + Input' is a formula with exception aggregation SUM regarding the characteristic Flightdate. See Exception Aggregation for a detailed discussion of this OLAP feature.

Transaction RSRT

When the query is executed in RSRT

and enter the value 5 into the variable, the following result is displayed(after some additional navigation steps):

The key figure 'Max + Input' works as expected(see Exception Aggregation) : the calculation (385 + 5) is done before aggregation SUM is carried out over Flightdate. Compare this with the formula 'Max - Input' which does not use any kind of exception aggregation.

Technical Information

The button Technical Information displays a summary of settings and technical features of a given query in RSRT. Among others you can also find find details to the exception aggregation defined in the query:

Hana Pushdown

Due to the default setting(trexops=9) in case of CDS queries, in general a pushdown is carried out for such CDS queries. There is no annotation which can be used to specify the trexops mode, however, if necessary(e.g. as a workaround when issues occur during the pushdown) the setting can be changed locally in RSRT(see trexops).

You can check whether a pushdown is carried out e..g by taking a look at the so called Decrypt log(see Execute&Explain (Query Decrypt and Simple Example):

The log is displayed when you use the back button in RSRT:

So, according to the log, the processing of the key figure "Max + Input" is done on the Hana database, the other key figures are executed in ABAP.

It is always possible to switch off/on the pushdown during query runtime in RSRT:

If there is no pushdown, you only get an SQL statement displayed and no Hana calculation view as in Simple Example:

If necessary(e.g. as a workaround when issues occur during the pushdown) the trexops setting can be changed locally in RSRT(see trexops).

  • No labels