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

BW InfoObjects modeled by CDS Views

Similar to BW, InfoObject in CDS could be:

  1. Key figures / measures
    1. Fields defined with annotation @DefaultAggregation: #SUM,  #MIN or #MAX  or @Aggregation.default: #SUM,  #MIN,  #MAX or #NOP,.
    2. Usually they are directly defined in a "@Analytics.dataCategory: #CUBE" CDS views.
    3. If it is defined in a "@Analytics.dataCategory: #DIMENSION" CDS views, it is a key figure attribute of the InfoObject.
    4. By using @Aggregation.default: #NOP, key figure can have default aggregation NO2.
    5. Don't define @Aggregation.default(or @DefaultAggregation): NULL.
  2. Characteristics:
    1. All other fields, either without any @DefaultAggregation/@Aggregation.default annotation, or with @DefaultAggregation:#NONE
    2. If the data type of the field is a key figure type, such as CURR, QUAN, DEC, FLTP..., it is not supported for a characteristic. In this case, the field is simply ignored before Note 2771186 and 2778887. After the two notes, the field gets a default NO2 aggregation and becomes a NO2 key figure. Explicit set @Aggregation.default:#NOP is not recommended as it is not supported in SADL service. Thus please just remove the @DefaultAggregation/@Aggregation.default annotation. Don't define the field with @Aggregation.default: #NONE or @Aggregation.default: NULL. 
    3. Long timestamp (data type TIMESTAMPL) field is not supported. The field is ignored. (Note 2737769, 2887459  ). 
    4. Fields longer than 250 characters are only considered up to the first 250 charaters. See Note 2852065.
    5. When data type INT* field is defined as characteristic, internally it is treated as NUMC data type, therefore only non-negative values are allowed. If negative number is needed for this field, please model it as a key figure. After Note 3072158  and 3091369 , CDS view parameter of type abap.int2,abap.int4 or abap.int8 supports negative values, the parameter is used as a formula variable.

SAP Online Documentation

DefaultAggregation Annotations



Key Figures

  • Only support default aggregation: SUM, MIN, MAX, NOP. 
  • To use other aggregation such as AVG, please use formula exception aggregation in a CDS query.
  • Semantics needs to be defined for amount or quantity key figures
  • In a CDS query, key figure can't be used in CASE statement when clause as a condition when a Restricted Key Figure is defined. Because filtering on a key figure is not supported in Analytic Engine.  Please define a formula (if operator) with case statement instead.
  • In a dimension CDS view ( with annotation @Analytics.dataCategory: #DIMENSION), no key figure fields can be defined as key fields. Only characteristic fields can be key fields.


Default Aggregation in CDS

Simple CDS Query with Exception Aggregation AVG

Amount and Quantity Key Figures

  • No labels