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

ABAP program issues..Unicode program "ITAB" must have the same structure?

Former Member
0 Kudos
2,122

Dear Expert,

I coded below code in se38, but system give below error message, could please kindly advie issue reason? Thanks!!

Error message: A line of "ITAB" and "LINE" are not mutually convertible. In a Unicode program "ITAB" must have the same structure layout as "LINE" independent of the length of a . Unicode character. Unicode character.

REPORT  ZTEST_HIHIHI.

Data: begin of line,
num type i,
sqr type i,
end of line,

itab type standard table of line with key table_line.

Do 5 times.
line-num = sy-index.
line-sqr = sy-index ** 2.
append line to itab.
enddo.

loop at itab into line.
write: / line-num, line-sqr.
endloop.
clear itab.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
821

Hello Hoo Laa,

This is because the way you have defined LINE, it is a structure & not a data type. Hence you are facing the issue

You have to change the data declaration to:

itab LIKE STANDARD TABLE OF line WITH KEY table_line.

BR,

Suhas

3 REPLIES 3
Read only

Former Member
0 Kudos
821

hi hoo la. this problem discussed so many times , kindly first search on SDN.

n e ways

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
822

Hello Hoo Laa,

This is because the way you have defined LINE, it is a structure & not a data type. Hence you are facing the issue

You have to change the data declaration to:

itab LIKE STANDARD TABLE OF line WITH KEY table_line.

BR,

Suhas

Read only

former_member217544
Active Contributor
0 Kudos
821

Please ignore

Edited by: Swarna Munukoti on Dec 3, 2009 10:14 AM