Skip to Content
avatar image
Former Member

capture the manullay changed value in the layout

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 04, 2008 at 03:19 PM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 05:59 PM

    Solved by myself

    Add comment
    10|10000 characters needed characters exceeded