About ABAP Debugger

Frequently Asked Questions

How do I debug background Processes?

In transaction SM50 (process overview), you can select a background process and choose Program/Mode -> Program -> Debugging from the menu.

An alternative workaround, which allows you to step into a particular piece of code is to place a piece of code in a endless DO-ENDDO, where you can change a variable to step out of the DO at a particular point in your code. This allows you to hold the process at that point and debug it from SM50 as described above. An implementation of this exists in function module C160_HOLD_FOR_DEBUG, which will enter the endless loop if a particular environment variable is set, thereby allowing you to control its behaviour. (Further instructions are found in the comments in subroutine INC14Z_HOLD_FOR_DEBUG of include LC14ZFCB).

How do I debug completed background process?

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 and sy-batch set to 'X'.

  • Use SM37 to get list of jobs , type 'JDBG' in the command line ( no '/' ), put the cursor on the job and press ENTER
  • You are in debug mode now. Step through SAP program (press F7 couple of times) until you get to code you need.
How do I debug remote function calls?

You can use the same techniques as described in HOME:#How do I debug background Processes? above.

How do I debug Updates/System code?

Both options are available from the menu in debugging. Choose Settings -> System/Update Debugging to activate either before proceeding.

Why does it give a dump when I put a break-point in between SELECT and ENDSELECT?

A breakpoint in SELECT loops can cause an exception through loss of the database cursor. The reason for this is that during debugging a database commit is triggered and hence the cursor is lost.

How do I set breakpoints in modal dialogs?

There are two similar approaches to set breakpoints in modal dialogs:

Approach 1:

  • Click on the Create shortcut icon on the toolbar.
  • In the popup window choose "System command" and in the command enter "/h"
  • A shortcut on the desktop would be created
  • Drag and drop the shortcut to the modal window to set debugging on.

Approach 2:

  • Create a txt file on the desktop with the following lines:
    [HOME:FUNCTION]
    Command=/H
    Title=Debugger
    Type=SystemCommand
  • Drag and drop this file to the modal window to set debugging on.
How do I switch between the Classic and New Debugger?
  • From within the ABAP workbench, select the Utilities->Settings Menu
  • Select the ABAP Editor Tab
  • Select the Debugging tab within the ABAP Editor Tab
  • Select the Classic Debugger or New Debugger radio button

Where can I find more documentation?

Follow this link for the official documentation

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值