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

Related questions

1 Answer

  • Posted on Sep 19, 2018 at 09:03 AM

    Hi,

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

    Regards,

    Gregor


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.