What you want to do is go to the process overview.
Transaction SM66 shows all active processes of the current system. This is especially useful if you have multiple application servers.
SM50 will show you all the processes of the current application server on which you are logged in. To view available application servers, go to SM51.
From the process overview (in SM66), you can click on the process and click on the Debug button.
Similarly, from the SM50 you can select Administration -> Program -> Debugging from the menu to debug the program.
You can determine the process in which your program is executed from the details of an element in the process overview.
Another thing you might want to do if you can test your program with a limited data set is to run through runtime analysis (transaction SE30 or SAT on new systems). This will make it easier to identify bottlenecks during processing.
source share