205: Implementing a Multi-Level Data Model BW Solution at Steelcase
Mark Veach Steelcase, Inc.
If confusion is the first step to knowledge, I must be a genius. - Larry Leissner
What we will cover ...
Corporate ODS Layer & Data Mart Strategy Multi-Level Purchasing Schedule Line Multi-Level Material Stocks & Movements Custom Hierarchies for Many-To-Many
What you will gain ...
Understanding Direction Comfort Level Boost Improved Chances for Success
Agenda ...
1. Start Up 2. Extraction 3. Data Model 4. Custom Hierarchies
Agenda ...
"There is no terror in the bang, only in the anticipation of it. - Alfred Hitchcock
1. Start Up
System Landscape Business Needs Data Design Business Content
5
System Landscape
System Landscape
Develop.
Current
Start Up
BW
2.0B
3.0B
R/3
4.6B 4.6B PI 2001.2 PI 2002.2
HP unix & Oracle [Link]
6
Business Needs ...
MRO Materials
Maintenance, Repairs and Operations
Business Needs
Start Up
Plant Maintenance
Purchasing Materials & Inventory Management Custom Data Requirements
7
Business Needs ...
Reporting Requirements:
Business Needs
Start Up
Standardized Yet Flexible Long Data Life for Trending Summary and Details Focus on:
Basic Purchasing Information Basic Stock Information Basic Material Movement Info Inventory by Vendor Inventory and Cost
8
Data Design ...
Basic Data Design/Mapping Steps List Fields by Report
Indicate R/3 Source
Start Up
Data Design
Clarify Discrepancies Eliminate Redundancies Organize by Business Process:
Purchasing Inventory
Map Key Figures and Characteristics
9
Business Content ...
Best DataSource Fit Purchasing
Purchasing Schedule Line (2LIS_02_SCL)
Business Content
Start Up
Inventory
Transfer BW: Stock (2LIS_40_S278) Material Movements (2LIS_03_BF)
Not a Perfect Fit Summary Targets (InfoCubes) - No ODS Need To:
Create Custom Data Targets Extend And/Or Create Data Sources
10
Agenda ...
"Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke
2. Extraction
Logistics Cockpit Process Keys DataSources
11
Logistics Cockpit
Logistics Cockpit
Transaction LBWE Set Update Mode for Entire Application Original Design & Construction Used V3 Update Chose Queued Delta When Made Available in PI 2002.1
12
Extraction
Process Keys
R/3 Applications Create Many Key Figures Process Keys Are Assigned Based on the Business Process in Logistics Extractors
Extraction
Process Keys
Generic Key Figures (Value & Quantity) In BW, Process Keys Make Transaction Key Figures Meaningful Process Keys Must Be Activated Via R/3 Transaction MCB_
- Extensive Reference White Paper from SAP Service Marketplace, Business Content 2.0B - Retail/CP
13
Example #1 - Purchase Order
Extraction
Process Keys
Process Key = 1 (Purchase Order) Generic Key Figure Value = 4,000.00 (PO Value) Generic Key Figure Quantity = 40.000 (PO Qty)
14
Example #2 - Goods Receipt
Extraction
Process Keys
Process Key = 2 (Goods Receipt) Generic Key Figure Value = 4,000.00 (PO Receipt Value) Generic Key Figure Quantity = 40.000 (PO Receipt Qty)
15
Illustration
Process Key 001 Characteristics Value 100.00 Quantity 1
PO Item Entry Goods Receipt Entry
Process Key 002
Characteristics
Value 100.00
Quantity 1
R/3
Extraction
Process Keys
BW
Generic Key Figures
Process Key 001 Process Key 002 Characteristics Value 100.00 Value 100.00 Quantity 1
PSA
Characteristics Quantity 1
Update Rule Routines
Specific Key Figures
Characteristics
PO Value $100.00
PO Quantity 1
PO Rcpt Value PO Rcpt Qty $100.00 1
PO Data Target
16
Process Key Update Rules
Extraction
Process Keys
Process Key Tests
Specific KF 0ISSVS_VAL = Generic KF 0CPPVLC
17
DataSource Overview
Purchasing
Purchasing Schedule Line (2LIS_02_SCL) MRO PO Data (Custom)
Additional Fields Specific to MRO Only Transparent Table Populated by ABAP
Extraction
DataSources
Material Movements & Stocks
Transfer: BW Stock (2LIS_40_S278)
Initialize Stock Levels LIS Structure S278 New DataSource As of PI 2002.2 (2LIS_03_BX)
Goods Movements (2LIS_03_BF) -- Extend.
Additional Fields for All Uses
18
Extending 2LIS_03_BF
Execute RMCSBWCC to Check for Possible Errors
Normal Errors Include Data in Setup Tables or Delta Q Resolve Errors (Delete Setup Tables, Process Deltas)
Extraction
DataSources
Enhance Extract Structure Via RSA6 or SE11 Append
Add New ZZ Prefix Fields to the Append Structure
Add User Exit to Populate New Fields Via RSA6 Function Enhancement or CMOD
Create Project (EG: ZBW) Enhancement Assignment RSAP0001 Component EXIT_SAPLRSAP_001 (Transaction)
19
User Exit INCLUDE ZXRSAU01
Data Fields Used in INCLUDEs
Extraction
DataSources
INCLUDE for DataSource 2LIS_03_BF
This Must Be a CASE Structure The Exit Is Executed for Every DataSource
(See Notes For Code)
20
Agenda ...
"To the man who only has a hammer in the toolkit, every problem looks like a nail. - Abraham Maslow
3. Data Model
Corporate ODS Layer and Data Marts Purchasing Schedule Line Material Movements and Stocks
21
Strategy ...
Corporate ODS Layer & Data Marts
One Inbound Layer
Corporate ODS Layer
Data Model
One ODS per DataSource
Data Marts
Many Application Data Marts
Derived From the Corporate ODS Layer
Corporate ODS Layer
22
What is the Corporate ODS Layer?
Corporate ODS Layer & Data Marts
Corporate ODS Layer
Layer Closest To Originating System Cleansed, Validated & Transformed Business Facts Rawest, Most Granular Form
Data Model
Attributes
Historical Foundation One DataSource : One Data Target Isolated Special Business Knowledge Always Archived With Longest Retention Period Cleansing & Transformation In PSA & Update Rules Comprehensive Data Storage Atomic Level Of Detail In ODS Objects
23
What is the Corporate ODS Layer?
Corporate ODS Layer & Data Marts
Corporate ODS Layer Benefits
Reusable Data
Feeds Multiple Data Marts
Data Model
Data Consistency
Single Origin & Reduced Ambiguity
Historical Foundation
Trusted Source Across Application Areas
Improved Implementation Speed
No Extractor Analysis For New Data Marts
Lower Implementation Cost
Shorter Implementation Time
Reduced Impact On Source System
Data Initialized Once
24
What is a Data Mart?
Corporate ODS Layer & Data Marts
Data Mart
Application-Specific Business Facts Subset Of Corporate ODS Layer Used For Data Consolidation & User Reporting
Data Model
Data Mart Attributes
Business-Specific View May Be Multi-Level, Detailed or Summarized Data In ODS Or InfoCube Data For Reporting At Highest Level Only Archive Retention Optional Retention Period Determined By Process Users Consolidate Information From Multiple DataSources
25
What is a Data Mart?
Corporate ODS Layer & Data Marts
Data Mart Benefits
Improved Reporting Performance
Reduced Data Volume
Data Model
Agility
Easier To Modify
Flexibility
Departmental Interpretation Of Facts
Scalability
As Much Or As Little Data As Needed
26
The Multi-Level Data Model
Reporting
Material Movements & Stocks
Purchasing Schedule Line
Consolidation & Transformation
Corporate ODS Layer
DataSources & PSA
27
Multi-Level Model
Corporate ODS Layer & Data Marts ODS Key Design
Corp. ODS Layer: Enables Transactional Uniqueness Reporting: Determines Level Of Detail
Merging Data From Multiple DataSources
Merge in Data Mart From Corporate ODS Layer
Data Model
Preservation Of Process Key
Corp. ODS Layer: Keep Process Key For Each Trans. Consolidation: Keep Process Key After Merge Reporting: Interpret Process Key At this Level
ODS Facts
BEx Reporting Flag Only Set For Report Level Automatic Activation Flag Is Not Set Automatic Data Target Update Flag Is Not Set Quality Flag Is Always Set All ODS Updates Are Overwrite
28
Filters & Start Routines
Corporate ODS Layer & Data Marts
Usually Filter Between Corporate ODS & Data Mart Custom Extractor Selection & Filter Criteria Identical Filters: Update Rule Start Routine Executed Just Before Updates Applies to Entire Data Package
Data Model
(See Notes For Code)
29
Purchasing
Reporting Consolidation & Transformation
Report-Ready MRO Purchasing Transactions With Interpreted Key Figures
Data Model
Purchasing
MRO Combined Standard Purchasing Schedule Line Data + Custom Characteristics All Purchasing Schedule Line Transactions MRO Custom Characteristics
Corporate ODS Layer
Purchasing SCL 2LIS_02_SCL MRO Custom ZBWPMPO
30
Purchasing Filters
Between ODS 3 & ODS 4
Keep Purchase Order Entry Transactions (Process Keys 1, 4, 11, 14, 21, 24)
Data Model
Purchasing
Between ODS 1 & ODS 3
Eliminate Non-MRO Trans Certain Doc. Categories & Types
(See Notes For Code)
31
Purchasing ODS Keys
Purchase Document Number Item Number of Purchasing Document Schedule Line Number
Data Model
3 Purchasing
Purchase Document Number Item Number of Purchasing Document Schedule Line Number Process Key
32
Purchasing Special Routine
Assigning Real Process Key ODS 3 Activated w/ ODS 1 Transactions Get Process Key From ODS 3 Records w/ Same Doc/Item/Sched Append to Data Package Delete Original 999 Records from Data Package
Data Model
Purchasing
1
Situation No Actual Process Key from Custom DataSource for ODS2. Dummy Process Key set to 999 in Transfer Rules.
(See Notes For Code)
33
Material Movements & Stocks
Reporting
Report-Ready MRO Material Movements MRO Stock Levels & Movement Summary
Movements & Stocks
Data Model
Consolidation & Transformation
MRO Material Movements In Raw Format
Corporate ODS Layer
All Material Movement Transactions
Stock Levels 2LIS_40_S278 Movements 2LIS_03_BF
34
Movements & Stocks Filters
3
Before Loading Stocks
Movements & Stocks
Data Model
Include Materials With Certain Material Group Codes
Between ODS 1 & ODS 2
Eliminate by Material Group and Purchase Organization
(See Notes For Code)
35
Movements ODS Keys
3
Movements & Stocks
Data Model
Keys For All ODSs Document Number Document Year Document Item Stock Type Process Key Remains Unique With These Keys
See Note 417703
36
Movements Special Routine
3
Reversal Movements Start Routine RECORDMODE Set to X For Reversal Movements (102, 202, ...) ODS Service API Drops Rows If RECORDMODE=X (Before Image) & OVERWRITE Reversals Do Not Make It To ODS MUST Use Process Keys To Correct Create Start Routine To Intercept Reversals and Clear RECORDMODE Consider reversing COUNT sign See OSS Note 352344
(See Notes For Code)
37
Movements & Stocks
Data Model
Stocks & Non-Cumulative Key Figures
Stock Levels Are Only Maintained in Cube
Movements & Stocks
Stock Levels Kept in Non-Cumulatives
Data Model
Whats a Non-Cumulative Key Figure?
Cannot Be Accumulated Over Time
Day1_Stock + Day2_Stock <> Stock for 2 Days
Measured in Relationship to Period of Time
Time Reference: 0CALDAY
Aggregation = SUM (Summation) Exception Aggregation = LAS (Last Value)
38
Non-Cumulative Key Figure Example
Movements & Stocks
Data Model
39
Stocks & Non-Cumulative In/Outflow
Inflow/Outflow Increase/Decrease NCum Value Inflow/Outflow Are Cumulative Values Movements & Stocks Inflow/Outflow Can Be Used In Queries Inflow = Material Movement Receipts Outflow = Material Movement Issues Inflow (Receipts)
Data Model
Outflow (Issues)
Non-Cumulative (Stock)
40
Movements & Stocks InfoCube
Stock Levels AND Movements Non-Cumulative Key Figures For Stock Levels Stock Level Initialized Once Value, Qty & Count Key Figures For Movement Types Initialized With 1 Year Of Movement History Partitioning & Compression Very Important
41
Movements & Stocks
Data Model
InfoCube Update Rules & Key Figures
Stock Level Key Figures
Inflow (Additions to Inventory) Movements & Stocks
Data Model
Quantity Received To Consignment Stock Quantity & Value Received to Valuated Stock
Outflow (Subtractions from Inventory)
Quantity Issued from Consignment Stock Quantity & Value Issued From Valuated Stock
Movements Key Figures
Movement Category Groupings
Adjustments, Issues, Receipts, Transfers, Returns
Key Figure Types
Value, Quantity, Count (Number of Movements)
(See Notes For Code)
42
Movements & Stocks Initialization
Work With R/3 DBAs Coordinate With R/3 Teams
Movements & Stocks
Data Model
Stock Levels - Close of Business Day No Movements for Remainder of Day Several Hours - Plan Ahead 2LIS_03_BF Deltas After Activation Delta Queue Job Must Wait BW Deltas Must Wait Minimize Impacts (Queued Delta)
(See Notes For Details)
43
Movements & Stocks Initialization
Tasks Performed in Advance Determine Nbr of Movement InfoPackages
Movements & Stocks
1 Million Max per InfoPackage OMBT for Document Number Ranges
Data Model
Perform Full Dry Run
No Surprises Sizing and Execution Times
Use Events for InfoPackage Scheduling Create Material Movement InfoPackages
Manually Start 1st, Then Events Initialize Delta, PSA Only Select by Posting Date (Last Through 12/31/9999)
Extract Old Material Movement History
(See Notes For Details)
44
Movements & Stocks Initialization
Extract & Load Tasks (Implementation Day)
Movements & Stocks Extract Stock Levels At End Of Day (MCNB) Extract Recent Material Movements (OLI1BW) Load Stock Levels to PSA Load Movements to PSA (Initialize) Update InfoCube with Stock Levels from PSA
Compress
Data Model
Update ODS1 with all PSA InfoPackages (Initial)
Activate After Each InfoPackage
Update ODS2 from ODS 1 (Initial) Update ODS3 & InfoCube from ODS2 (Initial) Compress InfoCube -- No Marker Update
Rolls Back Stock Level Updates From History
(See Notes For Details)
45
Agenda ...
"I have not failed. I've just found 10,000 ways that don't work. - Thomas Edison
4. Custom Hierarchies
Why a Custom Hierarchy? The Solution InfoRec Vendor Hierarchy
46
Why a Custom Hierarchy?
Custom Hierarchies
Why a Custom Hierarchy?
Situation Material Activity by Supplying Vendor Vendors Supply Many Materials Any Material Supplied by Several Vendors How Does BW Represent Many-To-Many? Hierarchies What If It Isnt in Business Content? Create a Custom Hierarchy!
47
The Solution
Custom Hierarchies
The Solution
Create a Hierarchy of Vendor/Material Use Level 1 (Vendor) as Query Filter Create an R/3 ABAP to Extract the Data Hierarchy Flat File Extract Layout
Record Number; Node Name; (Characteristic Name) Node Value ; (Characteristic Key) Blank; Parent Node Record Number
Example:
1;0HIER_NODE;VENDORS; ;0 2;0VENDOR;123456 ; ;1 3;0MATERIAL;MRO12345 ; ;2 4;0MATERIAL;MRO67890 ; ;2
(Required as 1st rec.)
48
InfoRec Vendor Hierarchy
Approx. 70,000 Rows
Custom Hierarchies
Construction Steps
Create ZMROMATL w/ Hier
InfoRec Vendor
Create ZMROVEND Create & Activate Hierarchy Load Texts for ZMROMATL Load Texts for ZMROVEND Create an InfoSource for the Hierarchy Execute ABAP to Extract the InfoRec Relationship Load & Activate the Hierarchy
49
Closing Thoughts
Ideas are like rabbits. You get a couple, learn how to handle them, and pretty soon you have a dozen. -- John Steinbeck
50
Key Topics
Corporate ODS Layer + Data Marts Multi-Level ODS Model Process Keys Purchasing Schedule Line Material Movements & Stocks Non-Cumulative Key Figures Custom Hierarchies
51
Resources & Specific Documents
SAP Service Marketplace
([Link]
Note 079083 - Setup of Statistical Data Note 352344 - Process Keys and Reversals Note 417703 - 2LIS_03_BF and ODS Keys Note 419490 - Non-cumulatives: Poor query performance Note 492828 - Process Keys for 2LIS_03_BF Note 586163 - Inventory Management in SAP BW (Composite) Business Content 2.0b - Retail/CP - Extracting Logistics Data Extracting MM (Purchasing) Transaction Data from BW 2.0B How ToHandle Inventory Management Scenarios in BW Non-cumulative Key Figures / Inventory Management BW Operational Data Store SAP BW Operational Data Store Implementation Guidelines Multi-Dimensional Modeling With BW - ASAP 52 for BW
SAP Notes / OSS
([Link]
SAP Help Portal
([Link]
ASUG BI&A SIG
([Link]
SAP Fan Club
([Link]
Time for some relevant questions
Steelcase is a registered trademark of Steelcase, Inc.
53
Thank you for attending!
Please remember to complete and return your evaluation form following this session. Session Code: 205