Você está na página 1de 13

Creating Bucket Scenarios using

Exception Aggregation (SAP


Netweaver 7.0 BI)

Applies to:
SAP Netweaver 2004s BI.

Summary
This Article will help you understand how to create bucket scenarios in a report using Query Designer. It will
also help you understand the concept of Exception Aggregation with much ease.

Author: Neelesh Kumar Jain


Company: HCL AXON
Created on: 11 June 2009

Author Bio
Neelesh Kumar Jain is working as SAP BI Consultant with HCL AXON and is Certified in SAP
BW 3.5 and SAP BI 7.0. He has got 3 years of experience as SAP BI Consultant and has
expertise in handling Implementation and Support projects for multiple clients.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 1
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Table of Contents
Introduction .........................................................................................................................................................3
A Typical Bucket Scenario ..............................................................................................................................3
Exception Aggregation ....................................................................................................................................4
Implementation ...................................................................................................................................................5
Step 1 ..............................................................................................................................................................5
Step 2 ..............................................................................................................................................................5
Step 3 ..............................................................................................................................................................6
Step 4 ..............................................................................................................................................................6
Step 5 ..............................................................................................................................................................9
Step 6 ..............................................................................................................................................................9
Step 7 ............................................................................................................................................................10
Step 8 ............................................................................................................................................................11
Related Content................................................................................................................................................12
Copyright............................................................................................................ Error! Bookmark not defined.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 2
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Introduction
Often we come across reporting requirements involving bucket scenarios.
This Article will help you understand how to create bucket scenarios in a report using Query Designer. It will
also help you understand the concept of Exception Aggregation with much ease.
To start with, the following topics will be discussed:
• A Typical Bucket Scenario
• Exception Aggregation

A Typical Bucket Scenario


In the figure shown below you can see one of the most common requirements of report which involves a
bucket scenario.

Figure - 1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 3
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Exception Aggregation
For creating the above report this article uses the concept of Exception Aggregation. For those who do not
know, what Exception Aggregation is, a brief of the concept is provided.
To understand Exception Aggregation, first the concept of Aggregation needs to be understood.
For Aggregation, you specify the function (SUM/MAX/MIN) that determines the way in which the key figure is
aggregated by default for the same key (that is, Standard Aggregation behavior).
Whereas for the Exception Aggregation, you specify the function (Last Value, First Value…) that determines
the way in which the key figure is aggregated using the Reference Characteristic for Exception Aggregation.
For Reference Characteristic for Exception Aggregation field, you choose the characteristic with reference to
which the key figure is aggregated with Exception Aggregation. Generally, this is a time characteristic.
However, it can be any characteristic.
Examples:
• The key figure number of employees is aggregated using the characteristic cost center (this is
standard aggregation behavior). In this case, you would set a time characteristic as a reference
characteristic with last value as the exception aggregation.
• As a sales manager, you want to analyze the number of products sold and the average number of
different products sold to different customers for each sales year. In your InfoCube, only a key figure
of the net weight for the different sold products is provided. Using the new functions for exception
aggregation, you can derive the additional key figures needed just from the net weight for sold
products.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 4
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Implementation
To implement the Report as required above, you need to follow the steps below:

Note:

• It is assumed that your InfoProvider does contain the following Characteristic InfoObjects:

o Customer ID (ZCUSTOMER, in this example)


o Country (ZCOUNTRY, in this example)

• It is assumed that your InfoProvider does contain the following Key Figure InfoObject:

o Revenue (ZREVENUE, in this example)

Step 1
Open the Query Designer; create a new Query on the InfoProvider which contains the above mentioned
InfoObjects.

Step 2
Drag and drop the Characteristic ZCOUNTRY into the Columns.

Figure - 2

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 5
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Step 3
Drag and drop the Key Figure ZREVENUE into the Rows.

Figure - 3

Step 4
In the Rows, create a New Formula, go to Edit and give the description and formula as shown below:

Figure - 4

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 6
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Similarly create 5 more new formulas with description and formula as shown below respectively:

Figure - 5

Figure – 6

Figure – 7

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 7
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Figure – 8

Figure – 9

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 8
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Step 5
Now go to the display properties and select the option “Always Hide” for all the Formulas created and for the
Key Figure ZREVENUE.

Figure – 10

Step 6
In the Rows, create a New Formula, go to Edit and give the description and formula as shown below:

Figure – 11

Note:
In the formula, simply the formula created previously with description “Logic < 10 mn $” is included.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 9
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Similarly, create 5 more new formulas with description as shown below:


a) >= 10 mn $ < 20 mn $
b) >= 20 mn $ < 30 mn $
c) >= 30 mn $ < 40 mn $
d) >= 40 mn $ < 50 mn $
e) >= 50 mn $
.And in the formula just include the previously created formulas with description,
a) Logic >= 10 mn $ < 20 mn $
b) Logic >= 20 mn $ < 30 mn $
c) Logic >= 30 mn $ < 40 mn $
d) Logic >= 40 mn $ < 50 mn $
e) Logic >= 50 mn $ respectively.

Figure – 12

Step 7
Select the formula with description “< 10 mn $” and go to Aggregation Properties and select “Counter for All
Detailed Values that are not Zero, Null, or Error as the as the function of Exception Aggregation and
“Customer” (ZCUSTOMER) as the Ref. Characteristic.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 10
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Figure – 13
Similarly set the same Aggregation Properties for all the formulas with description given below:
a) >= 10 mn $ < 20 mn $
b) >= 20 mn $ < 30 mn $
c) >= 30 mn $ < 40 mn $
d) >= 40 mn $ < 50 mn $
e) >= 50 mn $

Step 8
Check the Query, Save the Query and Execute the Query.
Now you have your Report with a Bucket Scenario ready.

Figure – 14

Note:

o Naming used for Description of Objects is not mandatory to be used as they are given in this article.
However meaningful naming convention is recommended.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 11
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Related Content
Exception Aggregation
Calculating Proper SUMCT for Calculated Key Figures
Enterprise Reporting, Query & Analysis in NetWeaver7.0
For more information, visit the Business Intelligence homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 12
Creating Bucket Scenarios using Exception Aggregation (SAP Netweaver 7.0 BI)

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


© 2009 SAP AG 13

Você também pode gostar