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 when move the itab

Former Member
0 Likes
465

Hi,

I am facing an error that it is not a internal table or structure when moving an itab to itab1 using the code

data: begin of it occurs 0,

.

end of it.

data : itab like it occurs 0 with header line.

data : begin of itab1 occurs 0,

.

end of itab1.

loop at itab.

Move-corresponding itab to itab1.

endloop.

so help me to solve this issue.

Thanks,

Deesanth

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
444

I just used your code and it is working fine in my system.

data: begin of it occurs 0,

test TYPE char4,

end of it.

data : itab like it occurs 0 with header line.

data : begin of itab1 occurs 0,

test TYPE char4,

test1 TYPE char5,

end of itab1.

itab-test = 'abcd'.

APPEND itab.

loop at itab.

Move-corresponding itab to itab1.

APPEND itab1.

endloop.

WRITE itab1.

Regards,

Atish

3 REPLIES 3
Read only

gopi_narendra
Active Contributor
0 Likes
444

See the changes with comments

data: begin of it occurs 0 with header line, " include header line here
.
end of it.

data : begin of itab1 occurs 0,
.
end of itab1.


loop at it. " change itab to it

Move-corresponding it to itab1.

endloop.

Regards

Gopi

Read only

Former Member
0 Likes
444

Hi Deesanth,

You should not get that error. there must be something wrong in your code.

Please paste your whole code here.

Regards,

Atish

Read only

Former Member
0 Likes
445

I just used your code and it is working fine in my system.

data: begin of it occurs 0,

test TYPE char4,

end of it.

data : itab like it occurs 0 with header line.

data : begin of itab1 occurs 0,

test TYPE char4,

test1 TYPE char5,

end of itab1.

itab-test = 'abcd'.

APPEND itab.

loop at itab.

Move-corresponding itab to itab1.

APPEND itab1.

endloop.

WRITE itab1.

Regards,

Atish