‎2008 Mar 04 10:13 PM
What is the solution in unicode system to fix the unicode error in the statement?
data: f1 type n,
f2 type n,
f3 type n.
data: head1(200),
head2(200),
head3(200).
do 200 times varying f1 from head1 next head1+1
varying f2 from head2 next head2+1
varying f3 from head3 next head3+1.
enddo.
‎2008 Mar 04 10:19 PM
‎2008 Mar 05 1:43 PM
Kevin,
The above statement is now obsolete in unicode environment. What could be the alternative?
‎2008 Mar 05 1:48 PM
Hi,
Try using like this
DATA: BEGIN OF text,
word1 TYPE c LENGTH 4 VALUE 'AAAA',
word2 TYPE c LENGTH 4 VALUE 'BBBB',
word3 TYPE c LENGTH 4 VALUE 'CCCC',
word4 TYPE c LENGTH 4 VALUE 'DDDD',
END OF text.
DATA: word TYPE c LENGTH 4,
char1 TYPE c LENGTH 1,
char2 TYPE c LENGTH 1,
leng TYPE i.
FIELD-SYMBOLS <word> LIKE text-word1.
DATA inc TYPE i.
DESCRIBE FIELD text LENGTH leng IN CHARACTER MODE.
leng = leng / 2.
DO leng TIMES VARYING char1 FROM text(1)
NEXT text+2(1) RANGE text
VARYING char2 FROM text+1(1)
NEXT text+3(1) RANGE text.
WRITE: char1, char2.
char1 = 'x'.
char2 = 'y'.
ENDDO.
DO 4 TIMES VARYING word FROM text-word1 NEXT text-word2.
WRITE / word.
ENDDO.
DO.
inc = sy-index - 1.
ASSIGN text-word1 INCREMENT inc TO <word> RANGE text.
IF sy-subrc = 0.
WRITE / <word>.
ELSE.
EXIT.
ENDIF.
ENDDO.
Regards,
Prashant