How to achieve conditional break point in your ABAP program
Background
有不同的同事問(wèn)我這個(gè)問(wèn)題:例如LOOP要執(zhí)行1000次,我只對(duì)其中的某一次比如第501次循環(huán)感興趣,我肯定不可能按500次F5.或者我只對(duì) LOOP里某個(gè)變量為某一個(gè)具體值的那一次循環(huán)感興趣。如果避免重復(fù)按F5, 而是讓斷點(diǎn)直接停在我想停的condition上面?
其實(shí)有三種方法實(shí)現(xiàn)。
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:
要獲取更多Jerry的原創(chuàng)文章,請(qǐng)關(guān)注公眾號(hào)"汪子熙":總結(jié)
以上是生活随笔為你收集整理的How to achieve conditional break point in your ABAP program的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 新电脑怎么设置pin(新総合物流センター
- 下一篇: docker:latest和docker