Skip to Content
0
Former Member
Jan 25, 2010 at 05:00 PM

Script Logic A=B+C and C=A-B overwrite each other

20 Views

Hi Experts,

I created an input schedule with 5 rows where as the last three are supposed to be input ready. The user is supposed to be able to input data in either one of those. For example:

I the user inputs row 1, rows 2 and 3 are supposed to get calculated automatically and so one. But unfortunately

A = 1000 (reference)

B = 200 (cost type B)

C = 50 (change of cost type -> D-B)

D = 250 (new cost type B -> B+A)

E = 25% (cost type percentage of reference D/A)

Now case 1 the user inputs C and the system has to calculate D and E everything works fine. But as soon as I include other script logics for case 2 and 3 into the DEFAULT.LGF the values overwrite each other which is pretty much logical. I dont know how to handle this issue. Maybe with *WHEN?

Can anybody help me with that? I'd really appreciate it.

My script logics:

1)

*XDIM_MEMBERSET L_ACCT=C,D,B

*XDIM_MEMBERSET RPTCURRENCY=EUR

*XDIM_MEMBERSET CATEGORY=PLAN

*XDIM_MEMBERSET ENTITY=A1000

*XDIM_MEMBERSET TIME=2009.JAN,2009.FEB,2009.MAR,2009.APR,2009.MAY,2009.JUN,2009.JUL,2009.AUG,2009.SEP,2009.OCT, 2009.NOV,2009.DEC

*BEGIN

[L_ACCT].[#C]=[L_ACCT].[D]-[L_ACCT].<b>

*END

2)

*XDIM_MEMBERSET L_ACCT=D,C,B

*XDIM_MEMBERSET RPTCURRENCY=EUR

*XDIM_MEMBERSET CATEGORY=PLAN

*XDIM_MEMBERSET ENTITY=A1000

*XDIM_MEMBERSET TIME=2009.JAN,2009.FEB,2009.MAR,2009.APR,2009.MAY,2009.JUN,2009.JUL,2009.AUG,2009.SEP,2009.OCT, 2009.NOV,2009.DEC

*BEGIN

[L_ACCT].[#D]=[L_ACCT].[ C]+[L_ACCT].<b>

*END

3)

*XDIM_MEMBERSET L_ACCT=E,D,A

*XDIM_MEMBERSET RPTCURRENCY=EUR

*XDIM_MEMBERSET CATEGORY=PLAN

*XDIM_MEMBERSET ENTITY=A1000

*XDIM_MEMBERSET TIME=2009.JAN,2009.FEB,2009.MAR,2009.APR,2009.MAY,2009.JUN,2009.JUL,2009.AUG,2009.SEP,2009.OCT,2009.NOV,2009.DEC

*BEGIN

[L_ACCT].[#E]=[L_ACCT].[ D]/[L_ACCT].[A]

*END