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

split internal table

Former Member
0 Likes
711

hello experts ,

in my internal table i have records like this ..

code detail

-


1000 abcd

1000 abcd

1000 abcd

1001 abcd

1001 abcd

1001 abcd

1002 abcd

1002 abcd

1003 abcd

i want to split the internal table by its code .

it mean<b> for 1000 in it1

for 1001 in it2

for 1002 in it3 </b> .......

is it possibe ? and how?

help me on this.

points will be rewarded..

thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
591

Hi Rajan,

It is possible....and simple only.

But tell me why you want to do like so.....using too many internal table will lead performance issue as it takes lot of buffer memory.

any the code is as follows,

loop at itab where code = '1000'.

it1 = itab.

append it.

clear it.

endloop.

like this you have to do for all the code values

Read only

Former Member
0 Likes
591

Hi Rajan,

loop at itab into wa1.

no = no + 1.

at new.

loop at itab into wa2 where key = wa1.

append itab wa2 to it(no).

endloop.

endat.

try this code with neccesary data declarations.

reward if useful.

Read only

Former Member
0 Likes
591

Hi,

You can do it using AT new code..

but if the code ranged from 1000 to 2000, you will require 1000 internal tables..

why do you require this??

regards,

sheron

Read only

Former Member
0 Likes
591

use AT NEW code.

Note : u <b>must</b> use <b>sorting</b> if the table is not already in sorted format..

<b>SORT ITAB BY CODE.</b>

Reward points if it is useful.

Thanks & Regards

ilesh 24x7