of 19
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
1/19
PC
1
Data Modelling and Loading
Spc
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
2/19
PC
2
Data Modeling and Loading- First Steps
Data Modeling
ERM model
MDM / Star Schema model
BW Extended Star Schema
BW Master Data
InfoObjects
Attributes
Hierarchies
Text
Loading Master Data via Flat Files
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
3/19
PC
3
5. Transactional Data
Spc
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
4/19
PC
4
One business process is modeled at a
time
Data storage optimized for reporting by aStar Schema
Characteristics are structured together in
related branches called Dimensions
The key figures, KPI's, and othercalculations form the Facts
This structure is the same for all sources
SAP BW Data Model
Dimension 2
Facts
Dimension 1 Dimension 3
Dimension 4Dimension n
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
5/19
PC
5
Example: Sales
Who did we sell to?
What did we sell?
Who sold it?
How much did we sell?
Who did we compete against?
When did we sell?
ProductDimension
QuantitiesRevenuesCosts
Rev./Group
CustomerDimension
SalesDimension
Competition
Dimension
Time
Dimension
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
6/19
PC
6
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.
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
7/19PC
7
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
Product
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
Salesperson
Rep group
Sales territory
Sales region
Sales district
Sales planning group
Distribution key
CompetitionNielsen indicator
SEC Code
Primary competitor
Secondary Competitor
Time
DateWeek
Month
Fiscal Year
Dimensions Example: Sales
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
8/19PC
8
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
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
9/19PC
9
C Customer # Region
13970522 west ...
P C T Quantity Revenue Discount Sales overhead
250 500,000 $ 50,000 $ 280,000 $
50 100,000 $ 7,500 $ 60,000 $
...
Time dimensionProduct dimension
T Period Fiscal year
10 1999 ...
P Product # Product group
2101004 displays ...
Fact table
Customer dimension
Star Schema
The combination of Fact and Dimension Tables is called a Star Schema.
P C T Quantity Revenue Discount Sales overhead
250 500,000 $ 50,000 $ 280,000 $
50 100,000 $ 7,500 $ 60,000 $
...
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
10/19PC
10
Example Star Schema: Sales
Facts
Qty sold
List price
Discounts
Invoice price
Fixed mfg cost
Variable cost
Moving average price
Standard cost
Contribution marginExpected ship date
Actual ship date
Customer
Material
Competition
Sales
Time
Competition
Nielsen indicatorSEC Code
Primary
competitor
Secondary
Competitor
Sales
Salesperson
Rep group
Sales territory
Sales region
Sales district
Sales planning
group
Distribution key
Time
Date
Week
MonthFiscal Year
Customer
Customer number
Customer name
Cust. Category
Cust. Subcategory
Division
Industry
Revenue Class
Transportation zone
Currency
VAT #
Legal Status
Regional market
Cust. Statisticsgroup
IncoTerms
Billing schedule
Price group
Delivering plan
ABC Classification
Account assignmentgroup
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
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
11/19PC
11
Extended Star Schema (Functional View)
C customer-no territory chain office head office
C P T quantity sold revenue discount sales overhead stock value
T period fiscal year
P product-no product group brand category
product-no language product description
Time dimension
Product dimension
Customer dimension
Product master data: Text
Fact table
Territory 1 Territory 2 Territory 3District 1
Territory 4District 2
Zone 1
Territory 5 Territory 6District 3Zone 2
Territory 7District 4
Territory 8 Territory 9District 5
Zone 3Sales hierarchy
Sales InfoCube
Customer-no Name Location Industry key
Customer master data: Attributes Sales hierarchy
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
12/19PC
12
From Data Model to Database
Star Schema
(Logical)
InfoCube(Physical)
Customer Dimension
ProductDimension
ProductDimension
QuantitiesRevenues
CostsRev./Group
CustomerDimension
SalesDimension
Competition
Dimension
Time
Dimension
Terminology used to discuss theMDM modeling of a business process.
Real data base tables linked together
and residing on a BW database server.
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
13/19PC
13
InfoCube: SAP BW Design
Central data stores for reports and evaluations
Contains two types of data
Key Figures
Characteristics
1 Fact Table and up to 16 Dimension Tables
3 Dimensions are predefined by SAP
Time
Unit
Info Package
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
14/19PC
14
Data Granularity
Data Granularity is defined as the detail of the database, the characteristics which describe our key
figures. Fundamental atomic level of data to be represented
The by words - for example, Sales by customer, by material
It determines how far you can drill down on the data.
Example: Time Granularity
Day versus Month
A customer buys the same product 2 to 3 times a month
With time granularity of Day : 2 or 3 fact table entries
With time granularity of Month : 1 record in the fact table but a loss of information (i.e.
number of orders on different weekdays).
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
15/19
PC
15
Performance versus Disk Space
The decision on granularity has the biggest impact on space and performance
Reducing granularity means losing information
With normal star schemas (i.e. big fact table and small dimension tables) the design of
dimensions is primarily guided by analytical needs.
Large dimension tables have a big impact on performance
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
16/19
PC
16
6. Master Data
Spc
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
17/19
PC
17
Characteristic InfoObject
BW term for Business Evaluation Object
A unique name containing technical information and business logic
InfoObject components:
Technical Definition (length, format, check routines, etc.)
Master Data, Texts
Attributes
Hierarchies
Compound Information
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
18/19
PC
18
Scenario for New InfoObject
LEGACY COSTCENTER TABLECost Center#(13 char.) Profit CenterPerson Resp
2930000007890 5454 Joe2940000006123 6547 Bjorne
R/3 System (SYSTEM NAME =SAP..)Cost Center#(10 char.) Profit CenterPerson Resp
1000000000 32245 Maria2000000000 65465 Ming
BW InfoObject COSTC00 Master Data TableCost Center#(13)Profit CenterPerson Resp
2930000007890 5454Joe2940000006123 6547BjorneSAP1000000000 32245MariaSAP2000000000 65465Ming
The legacy system and R/3 system have cost center numbers of different lengths
A new InfoObject (COSTC##) is needed with a length of 13 characters.
R/3 data will take the first 3 characters of the system ID as a prefix for identification purposes.
7/30/2019 16742716 SAP BW Training 3 Data Modeling and Loading Httpsapdocsinfo
19/19
PC
19
Creating a New InfoCube Already Covered?
1. Create New InfoCube Name in Selected InfoArea
2. Choose Characteristics Specified in Data Model
4. Assign Characteristics to Dimensions
3. Create Necessary User-Defined Dimensions
5. Choose Time Characteristics
6. Choose Key Figures
7. Activate