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

Memory analysis for background job

Former Member
0 Likes
2,917

Hi,

I have a report which when run as background job, gives a runtime dump due to memory overflow.

It seems the there is some internal table having many entries hence consuming ABAP memory, but we could not find which one.

Simillar to runtime analysis (SE30), is there any tool to monitor the memory consumption according to internal tables? I had heard of some "memory inspector" simillar to code inspector, how to use it?

we tried analysing memory space taken by internal tables during debugging, but it runs for very long period, and has many internal tables, so, it is taking long to analyse.

Please suggest some tool to monitor the memory consumption while the report is running in background.

1 ACCEPTED SOLUTION
Read only

HermannGahm
Product and Topic Expert
Product and Topic Expert
0 Likes
1,427

Hi,

Is it your own code? If so: in your batch job you can create memory snapshots with the following method call.

CL_ABAP_MEMORY_UTILITIES=>WRITE_MEMORY_CONSUMPTION_FILE( ).

Make sure that you don't call this method in a loop. Only make single calls at important

POI (points of interest). E.g. after selection... ... . Each call will write a file to the application

server that can be analyzed with transation S_MEMORY_INSPECTOR.

If it is SAP standard code you can use the debugger and create snapshots with the Services of

the Memory Analysis tool. These can be analyzed with S_MEMOY_INSPECTOR as well.

Kind regards,

Hermann

Hi,

Is it your own code? If so: in your batch job you can create memory snapshots with the following method call.

CL_ABAP_MEMORY_UTILITIES=>WRITE_MEMORY_CONSUMPTION_FILE( ).

Make sure that you don't call this method in a loop. Only make single calls at important

POI (points of interest). E.g. after selection... ... . Each call will write a file to the application

server that can be analyzed with transation S_MEMORY_INSPECTOR.

If it is SAP standard code you can use the debugger and create snapshots with the Services of

the Memory Analysis tool. These can be analyzed with S_MEMOY_INSPECTOR as well.

Kind regards,

Hermann

3 REPLIES 3
Read only

Former Member
0 Likes
1,427

hi

It might would happened due to a loop which might have gone into infinite loop ......

so if u are looping into a internal table just loop it properly and go for debugging at every point you are

looping at.you will find where it is going into dump.

thanks

Read only

gaursri
Active Contributor
0 Likes
1,427

Hi Chinmay,

The tcode for memory analysis is S_MEMORY_INSPECTOR.You can logon to this tcode.I think it might help you to solve your query.

Have a best day ahead.

Read only

HermannGahm
Product and Topic Expert
Product and Topic Expert
0 Likes
1,428

Hi,

Is it your own code? If so: in your batch job you can create memory snapshots with the following method call.

CL_ABAP_MEMORY_UTILITIES=>WRITE_MEMORY_CONSUMPTION_FILE( ).

Make sure that you don't call this method in a loop. Only make single calls at important

POI (points of interest). E.g. after selection... ... . Each call will write a file to the application

server that can be analyzed with transation S_MEMORY_INSPECTOR.

If it is SAP standard code you can use the debugger and create snapshots with the Services of

the Memory Analysis tool. These can be analyzed with S_MEMOY_INSPECTOR as well.

Kind regards,

Hermann