Skip to Content
0

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

Jul 14, 2017 at 07:52 PM

113

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Jul 17, 2017 at 09:35 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Jul 15, 2017 at 12:31 PM
2

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

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Jul 14, 2017 at 08:16 PM
1

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.

Share
10 |10000 characters needed characters left characters exceeded