cancel
Showing results for 
Search instead for 
Did you mean: 

How to read year from 0FISCPR to string variable in FOX code.

former_member250987
Participant
0 Kudos

Hi Team,

I have a requirement in FOX code to read year from fiscal year period variable and to place in another fiscal year period variable by concatenating with '001'.
I have written following code but I am getting data type mismatch error at line 6 .

DATA F_YYYY_V TYPE STRING .
DATA F_YYYY_V1 TYPE STRING .
DATA F_YYYY_D TYPE 0FISCPER.
DATA TEMP1 TYPE 0FISCPER.
TEMP1 = VARV( ZFISCPD_LYFP). eg : ZFISCPD_LYFP =2018001
read year
F_YYYY_V = TRUNC( FLIPMTH / 1000 ). " getting syntax error
F_YYYY_D = concat(F_YYYY_V ,'001').

Please let me know if there is any other way to achieve this requirement.

Thanks

Siva

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

the FOX documentation contains an example, cf. Examples -> Working with Character Strings.

Regards,

Gregor