SAP Universe Designer - Aggregate Awareness

In UDT, you have an option to run query against the aggregated tables in database. A condition can be set, and that query will run against aggregated tables for query optimization. This method of using aggregated tables is known as aggregate awareness.

To use aggregate awareness in Universe, you can use a function called @Aggregate_Aware in “Select” statement for an object that directs a query to be run against aggregate tables rather than a table containing non aggregated data.

To use aggregate awareness in a Universe, you need to arrange objects by aggregation level and objects are built using @aggregate_awareness function. To build aggregated aware objects, you need to first identify the objects: measure or dimension objects. You need to find out all possible combinations of aggregate objects in all tables and then arrange them in aggregate level order.

For example −

  • AAYEAR.Profit is the highest level of aggregation.
  • AAQTR.Profit is the next level.
  • AAMONTH.Profit is the lowest level of aggregation.

Using @aggregate_aware function directs an object to query all aggregate tables as its parameters. You can see an object using @aggregate_aware function in “Select” statement −

Aggregate Aware Function

The syntax to be used for aggregate_aware function is as follows −

@Aggregate_Aware(sum(agg_table_1), ... sum(agg_table_n))

Pass the names of all aggregated tables as arguments. Agg_table_1 is aggregate with highest level of aggregation and agg_table_n is aggregate with lowest level of aggregation.

Defining an Object using @aggregate_aware Function

Open edit properties dialog box for the object → Click “>>” button next to the dialog box.

Defining Object

In the "Edit Select Statement" dialog box, you need to click at the beginning of the SELECT statement.

Alternately, click anywhere in the select box if the object does not have a SELECT statement.

Sales Revenue

You can see @aggregate_aware function under list of functions on right side. As per description of this function: “@Aggregate_Aware(sum(aggregate table1),...,sum(aggregate tableN)) Defines a measure object using precalculated aggregate tables”.