11-07-2014 4:15 PM
Hi,
I know that Refresh or clear deletes the content of an internal table but memory allocation remains.So we can use that same internal table in another purpose.
Whereas I studied that Free deallocates the memory and the internal table cannot be used after we freed the internal table using Free:Itab. But I used the internal table(filled the internal table with data) after the free syntax. It doesn't show any error or dump.
Can anyone please explain what's the difference between Free,Refresh,clear?
Regards,
Arjun
11-08-2014 7:46 AM
arjun mohan wrote:
Whereas I studied that Free deallocates the memory and the internal table cannot be used after we freed the internal table using Free:Itab.
I don't know where you read this, but it's incorrect. You can use an internal table after FREE.
To all intents and purposes, except for tables with header lines, which I hope no-one uses too much any more, CLEAR, FREE and REFRESH do the same thing. I've never had to worry about it, and I write memory intensive programs.
11-07-2014 4:35 PM
Hi arjun ,
Question is bit funny , system re allocate the memory again when it found any command related to internal table even after free statement is used already.
Regards,
Venkat.
11-07-2014 4:47 PM
Hi Arjun,
i hope this way you can understand better..
before clear statement:-
After clear: -
after Free:-
again allocate :-
With regards
Vikas
11-08-2014 5:30 AM
Hi Vikas,
Thanks for your answer.I understood from above suggestion is that with clear table body memory is released .With free initial memory requirement for the table will also be released.
But I want to know How (Memory Allocated )312 becomes 160 after free statement?And how this memory allocated is calculated and memory actually used is calcuated?
Can u please explain in detailed manner?
Regards,
Bharadwaj
11-08-2014 5:32 AM
Hi Vikas,
Thanks for your answer.I understood from above suggestion is that with clear table body memory is released .With free initial memory requirement for the table will also be released.
But I want to know How (Memory Allocated )312 becomes 160 after free statement?And how this memory allocated is calculated and memory actually used is calcuated?
Can u please explain in detailed manner?
Regards,
Arjun
11-08-2014 7:46 AM
arjun mohan wrote:
Whereas I studied that Free deallocates the memory and the internal table cannot be used after we freed the internal table using Free:Itab.
I don't know where you read this, but it's incorrect. You can use an internal table after FREE.
To all intents and purposes, except for tables with header lines, which I hope no-one uses too much any more, CLEAR, FREE and REFRESH do the same thing. I've never had to worry about it, and I write memory intensive programs.