UNWBW1 – Business Information Warehouse
NetWeaver Support Consultant Training
InfoCubesand Aggregates
SAP AG 2004, Business Information Warehouse / 2
Content
Introduction
Reporting
Business content
Data loading
InfoCube Design
Aggregates
BW-BPS Business Planning & Simulation
Monitoring & Technical Risks
SAP AG 2004, Business Information Warehouse / 3
Star Schema
Star Schema(Logical)
T
ime
Customer Dimension
Pro
du
ct
Dim
en
sio
n
Product Dimension
Quantities Revenues
CostsRev./Group
Customer Dimension
Sales Dimension
Competition Dimension
Time Dimension
SAP AG 2004, Business Information Warehouse / 4
Time dimensionProduct dimension
Customer dimension
P Product # Product group …
2101004 Displays ...
C Customer # Region …
13970522 West ...
T Period Fiscal year …
10 1999 ...
Dimensions
Dimension tables are groupings of related characteristics.
A dimension table contains a generated primary key and characteristics.
The keys of the dimension tables are foreign keys in the fact table.
SAP AG 2004, Business Information Warehouse / 5
CustomerCustomer number
Customer name
Cust Category
Cust Subcategory
Division
Industry
Revenue Class
Transportation zone
Currency
VAT #
Legal Status
Regional market
Cust Statistics group
Incoterms
Billing schedule
Price group
Delivering plan
ABC Classification
Account assignment group
Address
State
Country
Region
ProductMaterial number
Material text
Material type
Category
Subcategory
Market key
MRP Type
Material group 1
Planner
Forecast model
Valuation class
Standard cost
Weight Volume
Storage conditions
Creation Date
SalesSalesperson
Rep group
Sales territory
Sales region
Sales district
Sales planning group
Distribution key
CompetitionNielsen indicator
SEC Code
Primary competitor
Secondary Competitor
Time
Date
Week
Month
Fiscal Year
Example: Sales Infocube Dimensions
SAP AG 2004, Business Information Warehouse / 6
P C T Quantity Revenue Discount Sales overhead
250 500,000 $ 50,000 $ 280,000 $
50 100,000 $ 7,500 $ 60,000 $
… … … ...
Fact table
Fact Table
A record of the fact table is uniquely defined by the keys of the dimension tables
A relatively small number of columns (key figures) and a large number of rows is typical for fact tables
A fact table is maintained during transaction data load
SAP AG 2004, Business Information Warehouse / 7
Facts - Sales
Quantity soldList priceDiscountsInvoice priceFixed mfg. costVariable costMoving average priceStandard costContribution marginExpected ship dateActual ship date
Example: Sales Facts
SAP AG 2004, Business Information Warehouse / 8
Facts
Qty soldList priceDiscountsInvoice priceFixed mfg costVariable costMoving average priceStandard costContribution marginExpected ship dateActual ship date
CustomerMaterialCompetitionSalesTime
Competition
Nielsen indicator
SEC Code
Primary competitor
Secondary Competitor
Sales
Salesperson
Rep group
Sales territory
Sales region
Sales district
Sales planning group
Distribution key
Time
Date
Week
Month
Fiscal Year
Customer
Customer number
Customer name
Cust. Category
Cust. Subcategory
Division
Industry
Revenue Class
Transportation zone
Currency
VAT #
Legal Status
Regional market
Cust. Statistics group
IncoTerms
Billing schedule
Price group
Delivering plan
ABC Classification
Account assignment group
Address
State
Country
Region
Material
Material number
Material text
Material type
Category
Subcategory
Market key
MRP Type
Material group 1
Planner
Forecast model
Valuation class
Standard cost
Weight Volume
Storage conditions
Creation Date
Sales
Example: Sales Star Schema
SAP AG 2004, Business Information Warehouse / 9
Only characteristics of the dimension tables can be used to access facts.
No structured drill downs can be created.
Support for many languages is difficult.
In a basic Star Schema we are limited:
Master data tables and their associated fields (attributes).
Text tables with extensive multilingual descriptions.
External hierarchy tables for structured access to the data.
In BW, the Extended Star Schema adds access to:
Extending the Star Schema
SAP AG 2004, Business Information Warehouse / 10
SAP BW: Extended Star Schema
DIM_ID_PACKAGEDIM_ID_TIMEDIM_ID_UNITDIM_ID_MATERIALDIM_ID_CUSTOMER
AmountSales
Fact Table
DIM_ID_PACKAGE
SID_REQUEST
Datapackage Dimension Table
REQUEST_ID
SID_REQUEST
RequestSID-Table
DIM_ID_TIME
SID_MONTHSID_YEAR
Time Dimension Table
MONTH_ID
SID_MONTH
Calendar MonthSID-Table
YEAR_ID
SID_YEAR
Calendar YearSID-Table
DIM_ID_UNIT
SID_AMOUNTSID_CURRENCY
UnitDimension Table
CURRENCY_ID
SID_CURRENCY
CurrencySID-Table
AMOUNT_ID
SID_AMOUNT
AmountSID-Table
DIM_ID_MATERIAL
SID_MATERIAL
MaterialDimension Table
MATERIAL_ID
SID_MATERIAL
MaterialSID-Table
MATERIAL_ID
Material Group
Material Attributes Table
MATERIAL_ID
Material Name
Material Text Table
external Material HierarchyDIM_ID_CUSTOMER
SID_CUSTOMER
CustomerDimension Table
CUSTOMER_ID
CityRegion
Customer Attributes Table
CUSTOMER_ID
Customer Name
Customer Text Table
CUSTOMER_ID
SID_CUSTOMER
Customer SID-Table InfoCubeInfoCube
SAP AG 2004, Business Information Warehouse / 11
Dimensions
up to 16 dimensions
3 dimensions exist with each InfoCube (whether they are used and thus visible or not)
Time dimension Unit dimension Packet dimension
The remaining 13 dimensions are for individual schema design
Each dimension table may be up to 248 characteristics.
Gebiet 1Gebiet 2Gebiet 3
Bezirk 1
Gebiet 3a
Bezirk 2
Region 1
Gebiet 4Gebiet 5
Bezirk 3
Region 2
Gebiet 6
Bezirk 4
Gebiet 7Gebiet 8
Bezirk 5
Region 3
Vertriebsorganisation
Material Group
Material Hierarchy Table
Material NumberLanguage Code
Material NumberLanguage Code
Material Name
Material Text TableMaterial_Dimension_ID
Material Number
Material Dimension Table
Material Attribute Table
Material NumberMaterial Number
Material Type
MaterialMaterial Dimension Dimension
SAP AG 2004, Business Information Warehouse / 12
Summary
The center of a multidimensional schema in BW are the fact tables.
The fact tables are surrounded by dimensions.
Dimension Table In BW the attributes of the dimension tables are called characteristics
(e.g. material). Master Data Tables:
Attribute TablesDependent attributes of a characteristic can be stored in an Attribute Table for the characteristic.
Text TablesTextual descriptions of a characteristic are stored in a separate text table.
External Hierarchy TablesHierarchies of characteristics or attributes may be stored in separate hierarchy tables.
SAP AG 2004, Business Information Warehouse / 13
Compressing the InfoCube
Records added to InfoCube fact tables have several “keys” which uniquely identify the record.
Request ID is just one of several fields in a record that helps identify the data.
But, Request ID can be removed, and each record can still be uniquely identified.
Compression finds records which are identical except for Request ID, then aggregates these to one single record.
If a compression is not performed, the “Group by” condition of any query’s SQL statement will remove duplicates. This results in decreased query performance.
SAP AG 2004, Business Information Warehouse / 14
Compressing the InfoCube
Request IDs Lost !!!
Request Date Record Cost
1 01.01.2002 1 100
1 02.06.2002 2 200
Request Date Record Cost
2 01.01.2002 1 200
2 04.10.2002 2 300
Request Date Record Cost
0 01.01.2002 1 300
0 02.06.2002 2 200
0 04.10.2002 2 300
COMPRESSION
E-Fact table
F-Fact table
SAP AG 2004, Business Information Warehouse / 15
Content
Introduction
Reporting
Business content
Data loading
InfoCube Design
Aggregates
BW-BPS Business Planning & Simulation
Monitoring & Technical Risks
SAP AG 2004, Business Information Warehouse / 16
Aggregates ...
... are like InfoCubes,
... are always based on InfoCubes
... summarize ("aggregate") data of the originating InfoCube,
... contain redundant information, but
... accelerate the access to that information,
... are performance-enhancing features.
SAP AG 2004, Business Information Warehouse / 17
Aggregates - Example
Country Customer Sales
USAGermanyUSAAustriaAustriaGermanyUSA
Buggy Soft Inc.Ocean NetworksFunny Duds Inc.Ocean NetworksThor IndustriesFunny Duds Inc.Buggy Soft Inc.
1015510102025
Fact Table: Sales Data Aggregate Tables: Sales Data
Country *
Country Sales
403520
USAGermanyAustria
Data for queries like ‘sales for all countries’, ‘sales in Germany’, or ‘overall sales’ can be read out of the aggregate (country *).
SAP AG 2004, Business Information Warehouse / 18
Aggregates - Example using filters
Country Customer Sales
USAGermanyUSAAustriaAustriaGermanyUSA
Buggy Soft Inc.Ocean NetworksFunny Duds Inc.Ocean NetworksThor IndustriesFunny Duds Inc.Buggy Soft Inc.
1015510102025
Fact Table: Sales Data Aggregate Tables: Sales Data
Country GermanyCustomer *
Country Sales
1520
GermanyGermany
Customer
Ocean NetworksFunny Duds Inc.
Data for queries like ‘sales for all customers in Germany'can be read out of the aggregate (country =Germany; customer=*)
SAP AG 2004, Business Information Warehouse / 19
Aggregates - Example using master data
Country Customer Sales
USAGermanyUSAAustriaAustriaGermanyUSA
Buggy Soft Inc.Ocean NetworksFunny Duds Inc.Ocean NetworksThor IndustriesFunny Duds Inc.Buggy Soft Inc.
1015510102025
Fact Table: Sales Data Aggregate Tables: Sales Data
Industry *
Industry Sales
602510
TechnologyConsumer ProductsChemical
TechnologyConsumer ProductsTechnologyChemical
IndustryCustomer
Buggy Soft Inc.Funny Duds Inc.Ocean NetworksThor Industries
Attribute Table: Customer
SAP AG 2004, Business Information Warehouse / 20
Aggregates - Example using hierarchies
Country Customer Sales
USAGermanyUSAAustriaAustriaGermanyUSA
Buggy Soft Inc.Ocean NetworksFunny Duds Inc.Ocean NetworksThor IndustriesFunny Duds Inc.Buggy Soft Inc.
1015510102025
Fact Table: Sales Data Aggregate Tables: Sales Data
Country Hierarchy, Level 2
Country Sales
4055
AmericaEurope
All
Europe America
Germany Austria USA
Hierarchy for Country
SAP AG 2004, Business Information Warehouse / 21
Aggregates - Maintenance
Switch on/off
Show aggregate hierarchy
BDS
Transport
Activate & Fill
unsaved changes
SAP AG 2004, Business Information Warehouse / 22
Aggregate Maintenance
After new data is loaded existing aggregates have to be adjusted in order to make the new data available for reporting:
Aggregate Rollup:
The newly uploaded transactional data is added to the aggregates
Changerun (Master Data Activation):
The newly uploaded master data is applied to the aggregates and activated. During the change run, all aggregates containing navigational
attributes and/or hierarchies are realigned