Escolar Documentos
Profissional Documentos
Cultura Documentos
Assertions can be used for improving the quality of software. Breakpoint and Log point are
used for investigating program behavior in case of problems. They help in understanding
and maintaining the code.
The transaction SAAP has been there for quite some time but it is a pity not many ABAPers
are aware of it. Therefore we thought our SAPYard family members should know about this
useful tool. Better late than never. It is such a handy tool, which might even be useful in
the real production environment.
Checkpoint Group
The activation state of all checkpoints which can be activated is controlled by the
checkpoint group.
Assertion
Let us consider a scenario where money is transferred from one account to another. Here,
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 1/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
the sum of both balances must be equal before and after transfer. Simple Finance. Right?
With the help of assertion, we can check this condition. It is a statement which we can
put in the program describing a specific condition.
During program execution, if expression fails, execution can be stopped. Program execution
can be stopped by raising ASSERTION_FAILED.
If ID statement is used then assertion activation and its behavior is controlled from outside
the program by checkpoint group otherwise it is always active.
Please note – By default Assertion is Inactive as shown below in the Assertions frame.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 2/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
REPORT ZSAPYardCheckPoint.
DATA : lv1 TYPE c VALUE 'A'.
DATA : lv2 TYPE c VALUE 'B'.
INITIALIZATION.
LOG-POINT ID zcheck_pt FIELDS: lv1,lv2.
START-OF-SELECTION .
lv1 = 'X'.
lv2 = 'Y'.
LOG-POINT ID zcheck_pt FIELDS: lv1,lv2.
WRITE 'Run.. Done'.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 3/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
ASSERT ID zcheck_pt CONDITION lv1 EQ lv2.
BREAK-POINT ID zcheck_pt.
Execute the program. It would run successfully and write the output “Run.. Done”.
Case 1 – Abort
Now, go to transaction SAAB. Select radio button Abort in Assertions frame and save the
Checkpoint Group.
Now, execute the program again. You will get a dump describing the position where
Assertion is violated.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 4/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
Did you check? Playing Sherlock Holmes to detect CONVT_CODEPAGE runtime error
mystery
You can no doubt see the dump in the regular t-code ST22. But our aim in this article is to
see the Log in SAAB T-code where we created the Checkpoint.
Case 2 – Log
In order to start logging, we need let the SAAB T-Code know about our intention. We need
to choose the Log radio button (as shown below) in the Assertions (Foreground) section.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 5/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
You can see the log details with Variable values, which would be very useful in cases
where we can’t replicate the scenarios in Quality or Development box – to chase the
mysterious missing values.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 6/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
PS: If you do not see the above log, choose the Log radio button in Assertions frame and
re-run your program.
Case 3 – Break
When you select Break option you will get following pop up which is just an information.
Ans: In the normal case, the program is interrupted and the debugger is started. In case of
background processing, there are two choices. It will behave like Log mode or Abort mode
depending on what is selected in the above pop up. By default it is Log, so in Background
processing mode, the program would not go into debug mode, but checkpoint group would
log the issues.
Just like Assertions; Breakpoints and Logpoints can be activated by selecting Break and
Log respectively.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 7/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
BREAK-POINT:
Break Point can be activated by writing following code in your program.
BREAK-POINT ID <Checkpoingroup>.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 8/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
LOG-POINTS:
Log Point can be made active by writing following code in your program.
LOG-POINT ID <Checkpoingroup>
Logs can be used to identify or analyze the system behavior. Variable values can be logged
so that the developers can analyze those values.
You can add in your program statement LOG-POINT ID ZCHEECK_PT. You can also use
the following syntax.
Run the program and go to transaction SAAB. Go to tab ‘LOG’. You will see following details
which will help you to analyze program’s behavior.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 9/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
Above statement log the value of field ‘log’. We can log up to 32 fields.
You can use SUBKEY addition to prevent the production of a huge amount of data in the
log. All log occurrences will produce one record for the same SUBKEY. Only last occurrence
can be seen but the counter will be incremented.
LOG_POINT ID ZTRY SUBKEY ‘TEST’ FIELDS log.
Also Read – DELETING rows of the internal table within the LOOP. Is it a Taboo? A big NO
NO?
2. User Level activation – Checkpoint group will be active for all defined users.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 10/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
3. Server level Activation – The Same way we can define servers for which it will be
active.
This was my humble effort to bring your notice to this simple yet very powerful tool which
every ABAPer should make use of. I know, this transaction SAAB should have been
introduced years ago. But every day you find something new in SAP. Please start using it
and let me know if you face any issue. I would try to answer your queries.
Please share with us if you have some smart way to tackle production issues or identify
dumps. If you have some custom tools which can be shared, do send it to us. We would be
happy to share it in our portal.
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 11/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
We have a very active Telegram (App) SAP Technical Group with more than 1440+ SAP
Technical Practitioners from 6 Continents of the SAP World. Please join it using below link.
Telegram SAP Technical Discuss Group. You need to install the Telegram App first on your
mobile device. Once you have it on your mobile, you can join the group and also access it
from the Web on your computer and laptop.
Sampath Dasarathi
http://www.sapyard.com/
Working as a Associate Manager at Accenture LLP with 11 years of exp in Workflow/ABAP With
Implementations and maintenance projects which involves various modules like IS-OIL-
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 12/13
7/17/2018 SAP ABAP Checkpoint Group - Chase the Mysterious SAP Dump |
http://www.sapyard.com/sap-abap-checkpoint-group-chase-the-mysterious-sap-issues-with-a-smile/ 13/13