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: 

Is there any way to check Memory usage in debug mode?

Former Member
0 Kudos

Hello Experts,

I would like to know whether there is any way to get SAP system usage details like free memory/ %usage etc. during debug mode.

If free memory is less than 60% then I need to restrict the execution of my program.

Regards,

Onkar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

We can use below FMs to get the memory/CPU usage at run-time.

GET_MEM_ALL

GET_CPU_ALL

Reference: FM FILL_SNAPSHOT_DATA.

3 REPLIES 3

Sandra_Rossi
Active Contributor

The management of memory is much more complex than "60% of available memory" (mode, extended memory, etc.) Probably someone who doesn't know how SAP works asked you that. I'm not aware of any program which does this kind of test. Before checking the memory, you must make sure whether your program is correctly written to consume the minimum amount of memory. During the debug, you can see the memory consumed to see which data objects are the top consumers (add/replace tool -> memory management -> choose the tool you want), then you correct the code to consume less memory. Only in rare situations we use methods of the class CL_ABAP_MEMORY_UTILITIES.

horst_keller
Product and Topic Expert
Product and Topic Expert

There's also transaction S_MEMORY_INSPECTOR. And of course the full tool set of memory management. Google for BC-CST-MM.

Former Member
0 Kudos

We can use below FMs to get the memory/CPU usage at run-time.

GET_MEM_ALL

GET_CPU_ALL

Reference: FM FILL_SNAPSHOT_DATA.