Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in Report Execution

Murali_Shanmu
SAP Champion
SAP Champion
0 Likes
953

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
934

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

7 REPLIES 7
Read only

Former Member
0 Likes
935

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

Read only

0 Likes
934

Any settings that i have to make ?

Read only

0 Likes
934

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.

Read only

0 Likes
934

In the program attributes uncheck the check box <b>unicode checks active</b>.

this will solve the problem.

Regards

Raja

Read only

0 Likes
934

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.

Read only

0 Likes
934

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.