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

itab difference

Former Member
0 Likes
299

I have a main itab and it contains some values....in second itab i am puting some of the first itab fields....in the 3rd itab if i want the fields that are not in second itab then what code shld i use

1 REPLY 1
Read only

Former Member
0 Likes
282

Hi darshini,

If you are talking about FIELDS, it is completely in your hand how you define your itabs.

for example:

data: begin of itab1 occurs 0,
          field1(10),
          field2(12),
          field3(34),
          field4(54),
        end of itab1.

data: begin of itab2 occurs 0,
          field1(10),
          field2(12),
        end of itab2.

data: begin of itab3 occurs 0,
          field3(34),
          field4(54),
        end of itab1.

* If itab1 has some records.

loop at itab1.
move-corresponding itab1 to itab2.
move-corresponding itab1 to itab3.

append itab2.
append itab3.
clear itab2.
clear itab3.
endloop.

* Now you will have the values in itab2 and itab3.

Regards,

Ravi