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.
- 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.
endwhile.
- 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

- Click on Administration-> Program -> Debugging.

- After confirming the pop-up you should see a debugger.
