For the year „2007“ and the version "V1", the planned quantity per product is to be distributed to the available factories "W1" and "W2". The total quantity of each product stays the same. However, it is to be distributed evenly between the factories.
The following table shows the data for the InfoProvider before the planning function is executed:
Before Executing the Planning Function
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P1 |
W1 |
10 |
2007 |
V1 |
P1 |
W2 |
20 |
2007 |
V1 |
P2 |
W1 |
60 |
2007 |
V1 |
P2 |
W2 |
40 |
The following table shows the result of the execution of the planning function:
After Executing the Planning Function
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P1 |
W1 |
15 |
2007 |
V1 |
P1 |
W2 |
15 |
2007 |
V1 |
P2 |
W1 |
50 |
2007 |
V1 |
P2 |
W2 |
50 |
In reality, the planning function only writes delta records to the InfoCube. The following table shows the delta records that were actually written:
Delta Records in the InfoCube
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P1 |
W1 |
5 |
2007 |
V1 |
P1 |
W2 |
-5 |
2007 |
V1 |
P2 |
W1 |
-10 |
2007 |
V1 |
P2 |
W2 |
10 |
When you create the planning function, you must first determine the characteristics in which the values change. In regard to the characteristics Year, Version and Product, the total of the values should not change, which means these characteristics remain constant and become block characteristics. Distribution of the key figure values should be done according to the characteristic value Factory. Thus the characteristic Factory must be selected in the characteristic usage as to be changed.
The parameters for the distribution function are set as follows (see Predefined Planning Function Types).
· Use the table of key figure selection to determine that the only key figure to be distributed be the key figure Quantity.
· Because the overall total is always to be distributed each time within one block (characteristic combination {year, version, product), the distribution type Top Down Distribution is applied with the setting Distribute All.
· The factories “W1” and “W2” are entered as to values and they receive identical keys (such as 1).
The planning function is to be executed with a filter that is restricted to the year “2007” and the version „V1”. The planning function executes the following steps:
...
1. First the system loads the filter and the planning function.
2. It replaces the variables.
3. It checks the filter and the planning function for consistency.
4. Using the filter, the system requests the selected data and loads it into the buffer. In this example, we are assuming that the records displayed above in the table "Before Executing the Planning Function" are selected by the filter and transferred to the planning function. Whether the system reads or takes the existing empty records into account or not depends on the type of planning function (see Predefined Planning Function Types). With the distribution types, the system does not read empty records.
5. Using the characteristic usage, the system divides the transaction data into blocks. The tables below the process flow illustrate this. Two blocks result, which are defined by the characteristic combinations shown here.
Block Formation According to the Characteristic Usage
Block No. |
|
Year |
Version |
Product |
1 |
|
2007 |
V1 |
P1 |
2 |
|
2007 |
V1 |
P2 |
6. For each block, the system looks for the correct parameters record from the condition-parameter record pairs using the characteristic combinations. Since no conditions were created in this example, both blocks are executed with the only available parameter record.
7. For each block, the system runs the actual process, in this case, it is distribution. The tables after the process flow display show the before-after values and the resulting delta records for each block.
8. Depending on the type of planning function, the system either processes any empty records that it finds or does not take them into account. In this section there are no empty records.
9. The system checks
¡ whether the resulting records are consistent with regard to master data and characteristic relationships
¡ whether they are protected by data slices
¡ whether they are located within the transferred filter.
10. Once the system has successfully processed all blocks, it writes the delta records it has collected back to the buffer. As needed, a derivation takes place in the buffer (see Characteristic Relationships and Aggregation Levels).
If only one of the generated records has a consistency error, the entire planning function writes nothing to the buffer.
Block 1: { 2007, V1, P1} Before
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P1 |
W1 |
10 |
2007 |
V1 |
P1 |
W2 |
20 |
Block 1: { 2007, V1, P1} After
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P1 |
W1 |
15 |
2007 |
V1 |
P1 |
W2 |
15 |
Block 1: { 2007, V1, P1} Delta
|
|
|
|
|
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P1 |
W1 |
5 |
Block 2: { 2007, V1, P2} Before
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P2 |
W1 |
60 |
2007 |
V1 |
P2 |
W2 |
40 |
Block 2: { 2007, V1, P2} After
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P2 |
W1 |
50 |
2007 |
V1 |
P2 |
W2 |
50 |
Block 2: { 2007, V1, P2} Delta
Year |
Version |
Product |
Factory |
Quantity |
2007 |
V1 |
P2 |
W1 |
-10 |
2007 |
V1 |
P2 |
W2 |
10 |