ABAP Check Point Group Transaction SAAB – Making Troubleshooting easy

By | May 7, 2013 | Tutorials | 10,332 | 2

Check Point Group would be very helpful in troubleshooting for the any application. Lets see what is Check Point Group and How to use them.

Introduction

ABAP Check Point Groups are introduced from ABAP release 6.20. Check point group is a combination of various checkpoints. Checkpoints are like “Milestones”. It works like, You define several milestones in your application. As your application is getting executed, system would keep on logging against each milestone.

You can than use the Logs to determine, how many checkpoints are actually visited. This helps you to understand that your application has progressed to nth point but hasn’t reached z point. You can define three different type of behaviors:

  • Assertion – If application reaches to any active Assertion, it would only continue if the condition is true. If the condition is violated, it would end up in Short-dump or Log, based on the settings defined in the checkpoint group.
  • Logpoints – Log points are to log the information along the way of application execution.
  • Breakpoints – You can also define Breakpoints as part of the checkpoint group. Based on the setting, it would be active or inactive – means execution would be interrupted or not.

Creating a Check Point Group

Use transaction SAAB to define a checkpoint group.

ABAP Checkpoint Group SAAB Initial Screen

In the subsequent screens, we would just leave all the settings Inactive.

ABAP Checkpoint Group Activation

Save into your desired package if you wish to migrate this check point in future.

Creating Milestones

Once the checkpoint group is created, you would need to define milestones or check points in your application. As mentioned in the introduction, you can define three different type of behavior.

 

* Assert
ASSERT ID znp_sales_order_create
SUBKEY ‘ITEM_ASSERT’
FIELDS ‘ITEM’ lv_item_no
CONDITION lv_item_no < 5. * * Logpoint LOG-POINT ID znp_sales_order_create SUBKEY 'HEADER' FIELDS 'REACHED' 'HEADER'. * * Breakpoint BREAK-POINT ID znp_sales_order_create. [/abap_code] When you create the milestones, but if they are not activated, system would just execute those statement, but wont result into anything - Same like system would ignore those statements.

Demo

Check out this program.

 

REPORT znp_checkpoint_group_demo.

*
CLASS lcl_so DEFINITION.
PUBLIC SECTION.
METHODS:
get_header,
get_items,
call_bapi.
ENDCLASS. “lcl_so DEFINITION

START-OF-SELECTION.
data: lo_So type ref to lcl_so.
create OBJECT lo_So.
lo_so->get_header( ).
lo_so->get_items( ).
lo_so->call_BAPI( ).
write: ‘Done’.

*
CLASS lcl_so IMPLEMENTATION.
METHOD get_header.
LOG-POINT ID znp_sales_order_create
SUBKEY ‘HEADER’
FIELDS ‘REACHED’ ‘HEADER’.
” header processing

ENDMETHOD. “get_header
METHOD get_items.
DATA: lv_item_no TYPE i.
DO 5 TIMES.
lv_item_no = sy-index.
LOG-POINT ID znp_sales_order_create
SUBKEY ‘ITEM’
FIELDS ‘REACHED’ ‘ITEM’ lv_item_no.
” item relevant processing
*
BREAK-POINT ID znp_sales_order_create. ” lv_text.
*
*
ASSERT ID znp_sales_order_create
SUBKEY ‘ITEM_ASSERT’
FIELDS ‘ITEM’ lv_item_no
CONDITION lv_item_no < 5. ENDDO. ENDMETHOD. "get_items METHOD call_bapi. LOG-POINT ID znp_sales_order_create SUBKEY 'BAPI' FIELDS 'CALLING' 'BAPI'. "BAPI processing * ENDMETHOD. "call_BAPI ENDCLASS. "lcl_so IMPLEMENTATION [/abap_code] Go back to your checkpoint group and activate the Logging for the Logpoint. When you execute your application, it would log each and every logpoint. As you can see, I have given different SUBKEY for different purpose of the logic. This helps you to identify different logic point where the milestone is defined. You would get similar output on execution on this code:

ABAP Check Point group SAAB Log Display

When you drill down to Subkey ITEM, you would also see that the Item information is logged 5 times as we call that for 5 times.

Similarly you can activate the Assertion and Breakpoint.

Usage

These are very powerful when you are working in the complex solution and want to tag each step along the way. For Example, a complex user exit implementation in the Delivery BADI where your code is spread over various different methods. You want to easily debug the application, use the Breakpoint feature to activate them on the fly. You want to log them, use the LogPoints to log the execution.

Have you recently used or do you think you would use this in your next complex development?

Read More on Checkpoints

Like It? Share!!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{274 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 274 articles.

Load comments

2 Comments

  • Wouter Peeters

    With ‘bigger’ custom developments I tend to use the Checkpoint Group, I place these in all the most important stops ( reports, userexits, wda comp controlller doinit, wda view doinit, … ).

    This makes it easier for myself and future developers to quickly find everything related to the entire custom development.

    I never use logpoints or asserts tho. I try integrate everything tightly with a BAL log, so when they need to troubleshoot they can check the log in SLG1 to see what happend, later on they can pass it on to the developer … .

  • Hello Wouter,

    Yes, its always a better idea to have checkpoints when you have many pieces of the puzzle like you have inbound interface, few enhancements, flowing to the outbound interface. I sometimes use breakpoints when I know that this is complex process and the log wont be sufficient as there are many variables need to be checked during the debugging.

    Thanks for sharing your feedback.

    Regards,
    Naimesh Patel

Comments on this Post are now closed. If you have something important to share, you can always contact me.

You seem to be new here. Subscribe to stay connected.