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

Local Data in subroutine (memory released?)

krishg
Active Participant
0 Likes
561

We are running into Memory failure and was wondering about the memory used by internal tables defined locally in subroutine? Meaning the memory allocated to internal tables defined locally in subroutine freed up after the subroutine is executed ? or do we have to explicitly release the locally defined internal tables in subroutine?

1 ACCEPTED SOLUTION
Read only

anup_deshmukh4
Active Contributor
0 Likes
484

Hello Krish ,

You don't have to explicitly free it . To my understaning your memory failure is due to huge amount of Data selection  In the internal table  iff your error is like 'Memory Allocation failed' .

This is case only for Local data in the subroutine.

But it has many Variations take a look at below link .

http://help.sap.com/saphelp_470/helpdata/en/9f/db978335c111d1829f0000e829fbfe/frameset.htm

http://scn.sap.com/thread/790282

Hope this helps,

Anup Deshmukh

2 REPLIES 2
Read only

Former Member
0 Likes
484

It gets freed automatically. No need to free it explicitly.

Read only

anup_deshmukh4
Active Contributor
0 Likes
485

Hello Krish ,

You don't have to explicitly free it . To my understaning your memory failure is due to huge amount of Data selection  In the internal table  iff your error is like 'Memory Allocation failed' .

This is case only for Local data in the subroutine.

But it has many Variations take a look at below link .

http://help.sap.com/saphelp_470/helpdata/en/9f/db978335c111d1829f0000e829fbfe/frameset.htm

http://scn.sap.com/thread/790282

Hope this helps,

Anup Deshmukh