cancel
Showing results for 
Search instead for 
Did you mean: 

SAP IBP Calculating current week and aggregating it to next wekk

snlak
Discoverer
0 Kudos
705

WE have a requirement were in the current week to be displayed as 0 and next week as 1 and second week as 2 and so on

How do we achieve this in SAP IBP through key figure

Accepted Solutions (0)

Answers (4)

Answers (4)

Irmi_Kuntze
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey Sravanthi

Without having a look into the system, I dont know how to find the error. So you could open an OSS ticket

And bye the way, what Piyush has written is exactly the same approach as described by me.

Yours

Irmi

piyush_parekh
Active Contributor
0 Kudos

Hi Sravanthi,

You can also try below

Define a key figure KF1 as : if periodid = current period id then 0 else 1 (give input as any stored key figure same as that of base planning level of this KF1) and another key figure KF2 as : IBP_CAGGR ( KF1, SUM, FORWARD, CURRENT FUTURE) KF2 should reflect what you're looking for.

Please refer the correct syntax from IBP model configuration guide.

Regards,

Piyush

Irmi_Kuntze
Product and Topic Expert
Product and Topic Expert
0 Kudos

Why the 10 at the end? A normal time profile is only going up to 5, 10 usually does not exist. The Parameter is optional. Do you get the error message as well if you leave it out?

The error message sounds as if you have for the same KF two calculations at the same planning level. Are you really working with 2 different KF as described? Cannot work in one step

snlak
Discoverer
0 Kudos

Thank you for responding!!

I am getting the error message even when I have not given the parameter and yes its 2 diff Key figures only i have tried out

Irmi_Kuntze
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey Sravanthi

Check the Configuration guide: Using Time Periods in Key Figure Calculations :

You could have a Helper KF1 with calculated value IF(PERIODIDn <= $$PERIODIDnCU$$, 0, 1) and add an additional KF as input on the same planning level.
If your time profile provides Y, Q, M, CalWK, TW and D, and your calculation should be on Calendar Weeks, then n would be 4 and PERIODID4 <= $$PERIODID4CU$$

Then you have according to Cumulative Aggregation:

KF@CALWKxxx = IBP_CAGGR(KF1@CALWKxxx, ,''SUM'',''FORWARD'',''CURRENTFUTURE'')

Good Luck, Irmi

snlak
Discoverer
0 Kudos

Thank you for the response ,I have tried to apply the above logic but its getting errored out

"The key figure can't have the same calculation more than once"

IBP_CAGGR("ZCURRENTSAPWEEKS@CALWKPRODLOC" ,''SUM'',''FORWARD'',''CURRENTFUTURE'',10)