Aggregates

In this section, we first show how to create an aggregate for the InfoCube design described in Section 7.3, "InfoCube Design Alternative II-Dimension Characteristics."

Work Instructions

Step 1. Right-click the InfoCube IC_NEWBC2, and then select Maintain aggregates….

 

 

SCREEN 8.1

graphics/08fig01.gif

Step 2. Click graphics/createbyyourself.gif as we know the aggregate we need to create.

 

 

SCREEN 8.2

graphics/08fig02.gif

Step 3. Click graphics/attribute.gif to create an aggregate.

 

 

SCREEN 8.3

graphics/08fig03.gif

Step 4. Enter short and long descriptions, and then click graphics/continue.gif to continue.

 

 

SCREEN 8.4

graphics/08fig04.gif

Step 5. Select IO_SOFF, IO_SREG, and IO_SREPN2 from the left panel, and then drag and drop each into the right panel.

 

 

SCREEN 8.5

graphics/08fig05.gif

Step 6. Right-click Sales region, and then select Fixed value.

 

 

SCREEN 8.6

graphics/08fig06.gif

Step 7. Select EAST, and then click graphics/continue.gif to continue.

 

 

SCREEN 8.7

graphics/08fig07.gif

Step 8. Select the aggregate, and then click graphics/activate.gif to create the aggregate and fill the aggregate with data.

 

 

SCREEN 8.8

graphics/08fig08.gif

Step 9. To load the aggregate with aggregated data, click graphics/continue.gif to launch a background job.

 

 

SCREEN 8.9

graphics/08fig09.gif

Step 10. To start the background job immediately, click graphics/now.gif.

 

 

SCREEN 8.10

graphics/08fig10.gif

Step 11. Click graphics/refresh.gif to see the status of the background job. A graphics/indicates.gif indicates that the background job failed.

 

 

SCREEN 8.11

graphics/08fig11.gif

Step 12. Close the window, and return to the Maintaining Aggregates screen.

 

 

SCREEN 8.12

graphics/08fig12.gif

Step 13. BW opens a message text window in the lower-right corner, displaying the status of creating the aggregate and filling the aggregate with data.

Here we see the error message Dimension IC_NEWBC2U: Error when writing the initial record to the DB table.

 

 

SCREEN 8.13

graphics/08fig13.gif

IC_NEWBC2U is the dimension for the units of measure. It is reasonable to believe that the error was caused by an aggregation of different units of measure. Let's prove our hypothesis.

Step 14. Return to the InfoCube, and then select Delete data from the menu.
 

SCREEN 8.14

graphics/08fig14.gif

Step 15. Click graphics/yes.gif to confirm the deletion.

 

 

SCREEN 8.15

graphics/08fig15.gif

Step 16. Click graphics/deleteentries.gif to delete the data.

 

 

SCREEN 8.16

graphics/08fig16.gif

Step 17. Reload the Table 7.1 sales data again, but this time without the units of measure. Repeat Steps 811. The result should be like the one shown in Screen 8.17, a blank table.

Close the window.

 

 

SCREEN 8.17

graphics/08fig17.gif

Result

The aggregate has been created and filled with data.

SCREEN 8.18

graphics/08fig18.gif

As shown in the right panel of Screen 8.18, BW generated a number 100008 (next to the aggregate long description Aggregate new: IC_NEWBC2 01) as the technical name of the aggregate. To display the aggregate contents, select the long description and click graphics/display.gif.

Click graphics/clock.gif to display the aggregate contents. Screen 8.20 shows the result.

SCREEN 8.19

graphics/08fig19.gif

The result in Screen 8.20 is an aggregate of the East region sales data at the sales representative level, as specified by the aggregate definition in Screen 8.18. Tables 8.2 and 8.3 show how this result is calculated.

The number in the 0FACTCOUNT column of Screen 8.20 indicates how many fact table records are aggregated to generate a record of the aggregate.

SCREEN 8.20

graphics/08fig20.gif

In Screen 8.18, the F in the Aggregation level column for the Sales region characteristic indicates that the aggregate should be filled with the data of a specified region – in this case, EAST, as shown in the Fixed value column.

Create a query on IC_NEWBC2. This query works much like the one generated in Section 5.3 with the V_SREG variable. After running the query, selecting East when asked to enter a value for V_SREG, and then refreshing Screen 8.18, we see that the aggregate's Usage value increased by 1, and a time stamp was entered under Last used (Screen 8.21). This result means that the query used this aggregate, which is what we want.

Table 8.2. AN EXCERPT OF THE EAST REGION SALES DATA FROM TABLE 7.1

IO_CUST IO_SREG IO_SOFF IO_SREPN2 IO_MAT IO_PRC 0UNIT IO_QUAN IO_REV 0CALDAY
CUST001 EAST ATLANTA SREP01 MAT001 2 CS 1 2 19980304
CUST002 EAST NEW YORK SREP02 MAT002 2 CS 2 4 19990526
CUST002 EAST NEW YORK SREP02 MAT003 5 CS 3 15 19990730
CUST003 EAST NEW YORK SREP03 MAT003 5 CS 4 20 20000101

Table 8.3. AN AGGREGATE OF THE EAST REGION SALES DATA AT THE SALES REPRESENTATIVE LEVEL

IO_CUST IO_SREG IO_SOFF IO_SREPN2 IO_MAT IO_PRC 0UNIT IO_QUAN IO_REV 0CALDAY
      SREP01   2   1 2  
      SREP02   7   5 19  
      SREP03   5   4 20  

SCREEN 8.21

graphics/08fig21.gif

To find appropriate aggregates, you use the menu items shown under the Propose pull-down menu (Screen 8.22).

Note

After we run transaction SE11 to display the /BIC/F100008 table definition, we see that the aggregate is a subset of the InfoCube (Screen 8.23). It has the same structure as an InfoCube, and it references the same dimension table.

SCREEN 8.22

graphics/08fig22.gif

SCREEN 8.23

graphics/08fig23.gif

This screen was captured after the aggregate was deleted and re-created several times. For each new aggregate, BW increased the number given to the aggregate's technical name by 1. Therefore, /BIC/F100014, instead of /BIC/F100008, appears in the Transparent table field.

In the same way, we can create an aggregate for the InfoCube created in Section 7.4.

SCREEN 8.24

graphics/08fig24.gif

In Screen 8.24, the H in the Aggregation level column indicates that the aggregate is a summary at a hierarchy level. The value 02 in the Hierarchy level column indicates that the summary is at the second level – the region level – from the hierarchy root (see Screen 7.32 or 7.33).

SCREEN 8.25

graphics/08fig25.gif

The contents of this aggregate appear as shown in Screen 8.25.

The data in Screen 8.26 represent the query result summarized at the region level. This result matches the result in Screen 8.25.

SCREEN 8.26

graphics/08fig26.gif

Note

An aggregate can be created only for key figures for the SUM, MIN, and MAX operations, not the AVG operation.

Aggregates require additional disk space and system maintenance.

Part I. Guided Tours

Business Scenario and SAP BW

Creating an InfoCube

Loading Data into the InfoCube

Checking Data Quality

Creating Queries and Workbooks

Managing User Authorization

Part II. Advanced Topics

InfoCube Design

Aggregates and Multi-Cubes

Operational Data Store (ODS)

Business Content

Generic R/3 Data Extraction

Data Maintenance

Performance Tuning

Object Transport

Appendix A. BW Implementation Methodology

Object Transport

Appendix B. SAP Basis Overview

Object Transport

Appendix C. Glossary

Appendix D. Bibliography



SAP Bw. A Step-By-Step Guide
Sap Bw: a Step By Step Guide for Bw 2.0
ISBN: B000LZM8CM
EAN: N/A
Year: 2002
Pages: 106

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net