So, what I do, is use this simple bit of code:
data: a, b.
a = 'X'.
do.
if a = b.
exit.
endif.
enddo.
Which, as you can probably tell, sets the program into an infinite loop, which can only be interrupted by debugging.
This is done in transaction SM51 - find the session with ( your / system ) name on it, and hit Program-Debug from the menu
At this point, you can then clear out the "a" variable, which then means that a = b, and so the loop gets exited. You can then debug through the background process.
There are other ways of doing it, but I've found this one to be the simplest and most reliable.
Don't forget to take it out again once you're finished, otherwise you'll paralyse the backend!
tcode is sm50
ReplyDelete