Search
Search

# 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

##### Former MemberSeptember 04, 2008 at 19:59 PM0 Likes
View more on this topic or