Application Development 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: 

Free key word Function

Former Member
0 Kudos

hi experts,

i am confusing with free key word usage.

right now i have not used FREE in my abap programs.

i read documentation it is saying

FREE:-Releases the memory space needed to process the internal table itab.

My doubt is why i need to Release the internal table memory. if i am not using what is the problem.

Please help me

1 ACCEPTED SOLUTION

Former Member
0 Kudos

When you execute a program it occupies certain memory space on apllication server . If your internal tables are huge ( large no of rows ) and you do not need them further in your program it is good to use Free itab so that memory is released and can be used by other programs ( this will increase the performance of your application server ). Otherwise this memory is only freed up when your program ends. If your internal table is expected to have not many rows then free itab does not have much significance.

Cheers.

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

FREE is used to free up the memory space of an internal table. You can use the keyword REFRESH also. This will clear the internal table. When processing large amounts of data with a lot of internal tables, it could be a good idea to FREE the interal tables when they are no longer being used. If you don't, you could have some memory issues.

Regards,

Rich Heilman

former_member225448
Participant
0 Kudos

Hello Ramesh,

the difference between CLEAR table[] and FREE table is:

CLEAR only markes the memory space allocted by table before as empty.

FREE deallocates the memory.

If you find my answer useful, please don't forget the reward.

Regards,

Juergen

Former Member
0 Kudos

When you execute a program it occupies certain memory space on apllication server . If your internal tables are huge ( large no of rows ) and you do not need them further in your program it is good to use Free itab so that memory is released and can be used by other programs ( this will increase the performance of your application server ). Otherwise this memory is only freed up when your program ends. If your internal table is expected to have not many rows then free itab does not have much significance.

Cheers.