cancel
Showing results for 
Search instead for 
Did you mean: 

comma was expected and other arguments: VARC Fox Formula

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Former Member
0 Kudos

You'r totally rigth!!!

This solved my problem.

Thnks a lot for your help!!!

Answers (4)

Answers (4)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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).

Former Member
0 Kudos

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

Ravi Thothadri

Former Member
0 Kudos

Do you mind pasting the code here?

Ravi Thothadri

Former Member
0 Kudos

yes, can you post an example please?

Former Member
0 Kudos

Try chaging the data type of the variable CUANTOS.

Ravi Thothadri

Former Member
0 Kudos

Hi Ravi, thnks for your answer.

which data type do I have to change it to??

isn't <b>I</b> --> Integer the correct one??