Application Development 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: 

Unicode error:a line of internal table and a data object are not mutually c

Former Member
0 Kudos

Hi Friends,

This is the issue in upgradation from 4.6c to ECC6.0

I have an internal table itab which has include structure say 'xyz' . In xyz there is a field of type int4 as third field. I have a field as l_line which is a string.

data : begin of itab occurs 0.

include structure zxyz.

data: end of itab.

data: l_line type string.

In the program I am getting the unicode error as:

" A line of "itab" and "l_line" are not mutually convertible in unicode program." at he following line.

loop at itab into l_line.

......

................

........................

endloop.

Thanks,

Ali.

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

Hi Liaqat,

In ECC 6.0, the data type of passing field & receiving field should be same.

Change l_line to type int4.

data : begin of itab occurs 0.
include structure zxyz.
data: end of itab.

data: l_line type int4.

Best regards,

Prashant

4 REPLIES 4

Former Member
0 Kudos

Hi,

declare a work area which is the same as the itab structure and then use that in your loop at statment

<b>data: l_line like line of itab.</b>

loop at itab into l_line.

......

................

........................

endloop.

Thanks

Naren

0 Kudos

Hi Narendran,

I did the same earlier, but the field l_line is again used in the another line as follows

IF l_line CS w_group.----


(1)

where w_group LIKE zstr-cctr_group.

here zstr-cctr_group is same as one of the fields of structure xyz.

in line 1 it is giving warning as

l_line is incompatible and it must be C,N,D,T or string.

Thanks,

Ali

0 Kudos

Hi Ali,

Change code as

DATA l_temp_line type string.

move l_line to l_temp_line.

IF l_temp_line CS w_group.

Regards,

Atish

former_member223537
Active Contributor
0 Kudos

Hi Liaqat,

In ECC 6.0, the data type of passing field & receiving field should be same.

Change l_line to type int4.

data : begin of itab occurs 0.
include structure zxyz.
data: end of itab.

data: l_line type int4.

Best regards,

Prashant