How to check status of a running program
Asked Answered
K

3

6

I assume that I have an ABAP program that takes long time on running. So I want to check what the program is doing at the moment, which line of code is executing or what tables the program is writing to at that exact moment.

I think there is a transaction to check the running programs. Am I right ? If I'm what is that ?

Keratin answered 23/5, 2013 at 12:4 Comment(0)
C
13

What you want to do is go to the process overview.

Transaction SM66 shows you all active processes of the current system. This is especially helpful if you have more than one application server.

SM50 will show you all processes of the current application server where you are logged on. To view the available application servers, go to SM51.

From the process overview (in SM66) you can click on the process and click the "Debugging" button.

Similarly, from SM50, you can choose Administration -> Program -> Debugging from the menu to debug the program.

You can identify the process in which your program is executing from the detail on the item in the process overview.

Another thing you might want to do, if you are able to test your program with a limited set of data, is run it through runtime analysis (transaction SE30, or SAT in newer systems). This will allow you to identify bottlenecks in processing more easily.

Commandment answered 23/5, 2013 at 12:56 Comment(2)
Debugging should be used with caution if the program is doing DB updates. The debugger performs COMMIT WORKs at unpredictable times, which could cause inconsistencies if the program relies on well defined units of work.Crabtree
The new debugger is supposed to be better in that regard, and should not be doing unpredictable commits, however caution is always well advised. Transaction SE30/SAT are very useful non-invasive transactions if you are concerned about performance.Hospitalize
D
3

You can check the status of an ABAP process on a rather limited scale using the SM50 overview. If the program is running in a background process (and you have the appropriate permissions), you can debug the background job from transaction SM37.

Derivation answered 23/5, 2013 at 12:54 Comment(0)
C
2

If the DB accesses in particular are your concern, you can use transaction ST05 to start a SQL Trace. When you display the trace, it will show you the SQL statements executed and provide some info on them, such as how long it took, how many records were returned, and what indexes were used. It also allows you to see where the statement was called in the source.

ST05 is a system-wide trace, but you can filter the trace by username/transaction/program/table to narrow down the results. Also note that only one trace can be running the the system at a time, so be sure to turn it off when you're done so that the next person can use it.

Crabtree answered 23/5, 2013 at 16:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.