cancel
Showing results for 
Search instead for 
Did you mean: 

Converting 0FISCPER into 0FISCYEAR format

former_member269100
Participant
0 Kudos

Hi all,

I have a requirement to convert value of type 0FISCPER into a 0FISCYEAR format. This needs to be done as a FOX formula in my parameter group. Can anyone give suggestion please? I'm new to BPS.

Thanks,

Aloy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Is your requirement to derive fiscal year from fiscal year period?? If so, you can use the below line of code in FOX. DATA FISCPER TYPE 0FISCPER. DATA FISCYEAR TYPE 0FISCYEAR. FISCPER = OBJV(). FISCYEAR = SUBSTR(FISCPER,0,4). "This gives you the year if fiscper is in the format say '2008001' "If multiple fiscpers appear in the level, use the below code FOREACH FISCPER. FISCYEAR = SUBSTR(FISCPER,0,4). ENDFOR.

former_member269100
Participant
0 Kudos

Hi,

Thank you very much for your reply. I have tried your suggestion but some sort of data type mismatch error came out. The result of SUBSTR is of type string but the 0FISCYEAR however is non-string. As I'll just be using the fiscal year value on my IF condition, I managed to make do by defining a fiscal year variable of type string and use this to assign the result of substr. Now it works.

Thanks again.

Aloy