Stopping the program executing in infinite loop dynamically

by Suresh Kumar Parvathaneni

Consider the following program:

REPORT ZSURESH_TEST.
data:
   w_Var type i value 5.

do.

  if w_var < 5.
     exit.
  endif.

w_var = w_var + 1.

enddo.


Upon execution of the program, the program goes into an endless loop.

In general, to stop this program executing in an endless loop, people would select the work processor in SM50 and select “Cancel with/without core”. Sometimes, this leaves the work processor in erroneous state.

The following is an alternative for this:

  • Goto SM50
  • Select the work processor executing this processor.
  • Select Program/Mode -> Program -> Debugging. Now the execution of the program would be opened in debug mode.
  • Change the value of the variable, w_Var in this case, causing the program executing in endless loop and click F8. Now the program execution would successfully be completed

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image