‎2007 Oct 27 10:50 AM
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.
‎2007 Oct 27 11:02 AM
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
‎2007 Oct 27 11:16 AM
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.
‎2007 Oct 27 5:08 PM
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
‎2007 Oct 27 5:28 PM
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