on 09-20-2007 1:32 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
What I meant was to try changing the data type to the time char that you have in the level.
Ravi Thothadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mind pasting the code here?
Ravi Thothadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try chaging the data type of the variable CUANTOS.
Ravi Thothadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.