Debug background job

本文介绍如何在SAP环境中调试已完成执行的批处理作业。通过使用交易代码JDBG,可以模拟批处理作业的后台运行场景,并设置断点进行详细调试。此外,还提供了创建背景变体、执行后台调试程序等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

You can debug batch jobs by going to 'SM37', type in 'JDBG' in the
command line ( no '/' ), put the cursor on the job and press enter - will
take you to the job in debug mode.

You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job also sy-batch will set to 'X'.

So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.

Steps
1. Create variant called BACKGROUND for program to be debugged.
2. Execute ZDEBUGBG (pgm code below) in background for immediate processing.
3. Execute transaction SM50.
4. Select process that runs ZDEBUGBG.
5. Goto 'Program/Session' 'Program' 'Debugging'.
A se80 debug session will open.
6. Change variable W_EXIT to 'E'.
7. Step thru (F6) until ZWBTEST comes up.

1. Go to Transaction SM66 and find your work porocess.
Select the line work process is on and click on the Debugging button.
If this is a custom program, you can put a wait statement in the code to buy yourself sometime.

2. Go to Transaction SM50. From the tool bar "Program/session"->Program->Debugging.

goto SM37 and from Program menu(not sure.. try other menu's)
-->Catchjob . it will goto the active job in debugging mode.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值