Skip to Content
author's profile photo Former Member
Former Member

comma was expected and other arguments: VARC Fox Formula

Hi Experts!!

I'm trying to write a Fox formula to get the number of values of a value ranges variable, something like this:

<i>DATA CUANTOS TYPE I.

CUANTOS = VARC(0I_FPER).

DO CUANTOS TIMES.

FOREACH CATEGORIA, MATERIAL.

........ and go on.....</i>

(Where '0I_FPER' is a variable of type value range)

But, I'm getting the following error: <b>"comma was expected and other arguments insted of )"</b>

in this line: <b>CUANTOS = VARC(0I_FPER).</b>

I think the correct sintax for VARC is VARC(variable), so why is expecting more arguments???

Thnks a lot!!

Yolanda.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Sep 21, 2007 at 02:32 PM

    Hello,

    the message pops up if the characteristic is compounded. You have to

    supply a local variable with the value of the superordinate characteristic.

    You have to add the following lines to your code.

    DATA FISCVARNT TYPE 0FISCVARNT.

    ...

    FISCVARNT = 'K4'.

    CUANTOS = VARC(0I_FPER, FISCVARNT).

    Best regards

    Hans-Juergen Schwab

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 12:41 AM

    Try chaging the data type of the variable CUANTOS.

    Ravi Thothadri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 12:52 AM

    Do you mind pasting the code here?

    Ravi Thothadri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 01:04 AM

    What I meant was to try changing the data type to the time char that you have in the level.

    Ravi Thothadri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:58 AM

    Hi,

    Can you please check if you are missing a '.' at the end of previous line or something like that? Is the variable name in the VARC statement spelled correctly?

    If you can paste your complete code in a post, it will be easier to spot the problem.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mayank!

      Thnks for your answer.

      Th complete code is:

      <i>DATA PRIMERDESC TYPE F.

      DATA COSTONETO TYPE F.

      DATA NPS TYPE F.

      DATA MATERIAL TYPE 0MATERIAL.

      DATA CATEGORIA TYPE 0MATL_GRP_1.

      DATA GPOCTE TYPE 0CUST_GROUP.

      DATA VERSIOB TYPE ZBUDGET.

      DATA VERSI TYPE 0VERSION.

      DATA CUANTOS TYPE I.

      DATA FEC TYPE 0FISCPER.

      GPOCTE = VARV(ZIPVAR002).

      VERSIOB = VARV(ZVERSION).

      VERSI = VARV(ZIPVAR0001).

      FEC = VARV(0I_FPER).

      CUANTOS = VARC(0I_FPER).

      DO.

      FOREACH CATEGORIA, MATERIAL.

      PRIMERDESC ={ ZIPRA001, GPOCTE, FEC, K4, PR00, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB } * (1 - { ZIPRA001, GPOCTE, FEC, K4, Z190, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB } ).

      COSTONETO = PRIMERDESC*(1-{ ZIPRA001, GPOCTE, FEC, K4, Z100, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }).

      NPS = COSTONETO

      -(COSTONETO( { ZIPRA001, GPOCTE, FEC, K4, Z124, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))-(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4,Z125, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB}))

      -(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4, Z126, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))-(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4,Z127, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))

      -(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4, Z1D7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))-(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4,Z1G7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))

      -(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4, Z1A7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))-(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4,Z1E7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))

      -(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4, Z1C7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))-(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4,Z122, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))

      -(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4, Z1F7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))-(COSTONETO({ ZIPRA001, GPOCTE, FEC, K4,Z1B7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB }))

      -(COSTONETO*({ ZIPRA001, GPOCTE, FEC, K4, Z1H7, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB })).

      { ZIPRA001, GPOCTE, FEC, K4, NPS0, MATERIAL, CATEGORIA, VERSI, 020, VERSIOB} = NPS.

      ENDFOR.

      EXIT.

      ENDDO.</i>

      and the error is :

      "<b>Comma and other arguments were expected instead of )

      Sintax error in row 28 column 24</b> "

      Tha is this one (afeter coments) : CUANTOS = VARC(0I_FPER).

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.