CMOD. Variable not recognised

Question: I'm following the How to paper on Deriving a variable value from another variable. My application is nearly identical to that in the paper. Easy, I thought!

So, I created my variables, one is Customer Exit (ZSAL_V12), one is User Entry (ZSAL_V04).

Then in CMOD I inserted the code (well below the original CASE I_VNAM statement):
[color=red]
WHEN ‘ZSAL_V12’.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = ‘ZSAL_V04’.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
L_S_RANGE-LOW+4(2) = ‘01’.
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
L_S_RANGE-SIGN = ‘I’.
L_S_RANGE-OPT = ‘BT’.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
[/color]
[b]The problem is[/b] the code doesn't recognise ZSAL_V12. I get the error message:
Field ZSAL_V12 is unknown. It is neither in one of the specified tables nor defined by a data statement.

Have I missed a step? I have followed the 'How To' to the letter, but I know it was written for v2, and we are on v3.1.

Has anyone seen this before? Any help much appreciated.

Patrick Byrd

Answer:
I am sure you forgot to type ' somewhere to encapsulate ZSAL_V12.

Check in the error message what is the concerned line, and check this line especially.
_________________
Laurent THIBERT
Business Connection Amerique

Answer:
Thanks, but the code I posted was simply copied from what I put in CMOD, complete with the ' .

The error message is (precisely, with punctuation):

Include ZXRSRU01
Field "'ZSAL_V12'" is unknown. It is neither in one of the specified
tables nor defined by a "DATA" statement.

That is a double-quote ( " ) followed by a single-quote ( ' )

Any more ideas?

Patrick

Answer:
Have you used the right type of quotes in your code? There's a difference between `´ and ' '...

Answer:
Excellent.

No, I didn't know, and on my keyboard there is only one ' (which is the wrong one).

So I cut and pasted the ' from your reply and that worked fine.

Is that obtuse or is it obtuse?

Many thanks,
Patrick
Copyright ?2007 - 2008 www.jt77.com