cancel
Showing results for 
Search instead for 
Did you mean: 

FOX formula & time period?

Former Member
0 Kudos

Hi all,

I have one IO- closing marker to mark all closing period for transaction data. I found that my FOX formula calculate two periods (closing period & opening period) seperately.

For example:

Closing period: 1-10

Openning period: 11-12

The formula is <u>Equipment values$ ( begining balance) = previous period balance (ending balance) ;</u> and the<u> current period ending balance = current value$ + previous period balance</u>.

So I cannot get the begining balance from period 10. Any suggestion?

Thank you.

J.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

One suggestion & two questions:

Firstly I would place all your iterations within the one FOR loop as follows:

FOREACH Account, Year, Period

ENDFOR.

Secondly have you ensured that the correct periods & years are in your planning package / filter?

Finally have you tried using FOREACH Account, Year, Period IN SELECTION?

Former Member
0 Kudos

Hi RM,

Yes, the following is my business scenario:

1) My layout uses 'fiscaly period/ year' and the formula is created in one level by using posing period and fiscal year. I derived the fsical period/year and posting period.

2) I am not sure if I can place all iterations in one FOR loop. Becuase if the posting period= 1 (001/2006) and use offset value -1; then the posting period =0 (i would get 000/2006 instead of 012/2005). Do you have advices if I have one loop and need to avoid my posting period=0.

Thank you

J.

Answers (1)

Answers (1)

Former Member
0 Kudos

John,

I am not sure if I understand your question correctly.You are not able to get the

total of the Actual periods (1-10), is that right ? You should be able to loop using

DO..ENDDO using your actual period and plan period variables to get it.Post

your code and let us where does it fail.

Hope this helps.

Cheers

Srini

Former Member
0 Kudos

Hi Srini,

No, I mean that I can calculate the begining balance for period 1-9 & and 12 but not periods 10 & 11. Period 10 is last closing period and the formula cannot carry the ending balance to period 11 (the first opening period) as a begining balance. I am thinking that the IO-closing period cause this problem.

Thank you. J.

Here is the code:

DATA PER TYPE 0FISCPER3.

DATA PER1 TYPE 0FISCPER3.

DATA YEAR TYPE 0FISCYEAR.

DATA YEAR1 TYPE 0FISCYEAR.

DATA PA TYPE ZPLNACCT.

FOREACH PA.

FOREACH YEAR,PER.

IF PER = 001.

YEAR1 = TMVL(YEAR,-1).

PER1 = 012.

IF PA = '0000180100'.

{0AMOUNT,PER,YEAR,'INVENTORY'} = {0AMOUNT,PER,YEAR,PA} -

{0AMOUNT,PER1,YEAR1,PA}.

ENDIF.

IF PA = '0000180200'.

{0AMOUNT,PER,YEAR,'EQUIPMENT'} = {0AMOUNT,PER,YEAR,PA} -

{0AMOUNT,PER1,YEAR1,PA}+{0AMOUNT,PER,YEAR,'0000645000'}.

ENDIF.

ENDIF.

IF PER <> 001.

PER1 = TMVL(PER,-1).

YEAR1 = YEAR.

IF PA = '0000180100'.

{0AMOUNT,PER,YEAR,'INVENTORY'} = {0AMOUNT,PER,YEAR,PA} -

{0AMOUNT,PER1,YEAR1,PA}.

ENDIF.

IF PA = '0000180200'.

{0AMOUNT,PER,YEAR,'EQUIPMENT'} = {0AMOUNT,PER,YEAR,PA} -

{0AMOUNT,PER1,YEAR1,PA} + {0AMOUNT,PER,YEAR,'0000645000'}.

ENDIF.

ENDIF.

ENDFOR.

ENDFOR.

Former Member
0 Kudos

John,

So your code works for periods 1-9 and it doesn't for periods 10 and 11. Have you tried to put messages and see what values is it reading ? Here is the sample code for messages.MESSAGE I000(ZSEM) WITH 'PER ' PER.

Try running your code from IF PER <> 001. for these two specific periods, put break-points as required to zero-in the problem.Just by looking at the code, I don't see period 1-9 any different than periods 10 and 11.

Hope this helps.

Cheers

Srini