
Use the Memory Inspector to analyze the memory usage of an ABAP program. Typically, you use the Memory Inspector when you want to find out the following:
The Memory Inspector transaction is the ideal tool for comparing memory snapshots, looking for memory leaks, and verifying the correct memory usage of your application.
Collect memory snapshots from the application at different points in time. You can then see in comparison exactly where and how memory usage changed.
You can also create and compare memory snapshots — also for later analysis — while you are debugging a program.
Here is documentation on the Memory Inspector in the new ABAP Debugger.
There are two tools for scanning for high memory consumers:
Use SM04 to monitor long-running transactions that stay open for repeated use and to monitor the memory consumption of long-running background jobs.
The selection option Show all records, grouped by business transaction may help you by organizing the display by transaction. The column Memory used (kB) shows the maximum memory used by a transaction in each dialog step.
Use STAD when you have had memory-related short dumps such as SYSTEM_NO_ROLL or TSV_TNEW_PAGE_ALLOC_FAILED or when you have observed Dialog work processes in PRIV status. The statistic records in the time immediately preceding these events may show which programs were consuming too much storage.
The lessons:
Check transactions that stay open and are used repeatedly for operation after operation. Check reports that run in background jobs and which may be expected to run for hours or even days.