cancel
Showing results for 
Search instead for 
Did you mean: 

increase Fiscper in fox formula

Former Member
0 Kudos

Hi all,

I have to increase value of fiscper in a fox formula to copy quantity from a year to following 10.

How can I do? I tried with TMVL(fiscper, 1) but it dosn't seem to work. For example the first value is '2007001' and I want the following '2007002' '2007003' .. and so on.

How can I do?

Thank you to all

Andrea

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If you have standard Fiscal year variant K4, then use

TMVL(fiscper, 12) and use a counter for the year via a Do loop.

Hope this helps,

Mary

Former Member
0 Kudos

Hi,

TMVL will not work for this, what can be done is if the value for period ( eg. 001/2007 - 012/2007) is being taken from a variable then you can get the start value using VARV and then do this

data i_next type 0fiscper.

data i_start type 0fiscper.

data no_per type i.

i_start = varv("name of variable").

no_per = varc("name of variable")

i_next = i_start.

do no_per times.

*processing logic

*get the next value by

counter = counter + 1.

i_next = VARI("name of variable", counter)

enddo.

The other option is to generate you own loop like DO...ENDDO then within this increment the period by adding 1 to the period.

thanks

Former Member
0 Kudos

Hi Anand,

thank you for your prompt reply. I still have little problems. I created 2 variables, one for the origin fiscper to be copied, one for the destination. Example ZV1 (2006001 / 2006012), ZV2 (2007001 / 2016012). Both are built like list of single values. Should I create them like a range?

Does the VARV and VARI functionalities work with range?

Thank you anyway!!!

Andrea

Former Member
0 Kudos

Hi

Yes they should be created as range what I have seen is VARV function will get the low value from range and the VARI will get the number of values with the range.

hope this was helpfull

Former Member
0 Kudos

I solved my problem!!!

Thank you very much!!!

Hi,

Andrea