on 09-02-2008 4:53 PM
HI Frineds,
My requirement is
Once planning function (Fox Formula) is attached to one manual planning layout.
Intillay when we execte the function it will displays the values in the manual planning layout for 12 postiong periods.
Let us assume that
Budget amount is $2400. when i excute the function it will displays the $200 for each postiong period.
if i changed value from 200 to 100 first posting period(January)
now if i execute the same function again in the slection like posting period = 002
it shoud dispalys the $100 for January period
and remaining 2300 (2400 - 100) for 11 months.
So my question is how to captue this chnaged value into the variable.
i developed the following code
FOREACH ZCATEGORY,ZCOSTELEMT,ZPOSTPER.
IF ZPOSTPER = #.
ZBUDAMT = {0AMOUNT,ZCOSTELEMT,#,ZCATEGORY}.
ELSEIF ZPOSTPER = 001.
DO.
{0AMOUNT,ZCOSTELEMT,ZPOSTPER,ZCATEGORY} = ZBUDAMT / 12.
ZPOSTPER = TMVL(ZPOSTPER,1).
IF ZPOSTPER > 012.
ZPOSTPER = 001.
*Jan actual amt
ZJANAMT = {0AMOUNT,ZCOSTELEMT,001,ZCATEGORY}.
EXIT.
ENDIF.
ENDDO.
ZAMOUNT1 = ZBUDAMT - ZJANAMT.
ELSEIF ZPOSTPER = 002.
DO.
{0AMOUNT,ZCOSTELEMT,ZPOSTPER,ZCATEGORY} = ZAMOUNT1 / 11.
ZPOSTPER = TMVL(ZPOSTPER,1).
IF ZPOSTPER > 012.
ZPOSTPER = 002.
*Feb actual amt
ZFEBAMT = {0AMOUNT,ZCOSTELEMT,002,ZCATEGORY}.
EXIT.
ENDIF.
ENDDO.
ZAMOUNT2 = ZAMOUNT1 - ZFEBAMT.
ELSEIF ZPOSTPER = 003.
DO.
{0AMOUNT,ZCOSTELEMT,ZPOSTPER,ZCATEGORY} = ZAMOUNT2 / 10.
ZPOSTPER = TMVL(ZPOSTPER,1).
IF ZPOSTPER > 012.
ZPOSTPER = 003.
*March actual amt
ZMARAMT = {0AMOUNT,ZCOSTELEMT,003,ZCATEGORY}.
EXIT.
ENDIF.
ENDDO.
ZAMOUNT3 = ZAMOUNT2 - ZMARAMT.
-
but when i am ececting this function it is always diplays the values 200 for all postiong period even after changeing the value from 200 to 100 in the layout manullay.
Please suggest me how to get this value into variable in the foc forumula for further caluctions.
Send me if you have any sample code.
It would be great help for me.
Thanks
Sushma
Solved by myself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can try working with two versions of the layout data. I mean, you can define a copy function, that should be launched before your fox function. This copy function will copy the actual data (version a) in the layout to another value of characteristic (version b, for example). After executing your fox function, you will be able to compare the two data sets changing the value of "version". By this, you can be aware of changes in your planning data.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.