For year “2007“, version "V1", you want to distribute the planned quantity for each product to the available factories "W1" and "W2". The total quantity of each product stays the same. However, you want to distribute the total 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 after the planning function has been executed:
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 |
The planning function actually 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 first have to determine the characteristics for which values change. With regard to the characteristics Year, Version and Product, the total of the values should not change; these characteristics remain constant and become block characteristics. The key figure values are to be distributed using the characteristic value Factory. Therefore, in characteristic usage, you have to select the Factory characteristic as to be changed.
The parameters for the distribution function are set as follows (see Distribution by Key).
● Use the table for key figure selection to determine that the only key figure to be distributed is the Quantity key figure.
● Since within a block (characteristic combination (year, version, product)) the overall total always has to be distributed each time, the Top Down Distribution distribution type is applied with the Distribute All setting.
● The factories “W1” and “W2” are entered as To values and receive identical keys (such as 1).
You want to execute the planning function with a filter that is restricted to year “2007” and 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 assume that the records displayed above in the "before executing the planning function" table are selected by the filter and transferred to the planning function. Whether the system reads or ignores the existing empty records depends on the type of planning function (see Standard Planning Function Types). With the distribution function type, the system does not read empty records.
5. In accordance with the characteristic usage, the system divides the transaction data into blocks. The tables below the process flow illustrate this. Two blocks result. They are defined by the characteristic combinations shown here.
Block formation in accordance with characteristic usage
Block No. |
|
Year |
Version |
Product |
1 |
|
2007 |
V1 |
P1 |
2 |
|
2007 |
V1 |
P2 |
6. For each block, the system uses the characteristic combinations to look for the correct parameter set from the condition/parameter set pairs. Since no conditions were created in this example, both blocks are executed with the only available parameter set.
7. The system runs the actual process (distribution, in this case), for each block. The tables after the process flow 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 ignores them. In this example 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.
Once the system has successfully processed all blocks, it writes the delta records it has collected back to the buffer. Derivation is performed in the buffer, as required (see Characteristic Relationships and Aggregation Levels).
If one of the generated records is inconsistent, 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 |
2007 |
V1 |
P1 |
W2 |
-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 |