###### Technical Articles

# Dynamic Norm Calculations using Rolling Aggregation in SAP IBP

**Introduction and Business Viewpoint**

Norms are used to build up stocks to cover the demand over a specified number of future

periods. The main reason for using norms is demand and supply variability and hence it

becomes very critical to do forward planning. Norms are generally specified in terms of

periods like months, weeks or in some cases even days

Fig 1. Calculation of Net Requirement using Norms of 1 month.

As shown in the figure below, the net requirement is calculated using 1-month norms and is calculated as (Sum of Demand during Norm Period – On Hand Inventory).

Sum of Demand during Norm Period = 400 units

On Hand Inventory = 50 units

Net Requirement = 350 units

__Current Limitations and Business Benefits of Dynamic Norms Calculation__

The calculation of requirements basis norms can be done through the multiple lot sizing procedures available as part of the supply planning heuristics algorithms. There are static and dynamic lot sizing procedures which can be configured based on business need, however these are part of the supply planning run across the network.

While this approach is readily available without additional configuration, it has certain caveats:

- maintenance of master data at each production source of supply
- only executed during the supply planning runs
- any change required at a later stage would require the planning run to be taken once again for changes to reflect.

However, with the availability of the rolling aggregation function, it is possible to configure dynamic calculation of net requirement based on norms. The benefits of this approach are:

- eliminates the need for extensive master data maintenance
- enables planners to conveniently make norm changes
- simulate and review the net requirement on the go

In the next section we will see the configuration approach in multiple scenarios.

__Case 1: When the demand and norms bucket are the same__

When the norms coverage is in the same time buckets as demand, the configuration of dynamic norms calculation is easier and can be achieved directly using the Rolling Aggregation function.

The configuration for net requirement can be done as follows:

Fig 2. Illustration of Net Requirement using Norm Days

*NormQty@PL** = IBP_RAGGR (Demand@PL, SUM, 0, Norms@PL, CURRENT)*

*NetRequirement@PL** = NormQty@PL – OnHand@PL*

Where,

*Demand@PL**:*Key Figure for Demand (in weeks): Aggregation Mode*SUM*Start of calculation**0**:Key Figure containing the norm coverage (in weeks)**Norms@PL**:The range horizon for calculation**CURRENT**:

__Case 2: When the demand and norms buckets are different, and norms are at higher granularity.__

The challenge here is that you cannot directly use the norms input to define the coverage period as the input is in a different bucket. E.g demand is in weekly buckets but norms input is in monthly buckets. So using the above approach would not yield the correct results.

However, a modification of this approach can be to aggregate the demand to the higher level and then calculate the norm qty basis norm periods defined in the input.

Fig 3. Norm calculation when norm input is at higher granularity than demand

By aggregating demands to months, it is possible to use rolling aggregation at a higher level and then disaggregate the norm qty using the Copy value as disaggregation mode. It may be required to run a DISAGG operator to achieve the disaggregation.

Fig 4. Disaggregation of Monthly Value to Weeks using Disagg Operator

**Demand@MthPl** = SUM (Demand@WeekPL)

*NormQty@MthPL **= IBP_RAGGR (Demand@MthPL, SUM, 0, NormsMth@PL, CURRENT)*

*NormQty@MthPL** **à** NormQty@WeekPL * (Helper Key Figure + Disagg Operator)

*NetRequirement@WeekPL** = NormQty@WeekPL – OnHand@WeekPL*

__Case 3: When norm inputs are at a more granular level than demand__

In this scenario, the additional challenge is that the norms input may not always be a multiple of the demand periods. The implication of this is that the demand for a particular period may needed to be split.

E.g The demand is captured on a monthly level but norms input is in days. So if the norm is 50 days then the entire demand of first month is considered but demand of the second month would have to be split in relation to number of days of the month considered. This will also depend from month to month as shown below:

If the 2 months are January and February then the demand will be considered as follows:

- January – 31 days – entire month
- February – 19 days (50-31) – 19/28 of the month

However, if the 2 months are February and March, then the demand will be considered as follows:

- February- 28 days – entire month
- March – 22 days (50-28) – 22/31 of the month

As we can see, the demand would have to be split on rata basis and the critical input for the correct split is the number of days in the month.

Fig 5. Illustration of Norm Calculation when norm inputs are at lower granularity

By leveraging cumulative aggregation function, it will be possible to get the days remaining in each period with respect to the norm inputs. As soon as the remaining number of days falls below zero, the respective period will have partial demand and all periods after that the demand will not be considered.

The proportion will be calculated as 1 when the remaining days are a positive integer value, and in the first period where the remaining days falls to zero it will be calculated as shown below. For all periods after than it will be set to 0.

**Proportion@PL** = IF **(***RemainingDays@PL* > 0, 1, IF **(**(*DaysinWeek@PL + RemainingDays@PL) < DaysinWeek@PL, (DaysinWeek@PL + RemainingDays@PL) / DaysinWeek@PL* , 0 **) )**

**DemandConsidered@PL** = *Demand@PL* * *Proportion@PL*

*NormQty@PL** = IBP_RAGGR (DemandConsidered@PL, SUM, 0, NormsMth@PL, CURRENT)*

*NetRequirement@PL** = NormQty@PL – OnHand@PL*

As seen in the above examples, we can leverage the aggregation functions to build in dynamic calculations for norms at different planning levels and thereby provide the following benefits:

- Enable planners to change the norm inputs on the go
- Greatly reduce the time for net requirement generation by decoupling heuristics
- Have the flexibility to define the norms at different planning level than demand

Today we have learnt how to make effective use of the Rolling Aggregation and Cumulative Aggregation functions to enable near dynamic calculation of norm quantity based on safety days. The application of this approach has been tried and tested for a client and is being currently used by them for their monthly materials planning.

If you found this approach exciting and have some more clarifications or comments please do leave them down in the comments section and I would be happy to engage in further conversations on this.

————————————————————–X———————————————————–