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: 

Internal tabel data collection

Former Member
0 Kudos
117

Hi all

i Have 2 internal table which contain same field ,i want to get one internal table to all the data ,how can do this with out looping,pls help me

Thanks

kanishka

8 REPLIES 8

Former Member
0 Kudos
84

Hi,

append lines of itab1 to itab2.

or

itab2[] = itab1[].

Regards

Amole

anversha_s
Active Contributor
0 Kudos
84

hi,

do this much.

litab1[] = itab2[].

rgds

anver

if hlped mark points

Former Member
0 Kudos
84

Hi Perera,

If ITAB1 and ITAB2 are your current tables and you want ot merger these two tables into third table ITAB_MERGE then try with this code.

DATA ITAB_MERGE TYPE ITAB1 OCCURS 0 WITH HEADER LINE.

<b>ITAB_MERGE[] = ITAB1[].

ITAB_MERGE[] = ITAB2[].</b>

Thanks,

Vinay

Former Member
0 Kudos
84

First IT - IT1

Second IT - IT2

New Tr IT -IT3.

it3[] = it1[].

  • and move second it2 using the move corresponding

Move corresponding it2 to it3.

Regards,

Nandha

Former Member
0 Kudos
84

Hi u can do that without looping.

suppose u have two internal tables named itab1 and itab2 with the same components.

then to join these two tables into one use

APPEND LINES of ITAB1 into ITAB.

Delete adjacent duplicates from itab comparing<fieldname>

it will work.

Reward me points if helpful

Regard

Manas Ranjan Panda

Former Member
0 Kudos
84

hi,

its simple and easy. it copies the body of itab2 to another internal table of same type itab1.

itab1[] = itab2[].

Regards,

Richa

Message was edited by: Richa Singh

Former Member
0 Kudos
84

Hi

Give like this.

Second internal table[] = first internal table[].

Regards

Haritha

Former Member
0 Kudos
84

Hello,

Case 1:

=======

APPEND ITAB1[] to ITAB2[].

Case 2:

=======

ITAB1[] = ITAB2[].

Case 3:

=======

ITAB_MER[] = ITAB1[].

ITAB_MER[] = ITAB2[].

Regs,

Venkat Ramanan N

Message was edited by: Venkat Ramanan Natarajan