Académique Documents
Professionnel Documents
Culture Documents
Basic InfoCube
Business Explorer
With Data
InfoProvider Interface
OLAP Engine
No Data
Virtual InfoCube
InfoSet
SAP AG 2002, Title of Presentation, Speaker Name
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
Example:
Department Headcount D1 100 D2 80 Result 180 << SUM Month Headcount 1/3/03 160 2/3/03 180 Result 170 << AVG, with regards to Month
Plant
Plant
Result
15 << last posted value concerning plant 1 - 6/16 20 << last posted value concerning plant 2 - 6/15 15 << last posted value concerning plant 1+2 - 6/16
Note, that the those calculations always act on displayed data only
SAP AG 2002, Title of Presentation, Speaker Name
10
11
12
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
13
OLAP Initialization
Check Authorizations
Is it ok to execute query? Is it ok to read data from InfoProvider?
Process Variables
Exit for global variables (before variable input) is processed Prompt for variable input Exit for global variables (that failed before input) is processed Variable values are distributed to fixed filter, hierarchy settings, dynamic filter, conditions & exceptions, formulas,
Initialize OLAP Processor Notify Presentation hierarchies (if used) Check time stamps for OLAP cache (and release respective Ids)
14
3. Check authorization for navigation state (where necessary) 4. Search for Cached data in OLAP Cache
Skip steps 5-14 and go to step 15 if cached data is found
15
7. Call BusinessAdd-In Virtual Characteristics and Key Figures 8. Check global filters (if not already done by database) 9. Add attributes values for variables with replacement from attribute used in RKF 10. Separate data according to RKFs and selections in structure elements 11. Perform currency translation 12. Process sums and calculated key figures (CKFs) before aggregation 13. Aggregate data to detail level (see 2.) 14. Perform Hierarchy aggregation
16
18. Execute Currency/Unit aggregation 19. Add attributes values for variables with replacement from attribute used in formulas 20. Calculate formulas and CKFs after aggregation
Check Currencies/Units
17
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
18
KH_ATTRIBUTE_REPLACEMENT
Calendar year Key Figures KHMAT2 KHMAT2 M1 M2 Overall Result Quantity, CKF (QU * PR)
KH_ATTRIBUTE_REPLACEMENT
Calendar year Key Figures KHMAT2 Calendar year 2001 2002 Overall Result Quantity, CKF (QU * PR)
19
InfoCube Definition
20
Price Attributes
InfoCube Definition
21
Data
InfoCube
Material Master
22
23
'KHF1' * 'Quantity' X X X
24
Price
25
Quantity = AVG, CKF, Before Material M1 M1 M2 M2 Material M1 M2 Result Year 2001 2001 2002 2002 Year Quantity 5 6 7 Price 10 10 20
Quantity Price 11 15 26
20 40 60
26
Quantity = SUM, CKF, After Material M1 M2 Material M1 M2 Result Year 2001 2001 Year Quantity Price 11 15 Quantity Price 11 15 26
10 20 30
27
Quantity = SUM, CKF, After Material M1 M1 M2 M2 Material M1 M2 Result Material M1 M2 Result Year 2001 2002 2001 2002 Year Quantity 5 6 7 8
Qu * Pr = Formula Price Qu * Pr
Year
10 20 30
Quantity = SUM, CKF, After Material M1 M1 M2 M2 Material Year 2001 2002 2001 2002 Year 2001 2002 Result Quantity 5 6 7 8
Qu * Pr = Formula Price Qu * Pr
Quantity Price 12 14 26
30 30 30
28
29
Quantity = SUM, CKF, After Material M1 M1 M2 M2 Material M1 M2 Result Year 2001 2002 2001 2002 Year Quantity 5 6 7 8
Qu * Pr = CKF Price Qu * Pr
Quantity Price 11 15 26
10 20 30
30
e.g. = Quantity * Price e.g. = Quantity / Price e.g. = Price e.g. = Price / Quantity
All required records have to be read into OLAP processor (and processed individually) No aggregates cannot be applied Datasets are processed individually per InfoProvider first Before aggregation does not allow formulas with mix of KF types
In case of MultiProviders
31
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
32
Motivation
Mostly, the OLAP first aggregates data and then applies calculations Sometimes you would like to change this sequence (however you do not want to use before aggregation for all characteristics combinations, due to performance reasons) Example Cube Data:
Price per Unit
Here, it would be ok to aggregate first by Material and Month, but its required to perform the calculation prior to aggregation on Order.
33
34
35
This attribute is available for every Characteristic (also 2.0b/2.1c) Also here: Consider performance impacts Perhaps calculation can already occur in Update Rules.
36
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
37
Formula Collision
Quantity 2001 12.000 PC 2002 +14.000 PC Summary 26 PC Quantity 2001 12.000 PC 2002 14.000 PC Summary 26 PC Quantity 2001 12.000 PC 2002 14.000 PC Summary 26 PC Quantity 12.000 PC 14.000 PC 26 PC Quantity 12.000 PC 14.000 PC 26 PC Quantity 12.000 PC 14.000 PC 26 PC
*'Quantity' * 'Quantity'
144.00000 PC^2 196.00000 PC^2 676.00000 PC^2 'Quantity' * 'Quantity' 144.00000 PC^2 196.00000 PC^2 676.00000 PC^2 'Quantity' * 'Quantity' 144.00000 PC^2 196.00000 PC^2 340.00000 PC^2
Available in case of formulas with multiple structures, under Formula Properties. Collisions always occur when point and dash calculations or functions are mixed in competing formulas. If you do not make a definition, the formula that was set (defined and saved) last takes priority.
38
Overview
KF/CKF Properties and Exception Aggregation OLAP Processor Under the Hood Case Study Revenue Calculation Calculation with Reference to Characteristic Formula Collision Percentage and Summary Functions
39
How much does a value deviate from the absolute amount of b: = (a-)/abs(b)? How large is a share a for the total value b: = a/abs(b)
%CTa
GTa
The value of the key figure a is related to the next higher value that is aggregated (the "subresult" of a with respect to a characteristic is 100%). The value of the key figure a is related to the aggregated value for all characteristics (the "result" of the entire table for the key figure a is 100%).
%RTa
The value of the key figure a is related to the aggregated value for all characteristics, for which the dynamic filter is ignored. If, for example, a free characteristic is restricted by a filter value, the global result of the key figure a in the displayed table is not 100%. The aggregation via all filter values results in 100%.
40
M2
Overall Result
KHMAT2
M1 'Quantity' % 10 -50.00000 % -40.00000 % 10.00000 % 'Quantity' %A 10 50.00000 % 60.00000 % 110.00000 % %CT 'Quantity' 45.45455 % 54.54545 % 100.00000 % %GT 'Quantity' 45.45455 % 54.54545 % 100.00000 % %RT 'Quantity' 19.23077 % 23.07692 % 42.30769 %
Calendar year Quantity 2001 5.000 PC 2002 6.000 PC Overall Result 11.000 PC
a%b
difference in percentage
share in percentage share in terms of percentage for the result share in terms of percentage for the total result share in terms of percentage for the report result
41
Summary Functions
SUMGTa
The value of the key figure a is related to the aggregate value via all characteristics. Aggregation is completed using the deepest-level characteristic.
SUMCTa
The value of the key figure a is related to the next highest aggregate value.
SUMRTa
The value of the key figure a is related to the aggregate value of all characteristics in which the dynamic filter is ignored.
KHMAT2 KHMAT2 M1 Calendar year Quantity 2001 5.000 PC 2002 6.000 PC Result 11.000 PC 2001 7.000 PC 2002 8.000 PC Result 15.000 PC 26.000 PC SUMCT 'Quantity' 11.000 PC 11.000 PC 26.000 PC 15.000 PC 15.000 PC 26.000 PC 26.000 PC SUMGT 'Quantity' 26.000 PC 26.000 PC 26.000 PC 26.000 PC 26.000 PC 26.000 PC 26.000 PC SUMRT 'Quantity' 26.000 PC 26.000 PC 26.000 PC 26.000 PC 26.000 PC 26.000 PC 26.000 PC
M2
Overall Result
KHMAT2
M1 SUMCT 'Quantity' 11.000 PC 11.000 PC 11.000 PC SUMGT 'Quantity' 11.000 PC 11.000 PC 11.000 PC SUMRT 'Quantity' 26.000 PC 26.000 PC 26.000 PC
Calendar year Quantity 2001 5.000 PC 2002 6.000 PC Overall Result 11.000 PC
42