Hi Experts,
I am facing issues with a simple script logic.
Here is the functionality needed. I have a KPI model and an input template where in user inputs data for certain KPIs for first month of each year (say 5yrs). While saving this data to the model, system should copy the value of first month to rest all months, for each year.
Input template format:
KPI 01.2009 01.2010 01.2011 01.2012 01.2013
KPI1
Script logic for the same:
*WHEN RKPINO.PLANFREQ
*IS "Y"
*WHEN RVTYPE
*IS "20"
*FOR %Q1% = 1,2,3,4,5,6,7,8,9,10,11
*REC(FACTOR=1,TIME=TMVL (%Q1%,%TIME_SET%))
*NEXT
*ENDWHEN
*ENDWHEN
RKPINO is the KPI, PLANFREQ is a property of it, if it is Y (yearly), it means user inputs for these KPIs for first month, and same has to be copied for all other months.
RVTYPE is the value type, 20 - specifies its budget.
TIME is the time dimension.
Now the way the above logic works is,
1) When entry made for 1 year alone,
KPI 01.2009 01.2010 01.2011 01.2012 01.2013
KPI1 20
it copies this value correctly to all other months.
KPI 01.2013 02.2013 03.2013 04.2013 05.2013 06.2013 07.2013 08.2013 09.2013 10.2013 11.2013 12.2013
KPI1 20 20 20 20 20 20 20 20 20 20 20 20
2) When entry is made for more than 1 year,
KPI 01.2009 01.2010 01.2011 01.2012 01.2013
KPI1 15 20
it works like below.
KPI 01.2013 02.2013 03.2013 04.2013 05.2013 06.2013 07.2013 08.2013 09.2013 10.2013 11.2013 12.2013
KPI1 20 35 35 35 35 35 35 35 35 35 35 35
I guess its something to do with the scoping of time dimension? Please note that i can't hardcode the years in the coding.
I am new to script logic. With FOX, i could've simply wrote this by using FOREACH time statement.
We are using BPC NW 10.0 version.
Can anybody help me to fix this issue.
Thanks in advance.
Bindu