cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating future buckets without LCode

Former Member
0 Kudos

Hi,

We have a requirement where we have to get something as mentioned in the figure below:

Could anyone please suggest how we can achieve this without LCode?

Regards,

Suprio

Accepted Solutions (0)

Answers (1)

Answers (1)

luanribeiro
Explorer
0 Kudos

Hi Suprio,

I hope you are doing well!

You can use this thread as a point of start: http://scn.sap.com/thread/3783999

Pramod posted a very good logic to get the average of the next 3 months:

Steps:

Assume PERPRODCUST is the base planning level and monthly time granularity

1. KF1@ PERPRODCUST = IF ((PERIODID - $$PERIODIDCU$$ <= 2) and (PERIODID -        $$PERIODIDCU$$ >=0) , CONSDEMANDQTY,null)

 

     Extract the values for Current Month, M+1 and M+2

2. Add additional calculation. This will sum up all the values for Current Month, M+1 and M+2

    KF1@PRODCUST = SUM(KF1@ PERPRODCUST)

3.

    a. Create a helper key figure HKF1@PRODCUST to calculate average

        HKF1@ PRODCUST  = (KF1@PRODCUST / 3)

    b. Create helper key figure and pass input key figure with time dimensions for e.g. KF   

        DMDPLANQTY

       This will put the average value in Current period.

       HKF1@PERPRODCUST = IF ((PERIOIDID=$$PERIODIDCU$$), HKF1@ PRODCUST, null))

    c. KF2@PERPRODCUST = HKF1@PERPRODCUST

You have to test it using the PERIOIDs to work with the different periods to be able to do the calculations that you need.

Let´s get into that, please take a look and then come back with your findings.

Regards,

Luan Ribeiro

Former Member
0 Kudos

Hi Luan,

We tried it, this method is not working out for us as value of KF2 is variable and can be anything depending upon users discretion. Is there any solution other than this method?

Regards,

Suprio

luanribeiro
Explorer
0 Kudos

Hi Suprio,

Can you share what you have done so far?

For the KF2 as a variable input, maybe you can try the following:

KF1@ PERPRODCUST = IF ((PERIODID - $$PERIODIDCU$$ <= KF2@PERPRODCUST) and (PERIODID -        $$PERIODIDCU$$ >=0) , CONSDEMANDQTY,null)

I think the only issue about this logic is that we can´t make it rolling!

I have used before some attribute transformations to handle this logic (with KF2 as a variable input) but it has a lot of implications.

Maybe the other members can share a different approach!

Cheers,

Luan Ribeiro