Scenario – A program has to be run in background or a routine is called when an inbound idoc is getting processed through proxy. A normal debugger doesn’t work in such scenarios. An easy solution to directly hit the code is to use an infinite loop.
DATA: var TYPE i VALUE 1 .
DO.
IF var NE 1 .
exit.
ENDIF.
ENDDO.
To come out of the infinite loop, you can easily change the value of var in debugger or just goto the first statement after loop. Works all the time.
Always remove the code after testing/debugging else there will be a mountain of issues once the code moves anywhere near quality or production landscapes.
~S
1 Pingback