Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7126649
  • 博文数量: 655
  • 博客积分: 10264
  • 博客等级: 上将
  • 技术积分: 8278
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-04 17:47
个人简介

ABAP顾问

文章分类

全部博文(655)

文章存档

2017年(2)

2014年(8)

2013年(3)

2012年(2)

2011年(18)

2010年(102)

2009年(137)

2008年(274)

2007年(134)

分类:

2008-01-21 21:14:13

SM50可以Debug后台程序
 
JOB Debug Method
1.In SM37, select a job that has not yet been started (status 'planned' or 'released'). In addition, set a breakpoint at the point in the source code that you want to analyze when debugging. In SM37, enter "JDBG" in the OK code field, and select ENTER. The selected job is now started in debug mode, and the debugger initially stops in a system program. Select F8 to continue the job up to the next breakpoint.
Caution: After debugging, the job still appears in SM37 as 'planned' or 'released', but the entire job (or, more specifically, a copy of it) ran during debugging, and possible database changes are effective as a result of the job.
 
2.You can catch a current batch job by using SM37 (Catch active job) or SM50 (Debug program). To do this, you must be logged on to the instance on which the job is running. The job is then stopped, and you can keep it running in the debugger.
 
3.Use SM36 to create a job with two steps, step 1 with the BTCLOOP report and step 2 with the report to be debugged. Then release the job.
You can then debug the job in Transaction SM50. To do this, exit the endless loop in the BTCLOOP report by changing the variable I.
 
 
PROGRAM BTCLOOP MESSAGE-ID BT. "470
DATA:
  I TYPE I.
  I = 0.
  DO.
    if i ne 0.
       exit.
    endif.
  ENDDO.
注:有的系统Report BTCLOOP跟这段代码不同,不好跳出来
阅读(5423) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~