Showing results for 
Search instead for 
Did you mean: 

Stock Projected calculation for current and future weeks

0 Kudos

We have the similar calculation for 'Stock Projected' key figure.

My concern is for the current week calculation, the projected stock should not consider the cumulative aggregation of last week's 'Stock Projected' key figure value.

For example:

From the screenshot:

Period 2 is my Current Week.

Consider 0 stock on Period 2.

Hence, my calculation for 'SUM_DEM_RECPT@PLIN' for current week should be Stock + Receipt - Demand: 0+0-40 = -40.But as per current configuration, The 'Projected stock' KF calculation for Period 2 (Current Week) is considering aggregation from Past weeks 'Stock projected' KF value.

But my requirement is:

For current week's 'Projected Stock' KF Calculation, it should not consider the 'Projected Stock' KF value for aggregation from last week. It should be the same as 'SUM_DEM_RECPT@PLIN' KF Value.

For future periods, calculation is perfect. I want the support for the Current weeks 'Projected stock' KF calculation. It should not consider cumulative aggregation from Last weeks value.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos


To determine what is causing the -401, we would need to see the 'Inputs' KF that you are feeding into the caggr calculation. If you look from wk12 on - it is performing exactly like it should with the debits and credits. For the troubleshooting, post a screenshot with the input KF in the caggr calc at the BPL, both time and root attributes.

Regarding the 0 in past weeks, the caggr calculation cannot be nested in anything else. Thus if you want to see 0's in the past - I would suggest.

Copy the current ZSTOCKPROJECTED@BPL to ZSTOCKPROJECTED01@BPL. Then in the original KF change the calculation to


Of course include any LPA or UOM levels as well.

That way you won't have to change any templates that might already have the KF defined in them.

0 Kudos

Hi advait1998,

Since your requirement is not to consider the past data for calculation of projected stock, below are few options as how to proceed (2nd option is recommended):

1. Schedule the jobs of clearing the past data, which will in turn do not populate the Projected stock for past.

2. In the calculation of projected stock KF, the horizon should be "CURRENTFUTURE", this will not do cumulative aggregation from past. This will start the Projected stock calculation from current date.

For more details on Projected Stock calculation through IBP_CAGGR function, refer SAP IBP Config help for more details:

Projected Stock Calculations | SAP Help Portal



0 Kudos

Hi Praveen, Thank You for your response and quick support.

In case, If I consider the 2nd option you mentioned,

Then what will be the effect on the calculation of future periods for 'Stock Projected' KF.

For example from the above screenshot Period 1 is my current week.

When the system is calculating the value of 'Stock Projected' KF for Period 2 (Future period) it is always considering the cumulative aggregation of its past week. (Period 2 calculation considering the value of Period 1 which is past week for Period 2 and so on.)

Hence, can it affect my future period calculation as I mentioned?

The Cumulative aggregation logic is not affected. It is only the starting point of your calculation will be current period and then calculation will happen till the future.


Choose the horizon which matches your requirement.

0 Kudos

Thank you for your reply. I will try this calculations suggested.

0 Kudos

Hi prp23,

I tried the calculation by changing the horizon to 'CURRENTFUTURE'.

1.Screenshot when horizon is 'PASTCURRENTFUTURE'.

Stock Projected calculation for Current week (W11 2023).

143-350=-207. (This stock projected calculation considering the cumulative aggregation of Past value.)


2.Screenshot when horizon is 'CURRENTFUTURE'.

Stock Projected calculation for current week (W11 2023):

Ideally should be:

0(Blank in W10 2023) - 350= -350

But in my case, its coming -401. I have no idea why it is calculating as -401.


Please guide me on how can I proceed further.

1 more question I wanted to ask:

From the above example,

I need my 'Stock Projected' key figure should become '0' for all past weeks. How can I make it 0 in past weeks as stock projected is 'Calculated' key figure.

Can you please guide me on this.

Thanks in advance.