Skip to Content

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

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
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 19, 2018 at 09:03 AM

    Hi,

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

    Regards,

    Gregor


    Add comment
    10|10000 characters needed characters exceeded