Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

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

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 15, 2017 at 12:31 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 14, 2017 at 08:16 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded