04-01-2009 3:11 PM
Hi,
The below code is giving me an Unicode error.
Especially <number> gives the Unicode error.
Let me know how to rectify the error.
Code: - start-
FIELD-SYMBOLS: <number>.
DATA: BEGIN OF NUMBERS,
ONE TYPE P VALUE 10,
TWO TYPE P VALUE 20,
THREE TYPE P VALUE 30,
FOUR TYPE P VALUE 40,
FIVE TYPE P VALUE 50,
END OF NUMBERS.
DATA SUM TYPE I.
assign NUMBERS-two to <number>.
ADD <number> FROM 1 TO 3 GIVING SUM.
Code: --- end ---
Regards,
Purshoth
04-01-2009 3:32 PM
Hi,
you need to change field symbol declaration part like below
FIELD-SYMBOLS: <number> type any.<-------here
DATA: BEGIN OF NUMBERS,
ONE TYPE P VALUE 10,
TWO TYPE P VALUE 20,
THREE TYPE P VALUE 30,
FOUR TYPE P VALUE 40,
FIVE TYPE P VALUE 50,
END OF NUMBERS.
DATA SUM TYPE I.
assign NUMBERS-two to <number>.
ADD <number> FROM 1 TO 3 GIVING SUM.
Regards,
Peranandam
04-01-2009 3:42 PM
Hi,
In Unicode programs, all data objects of the sequence must lie within one structure. If in the syntax check, this cannot be recognized statically, you must specify a structure range with addition RANGE.
ADD numbers-one THEN numbers-two
UNTIL numbers-three
GIVING sum.
a®