Today I want to show you a simple way to debug a batch job. Sometimes you just want to debug some process witch default runs in batch. Everything looks simple but you should notice that breakpoints sometimes don’t work in these cases. The situation can be even worst when your job runs only a few seconds.

  1. First of all if your job works for a short time, you just should keep him working for a while. To do this you just can create an infinitive loop. So just go to your code and in property place paste:
data: lv_wait.
while lv_wait <> 1.
  1. Now go to transaction sm50, click on „ALL work process” and then select your process. Remember that your background process could run on one of many application servers
  1. Click on Administration-> Program -> Debugging.
  1. After confirming the pop-up you should see a debugger.