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

Table of Contents


As discussed in CDS views: HowTo use in BW contexts, in a CDS view of category cube, each key figure should be defined with @DefaultAggregation: #SUM, #MIN or #MAX, or @Aggregation.default: #NOP,  #SUM, #MIN or #MAX (the new annotation as of Note 2381161)Otherwise the field is treated as a characteristic. However, when the data type is not supported for a characteristic(e.g. CURR or DEC), the field is ignored and not  included in the InfoProvider metadata before Note 2771186 (and 2778887). After implementation of this note, the field gets a default NO2 aggregation and becomes a NO2 key figure(see Key Figures with Aggregation NOP/NO2). 

Important Points to Know

  • On cube level, only SUM,MAX and MIN are allowed, the analytic manager doesn't support the values AVG, COUNT or COUNT_DISTINCT. The special value NONE indicates that the element is not a measure(e.g. removes the definition regarding DefaultAggregation of a underlying CS cube).
    • When the aggregation NONE is used(or no aggregation at all) for a field where the data type isn't supported for a characteristic, the field is treated as a key figure and gets the NO2 aggregation assigned.
  • On query level, basically the annotation @DefaultAggregation is restricted to the value #FORMULA which indicates that calculated elements are calculated after the aggregation. There is one exception: CDS views representing master data reports (views categorized as #DIMENSION) the aggregation SUM can be used to generate the special key figure 1rowcount, see DefaultAggregation Annotations.
  • In case you face the error RSODP 103: Field xxx ignored: Data type xxx not allowed for characteristic
    • Check whether the fields can use: @Aggregation.default: #MIN , #MAX or #SUM, according to the business logic.
    • If it can't use #MIN, #MAX or #SUM, apply 2771186 (and 2778887) and remove the annotation @Aggregation.default. This means that then the @Aggregation.default:: #NOP is used by the system.
  • It is recommend to avoid key figures with aggregation NO2 since this can lead to performance problems: such a key figure prevents a so called Hana pushdown of OLAP features like exception aggregation, see Example I below.


Example I: After note 2771186

Our sample CDS cube contains, among others, the key figures FlightPrice and NumberOfOccupiedSeats where @Aggregation.default: null is used. Since FightPrice is a currency key figure it cannot be used as a characteristic and hence gets the aggregation NO2. NumberOfOccupiedSeats has the data type INT4(see SFLIGHT) it is then treated as a characteristic in the query.

Our CDS query also has a formula with exception aggregation where in principle a pushdown is possible, see CDS&Hana Pushdown.

When we run the query in in RSRT we can see that the key figure FlightPrice(Airfare) is just replaced by 'NOP'(as expected, see example III and Key Figures with Aggregation NOP/NO2).

The usage of the feature Key Figure Definition(see note 1591837) confirms the aggregation NO2 for FlightPrice:

As discussed in note 2400004, the feature 'Execute&Explain' in RSRT can be used in order to get more information about the 'pushdown' of features like formula exception aggregation:

So, as mentioned above, the usage of the aggregation NO2 prevents a Hana pushdown which might have a very negative impact on the query runtime.

Query without NOP key figure

We now copy the query and remove the key figure FilghtPrice and again use the feature 'Execute&Explain':

So, this query can benefit from a Hana pushdown.

Finally we take a quick look at the key figure NumberofOccupiedSeats. As mentioned above, NumberOfOccupiedSeats has the data type INT4(see SFLIGHT) and hence it is treated as a characteristic in the query.

Transaction RSRTS_ODP_DIS


Example II: Prior note 2771186

Below is an example CDS that define a key figure with case statement:

In this CDS, key figure AAFlightPrice doesn't have a corresponding default aggregation setting. When we activate this CDS view, the system runs into the error: Field AAFLIGHTPRICE ignored: Data type CURR not allowed for characteristic 

In transaction RSRTS_ODP_DIS, display ODP ZGL_SFLIGHTV, field AAFlightPrice is not included: (before Note 2771186)

This means field AAFlightPrice can't be used in the CDS query defined on this InfoProvider.

Please note: With annotation @Analytics.hidden: true, a field can be explicitly set into section 'Not Included'.

If a CDS query is define as below:

When check syntax or activate, errors are displayed as above:
Could not resolve field yyy (ODP zzz) RSRTS_CDS028
Error while processing select entry number xx (at Line xx Column xx)

To solve the error, change the InfoProvider CDS and add @DefaultAggregation for field AAFlightPrice:

Example III: Effect of NO2 Aggregation

Here is an example of key figure with default aggregation NO2. Please note it is not recommended to explicit set default aggregation to #NOP, instead please remove the annotation if you don't want to use default aggregation #SUM, #MIN or #MAX. This example is just to explain the meaning of #NOP.

Define a simple CDS quey like this:

Run it in RSRT, key figure FirstClassSeats gets 'NOP' because there are more than one values to be aggregated.

Drill down connid, key figure FirstClassSeats gets a value since there is only one value to be aggregated.

  • No labels