‎2005 Nov 14 7:08 AM
Hi
I am getting an Error as '"ALPHA" and "IT-F2" are type-incompatible.'
Can anyone solve it.
Report abc.
data: begin of it occurs 5,
f1 like sy-index,
f2,
end of it,
alpha(5) value 'ABCDE'.
do 5 times varying it-f2 from alpha0 next alpha1.
it-f1 = sy-index.
append it.
enddo.
it-f2 = 'Z'.
modify it index 4.
loop at it.
write: / it-f1, it-f2.
endloop.
loop at it.
it-f1 = it-f1 * 2.
modify it.
endloop.
skip.
loop at it.
write: / it-f1, it-f2.
endloop.
it-f2 = 'X'.
modify it transporting f2 where f1 <> 10.
skip.
loop at it.
write: / it-f1, it-f2.
endloop.
‎2005 Nov 14 7:19 AM
surprisingly i have not got any error when i ran the same code....
here is the output of your code:
1 A
2 B
3 C
5 Z
5 E
2 A
4 B
6 C
10 Z
10 E
2 X
4 X
6 X
10 Z
10 E
‎2005 Nov 14 7:19 AM
surprisingly i have not got any error when i ran the same code....
here is the output of your code:
1 A
2 B
3 C
5 Z
5 E
2 A
4 B
6 C
10 Z
10 E
2 X
4 X
6 X
10 Z
10 E
‎2005 Nov 14 7:28 AM
‎2005 Nov 14 7:43 AM
Yes, Even me too. I am got it working in a different server. But in my Test server it is giving compilation error. I thionk this has got to do with some setting somewhere.Pls help.
‎2005 Nov 14 7:51 AM
In the program attributes uncheck the check box <b>unicode checks active</b>.
this will solve the problem.
Regards
Raja
‎2005 Nov 14 8:31 AM
Hi,
I too got complilation error when I ran your code.Now I modified the code and it is showing the output.Kindly reward points if it helps.
data: begin of it occurs 5,
f1 like sy-index,
f2,
end of it,
alpha(5) value 'ABCDE'.
<b>data i1 type i value 0.</b>
<b>do 5 times.
it-f2 = alpha+i1(1).
it-f1 = sy-index.
append it.
i1 = i1 + 1.
enddo.</b>
it-f2 = 'Z'.
modify it index 4.
loop at it.
write: / it-f1, it-f2.
endloop.
loop at it.
it-f1 = it-f1 * 2.
modify it.
endloop.
skip.
loop at it.
write: / it-f1, it-f2.
endloop.
it-f2 = 'X'.
modify it transporting f2 where f1 <> 10.
skip.
loop at it.
write: / it-f1, it-f2.
endloop.
‎2005 Nov 14 10:58 AM
Hi
Issue has been fixed and solved. But still can anyone say me what impact does 'unicode checks active' have on the program given above.
‎2005 Nov 14 11:40 AM