Skip to Content
0
Former Member
Jul 23, 2010 at 08:11 AM

Formula error: Variable name was expected

206 Views

Hi All,

After SP Upgrade the following section of code is throwing the error "Formula error: Variable name was expected" which code is checked for sysntax errors.

Fox code sections throwing error is:

FOREACH REFDATA AC, SPU.

ATR = ATRV ('GBRIDTYPE', AC , CHA).

IF ATR = 'NOISE'.

SUM1= SUM1 +

{QUC,YEC,BPGR,VS,VTC,AC,#,#,SPU,SUBC,#}.

SUM2= SUM2 +

{QUP,YEP,BPGR,VSP,VTP,AC,#,#,SPU,SUBP,#}.

ELSEIF ATR = 'URCOP'.

SUM3= SUM3 +

{QUC,YEC,BPGR,VS,VTC,AC,#,#,SPU,SUBC,#}.

SUM4= SUM4 +

{QUP,YEP,BPGR,VSP,VTP,AC,#,#,SPU,SUBP,#}.

ENDIF.

ENDFOR.

When we comment out 'FOREACH REFDATA AC, SPU.' and 'ENDFOR.', code is showing no errors. This indicates that there is no syntax error in the parts of code below FOREACH...

Can anyone throw some light on it?