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: 

Moving few contents of one internal table to another internal table

Former Member
0 Kudos

Hi

I want to move some contents of one internal table to another internal table, which records match our condition

(without loop)

Example:

1 aa

2 aa

3 aa

4 bb

5 cc

6 aa

7 cc

8 dd

now i want to move records which contain aa to one internal table without using loop.

is there any statemnt to achieve this

Reagrds

Srinivasu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Srinivasu,

Just create an another internal table say itab2 having the same structure.

Then use the following code:

itab2[] = itab1[]

delete itab2 where field2 <> 'aa'.

Hope this will help.

Regards,

Nitin.

Edited by: Nitin Karamchandani on Nov 21, 2008 8:51 AM

2 REPLIES 2

Former Member
0 Kudos

Hello


itab2[] = itab1[].
delete itab2 where field2 NE 'aa'.

Former Member
0 Kudos

Hi Srinivasu,

Just create an another internal table say itab2 having the same structure.

Then use the following code:

itab2[] = itab1[]

delete itab2 where field2 <> 'aa'.

Hope this will help.

Regards,

Nitin.

Edited by: Nitin Karamchandani on Nov 21, 2008 8:51 AM