前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >How to achieve conditional break point in your ABAP program

How to achieve conditional break point in your ABAP program

作者头像
Jerry Wang
发布2019-08-23 14:41:55
3740
发布2019-08-23 14:41:55
举报

Background

有不同的同事问我这个问题:例如LOOP要执行1000次,我只对其中的某一次比如第501次循环感兴趣,我肯定不可能按500次F5.或者我只对 LOOP里某个变量为某一个具体值的那一次循环感兴趣。如果避免重复按F5, 而是让断点直接停在我想停的condition上面?

其实有三种方法实现。 Line 15 will be executed 1000 times. And we are only interested with a given iteration, for example we want to ONLY stop at line 15 with condition = 22.

Approach1 - Source code breakpoint in ABAP debugger

Create a new breakpoint in debugger dynamically:

Maintain your condition as below:

Then F8 to continue, the break point is triggered only once when = 22.

Approach2 - Watchpoint

Then:

Approach3 - ABAP debugger script

Create a new debugger script:

Click “Script Wizard”->“Variable Value(for Simple Variable)”:

The wizard will generate code automatically for you ( marked with red ). You can finish the left code to achieve conditional break( marked with blank ). Save your script with a name.

Now launch your program, load the saved Script:

Then click Start Script:

Break point is triggered only once:

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年08月22日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Approach1 - Source code breakpoint in ABAP debugger
  • Approach2 - Watchpoint
  • Approach3 - ABAP debugger script
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档