2005 Oct 21 6:21 AM
Hi every body,
I did a program which user nearly 10 itabs.
Is it necessary to use
<b>FREE ITAB.</b>
for all of these itabs.
what is the actual advantange of using this?
IF not what wud happen any performance decline?
At what time can i apply this statement?
IF i use this statement as a last statement it wud be better?
this is a kind of performance issue , Plz help me...
<b>your help appreciated.</b>
RAJA.
2005 Oct 21 6:35 AM
Hi Andreas,
PLZ <b>answer</b> to the following.
So that <b>i will be pretty clear</b>.
what is the actual advantange of using this?
IF not what wud happen any performance decline?
At what time can i apply this statement?
IF i use this statement as a last statement it wud be better?
2005 Oct 21 6:24 AM
hi,
Free ITab, delete the internal table from the memory itself, mostly its not needed
Use Refresh Itab
Clear Itab.
that is enough even you have any no of internal table
cheers,
sasi
2005 Oct 21 6:27 AM
Hi Raja,
Please take a look at this page for the usage:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb384e358411d1829f0000e829fbfe/content.htm
Regards,
Ville
2005 Oct 21 6:28 AM
Hi sasikumar,
thanks for ur reply.
it wud be good once u go thru my message and clear all my doubts.
see....
after usage of itabs ..if they contain lot of data..?
is it necessary to free itab.
clear itab won't clears it from memory know?
2005 Oct 21 6:30 AM
Hi Raja,
clear itab will initialize your internal table.
free itab will release the memory.
Regards,
Ville
2005 Oct 21 6:35 AM
hi,
clear itab - clears only header line
refresh itab- clears body of the internal table
Free itab - clears a internal table from memory
Refresh itab and clear itab is enough i guess
the below points are provided by sap
You can use FREE to initialize an internal table and release its memory space without first using the REFRESH or CLEAR statement. Like REFRESH, FREE works on the table body, not on the table work area. After a FREE statement, you can address the internal table again. It still occupies the amount of memory required for its header (currently 256 bytes). When you refill the table, the system has to allocate new memory space to the lines.
2005 Oct 21 6:30 AM
Hi Raja,
one example is , you've a big itab and move it to another tab to collect or extract it.
When filling of 2nd tab is finished , you can free 1st itab to improve performance.
regards Andreas
2005 Oct 21 6:35 AM
Hi Andreas,
PLZ <b>answer</b> to the following.
So that <b>i will be pretty clear</b>.
what is the actual advantange of using this?
IF not what wud happen any performance decline?
At what time can i apply this statement?
IF i use this statement as a last statement it wud be better?
2005 Oct 21 6:44 AM
when u talk of the performance issue, the performance of the program as such will not be affected. Only thing is that if you free the memory allocated to this internal table, the memory could be allocated to another program or another data object in the same program.
normally the memory used by a program is freed automatically as soon as the program finishes execution so use it if you want to handle memory management on your own.
it is normally a gud practice to clear tables and data variables (and free the memory) once the program has to be exited. so as you say, it should be done at the end of the program execution.
rgds,
PJ
2005 Oct 21 6:47 AM
> Hi Andreas,
> PLZ <b>answer</b> to the following.
> So that <b>i will be pretty clear</b>.
>
> what is the actual advantange of using this?
This will free up system memory. The advantage of doing this is that less system memory is used unnecessarily. Generally speaking, if you refresh your table when you no longer need it, it will usually suffice.
> IF not what wud happen any performance decline?
Not really unless you are running a very very big program that loops through large tables.
> At what time can i apply this statement?
apply the FREE statement whenever you are done with the table. See my earlier post about declaring a local internal table. I believe this is the best way to utilise memory resources
> IF i use this statement as a last statement it wud be
> better?
if you called the FREE statement at the very end of the program you will gain no increase in performance as the system is already finished all it's processing and is about the exit the program (and thus FREE the internal tables)!
Hope this answers your questions.
Cheers,
Pat.
2005 Oct 21 6:42 AM
Raja,
Just to throw in my $0.02...
As everyone here is saying, FREE ITAB will release the memory the table is holding.
REFRESH ITAB will clear up the ocntents but the table definition is still in memory.
CLEAR ITAB will only clear the header line of the internal table. CLEAR ITAB[] does the same thing as REFRESH ITAB.
Technically, it is better practice to use the FREE ITAB command whenever possible as it will maximise system resources.
One way to do this automatically is to declare local internal tables. To do this simply define your internal table within the subroutine. When the progam jumps out of the subroutine, the internal table is automatically freed.
Hope this helps.
Cheers,
Pat.
PS. Kindly assign Reward Points to the posts you find helpful.
2005 Oct 21 6:53 AM
Patrick,
Thank u very much for your patience and kindful answers.
I rewarded your help which is eqivalent to 0.02$...
Just joking.
Thank u very much once again.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |