09-30-2008 12:28 PM
Hi All,
I have a requirement where I need to optimize a report program. Here, the program is giving short dump " TSV_TNEW_BLOCKS_NO_ROLL_MEMORY" and terminating t the following line because the internal table could not be extended".
Following is the "for all entries" select code where I am getting the dump that internal table 'it_qmel' cannot be extended more.
if idtl is not initial.
select aufnr matnr serialnr into table it_qmel
from qmel
for all entries in idtl
where matnr eq idtl-matnr and
serialnr in s_sernr.
sort it_qmel by aufnr.
delete adjacent duplicates from it_qmel.
endif.
Could someone please suggest me, how to optimize the above code so that it uses less memory.
Please help, I need this urgently.
Thanks,
Vishal.
09-30-2008 12:33 PM
Hi
Can you pls show, how you have declared it_qmel internal table
Regards
MD
09-30-2008 12:37 PM
Following is the declaration of internal table, which I have used.
types: begin of fs_qmel,
aufnr type qmel-aufnr,
matnr type qmel-matnr,
serialnr type qmel-serialnr,
end of fs_qmel.
data: wa_qmel type fs_qmel,
it_qmel type table of fs_qmel with header line.
09-30-2008 12:42 PM
How many entries in idtl? How many matching entries in the table qmel?
Sometimes you simply can't select all the data you want. In those cases, you have to define a smaller selection.
09-30-2008 12:44 PM
Hi
Actually i am offline
Is all the primary keys taken in where condition of qmel
If not create a range and pass, it may improve the perfomance
Regards
MD
09-30-2008 12:44 PM
The dump analysis says that:
"No roll storage space of length 1928208 available for internal storage."
I need this report to run for around 7000 to 8000 records.
09-30-2008 12:44 PM
not a big structure...the problem is probably somewhere else, it's only that memory runs out at that very point.
What other big internal tables are you filling in your program? Depends on the box, but for such an error you probably have 1 GB of memory space occupied with your program. See if you can FREE tables that are not used any more, or implement block processing: read a chunk, process, clear tables, read next chunk, etc.
Thomas
09-30-2008 12:47 PM
Will you divide the data into two internal tables and later collect into the one internal table
09-30-2008 12:49 PM
You might be getting this error due to huge size of data.
You can use PACKAGE SIZE keyword in the select query to select smaller amount of data and process them.
10-03-2008 12:46 PM