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

Memory not getting refreshed

Former Member
0 Likes
1,442

Hi,

I have a small problem.

I have a internal table which store somewhere arnd 20K records and i monitor the memory usage in transaction SM04 which says it arnd 20MB usage.

After deleting 5K records from the internal table the memory should be released and shown in SM04 but it does not happen.

Please suggest how to clear the memory usage also after freeing up some records.

Thanks in advance,

Rajiv Kanoria

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,385

 deleting 5K records from the internal table the memory should be released 

Depends on, How u r deleting Records? --


CLEAR it_final --> will delete ITAB header line
REFRESH it_final or CLEAR it_final[] --> will delete ITAB body (appended records)
FREE it_final --> will release memory space

12 REPLIES 12
Read only

Former Member
0 Likes
1,386

 deleting 5K records from the internal table the memory should be released 

Depends on, How u r deleting Records? --


CLEAR it_final --> will delete ITAB header line
REFRESH it_final or CLEAR it_final[] --> will delete ITAB body (appended records)
FREE it_final --> will release memory space

Read only

0 Likes
1,385

I cannot use Free or Refresh as that would delete all the records.I jut want to delete some of them and want to free the memory associated with those records.

Read only

0 Likes
1,385

Hi,

I cannot use Free or Refresh as that would delete all the records.I jut want to delete some of them and want to free the memory associated with those records.

Please suggest in reference to this

Regards,

Rajiv Kanoria

Read only

0 Likes
1,385

Hi,

I cannot use Free or Refresh as that would delete all the records.I jut want to delete some of them and want to free the memory associated with those records.

Please suggest in reference to this

Regards,

Rajiv Kanoria

Read only

Former Member
0 Likes
1,385

Hi ,

IN SM04 You have an option to monitor the memory usage in depth .

Goto 'GOTO' menu and click on memory ... might be there you can get some memory reduced under some session but again getting increased in some other session.

Hope it is helpful.

Regards,

Uma

Read only

0 Likes
1,385

Hi,

I cannot use Free or Refresh as that would delete all the records.I jut want to delete some of them and want to free the memory associated with those records.

Please suggest in reference to this

Regards,

Rajiv Kanoria

Read only

0 Likes
1,385

Hi ,

Then do one thing.

eg : main_tab having 1lk records.

delete n number of records from main_tab , copy remaing in other table and free table main_table.

follow the same sequence for next deletion.

Regards,

Uma

Read only

Former Member
0 Likes
1,385

Don't know why you'd be concerned about the memory consumption of 5K records...far better to be sure your program is efficient so that the program is not a resource hog...then you don't have to worry about memory consumption of a mere 20K records...that's miniscule in SAP.

Read only

0 Likes
1,385

Hi,

This was just an example....Our record count goes upto 33 Million recordswith upto

500 MB memory usage...

Now what do we do..?

Rajiv

Read only

0 Likes
1,385

if possible, use SELECT with package size addition.

Read only

0 Likes
1,385

Hi,

Dats cannot be solution as our select queries are proress based.One table is accesed and on the basis of that further queris are decieded .So modifying the Select queries iis totally out of question.I was actually lookig out for some basis paremeter or FM on the basis side which helps me clear this memory

Rajiv Kanoria

Read only

0 Likes
1,385

Nothing is out of question by default, if memory consumption is too large, block processing must be investigated.

There is no system parameter for this purpose as far as I know, this question would belong into forum "netweaver administrator".

What you could test is that once you deleted rows from your internal table, memory consumption is not reduced, but it should not go up either when adding entries again until you have consumed more than what was deleted before (like a "peak hold", if you will).

Thomas

P.S. some background information: http://help.sap.com/abapdocu_70/en/ABENMEMORY_CONSUMPTION_1.htm