‎2007 Apr 25 3:36 AM
Hi All,
I have an internal table with 14,00000 records .Iam using sort statement on this internal table . Iam getting short dump as " loss of memory for external sort" . How can i avoid this dump?
‎2007 Apr 25 3:49 AM
if possible...declare it as a sorted table....so tht u need not sort it using SORT stmnt....
regards,
naveen.
‎2007 Apr 25 3:49 AM
if possible...declare it as a sorted table....so tht u need not sort it using SORT stmnt....
regards,
naveen.
‎2007 Apr 25 4:00 AM
Hi,
As the post above, try to use SORTED tables so you can avoid the SORT statement.
Here is an example of using SORT statement and using SORTED tables:
Using SORT statement:
DATA: gt_vbak type standard table of vbak,
wa_vbak like line of vbak.
select *
from vbak
into table gt_vbak.
sort gt_vbak by vbeln ascending.
loop at gt_vbak into wa_vbak.
write: / wa_vbak-vbeln.
endloop.
Using SORTED table:
data: gt_vbak type sorted table of vbak
with unique-key vbeln,
wa_vbak like line of gt_vbak.
select *
from vbak
into table gt_vbak.
loop at gt_vbak into wa_vbak.
write: / wa_vbak-vbeln.
endloop.
Hope it helps...
P.S. Please award points if it helps...
‎2007 Apr 25 4:03 AM
otherwise declare a new sorted internal table of the same structure and assign the first table to sorted table....
ex:
DATA: it_tab TYPE TABLE OF ekko WITH HEADER LINE,
it_tabsort TYPE SORTED TABLE OF ekko WITH UNIQUE KEY ebeln.
SELECT * FROM ekko INTO TABLE it_tab.
it_tabsort[] = it_tab[].
it_tab[] = it_tabsort[]. "Assign back if necessary
hope this helps.....
this wud wrk in split of a second..as i had tried with 35000 odd records.....
Regards,
Naveen Natarajan