Stumbled Upon Checkpoint Groups
I stumbled upon the concept of Checkpoint groups by accident.
One day I was debugging a wave release process in EWM box by activating /h debugging and jumping around using F5, F6, F7 keys. It was getting hard to track the flow of logic because of ALV control framework and nervousness around object oriented code. To save time, I placed breakpoint on statement CALL FUNCTION and continued, hoping that I’ll reach a main function module soon.
I came across BREAK-POINT ID statements while still in classes. They seemed to decipher my action and pass control to another class or function module. My first thought about this statement was that SAP has created special breakpoint statements with specific user IDs, and these are used when they respond to OSS messages.
It was a mistake not to see keyword documentation of BREAK-POINT ID. This resulted in significant waste of time.
Another day I was asked to apply a note, which had manual pre-implement steps. According to those steps, I had to go to SAAB transaction and create or activate a checkpoint group. System allowed me to create Checkpoint group without asking for access key. It then struck me that the concept is not for SAP internal use only.
If checkpoint group can be activated without access key or transport request, it is as easy as activating the debugger.
I read the documentation, and activated breakpoint in /SCWM/WAVE checkpoint group.
On releasing new wave, debugger popped up at BREAK-POINT ID statement.
I found it useful but limited in scope as the person doing debugging needs to know beforehand what checkpoint groups are applicable. Again, it was a mistake to assume.
In New ABAP Debugger, I was checking the number of watchpoints set up under Break./Watchpoints > Watchpoints tab. Right next to this tab was Checkpoint Activations. This tab showed list of checkpoints applicable in current process, also the ones used in current stack level.
After seeing the option activating Checkpoints in New ABAP Debugger, I now try to use it during analysis.
I think having custom checkpoint in every enhancement implementation will make life easy for person doing debugging in support environment.
Summary points
- Checkpoint groups can be activated using Transaction SAAB.
- Checkpoint groups can be activated in runtime using New ABAP Debugger.
- Activation can be user specific, server specific or global.
- Apart from Breakpoints (BREAK-POINT), option of Assertion (ASSERT) and Log point (LOG-POINT) is also there.
- Logs can be checked in SAAB transaction.
- SAP Help link
Very good blog Manish Kumar
Totally agree on their value - started using some years back and use it whenever the code getting called is nested deep in the stack. In fact, for enhancements if possible two things should be done:
- Group them into a composite enhancement : Helps to understand the semantics
- Create a check-point group: Definitely useful at runtime.
Hi Manish
you can do this with the new ABAP Debugger Scripting environment, too. There is a standard script (RS_STOP_AT_CUSTOM_EVENT) which stops at custom code.
I think for pre 7.02 releases your proposal is very usefull.
Regards Christian
I'll check out the standard script while learning Debugger scripting.
Thanks
Hi Christian,
Nice idea! 😎
Curious to know if this triggers the break in the Enhancement Framework enhancements viz., explicit/implicit enhancement 😕
I was also wondering if we can use layer-aware debugging(SLAD) to stop the execution at custom packages. If we can do (i'll try it when i have time), it'll be even cooler.
What do you think?
BR,
Suhas
Hi Suhas,
unfortunately the RS_STOP_AT_CUSTOM_EVENT script doesn't break at enhancements by default. But with a few modifications it does! Just add/modify the following statements:
There are also downsides to this method. It isn't very performant, at least at my system. During execution you can easily pick up another cup of coffee.
I am also curious about the layer-aware debugging feature. But i wasn't able to break at custom code with this method. Maybe i did some mistakes.
Please let us know, if you have more success.
Regards Christian
Hi Suhas Saha
I just followed an online tutorial, and found that Layer aware debugging works for stopping at custom packages (Z*).
However, it does not stop at enhancements.
Hi Christian Guenter
When layer-aware debugging is activated, a new step execution option appears in application toolbar (Goto Next Object set Ctrl+Shift+F5).
When this option is used, flow will stop at package or layer specified by you.
Very Informative Blog..!