 ## Rounding in Demand Planning ### Use

Rounding is essential to the understanding of calculations that are made in Demand Planning. In conjunction with disaggregation/aggregation, rounding can lead to unexpected results. The system always first performs disaggregation on a time basis and then on a structural basis, while taking account of the calculation type. Since the system performs rounding in both cases, the rounding effects can be amplified. For that reason, we recommend that you work with large values, in other words, small units of measure. We also recommend that you plan using the same periodicity and only use different periodicities for display purposes.

##### Accuracy of Numbers

Internally, Demand Planning uses floating point arithmetic, for instance, for macros and forecasting (see Number). In interactive planning, you can display numbers with up to six decimal places. As standard, the system takes the number of decimal places from the unit of measure.

In Demand Planning, you can specify the number of decimal places for each key figure. Before converting from the internal format used in interactive planning to the liveCache format, the system first converts to the format specified in the key figure. In this case, the system rounds to the nearest whole number (that is, a number less than 0.5 is rounded down; 0.5 and greater are rounded up).

The system then converts the format of the key figure into the liveCache format. liveCache uses a fixed number format of 12.3; that is, 12 places before the decimal point, and three after. When converting to the liveCache format, the system rounds to the nearest whole number.

Example for Handling Decimal Places in Interactive Planning and in liveCache

The value 3.58225 has been entered in a cell in interactive planning. The value that is finally saved in liveCache can be different, depending on the number of decimal places defined for the key figure.

 Number of Decimal Places in the Key Figure Intermediate Value Value in liveCache 0 4 4.000 1 3.6 3.600 2 3.58 3.580 3 and more 3.582 3.582
##### Disaggregation and Rounding

Rounding effects are most noticeable when you work with integer values, for example, with pieces, bottles, or pallets. The following calculation example shows how the system performs rounding if characteristic values already exist for a selection. If, as in this example, you use the calculation type Pro Rata, these existing characteristic values are taken into account as proportional factors; in other words, the new characteristic values are distributed proportionally to the old values. To see another, more detailed example of disaggregation (albeit without proportional factors), see Example of Disaggregation and Rounding. The system performs the calculation as follows:

...

1.      The system determines the exact proportions and rounds these values up or down to the nearest whole number.

2.      For each characteristic value, the difference is formed between the exact value and the rounding value. This difference can also be negative.

3.      The sum of these differences over all characteristic values is formed.

4.      This sum is then distributed amongst the characteristic values, as described above in steps 1 and 2.

5.      If a small quantity remains, for instance, because all the decimal places are under 0.5, this value is assigned to the first characteristic value.

6.      If the difference to be assigned is negative, and if a negative quantity would result from the assignment, the system behaves as follows: For each characteristic, the product is formed from the proportional factor and the current value. The difference is then assigned to the characteristic with the largest product. The sequence of the characteristic values in liveCache is not necessarily the same as the sequence in interactive planning. This may produce unexpected results. 