6 - Debugging
6 - Debugging
1
Debugging
▪ Debugging is a technique by which we can find the error, correct the error and detect
the error.
2
Ways of Debugging
1. Set the breakpoint on any executable statement and program stops automatically at
that point.
2. We can debug the code with the help of transaction code /h.
3
Execution Keys
3. F7 - Return
4
System Variables
1. SY-SUBRC - System variable for return code(successful = 0, not successful = other than
0).
5
Static Breakpoints
6
Dynamic Breakpoints
7
Operations on Internal Table
▪ The various operations on internal table in the debugging mode are as follows:
8
Features - Goto Statement
Debugger-Goto statement.
▪ We can also jump to a particular statement by using the shortcut ‘Shift + F12’.
9
Features - Setting Breakpoint at Keywords , FM’s and Messages
▪ We can set the breakpoints at keywords in debugging mode like - SELECT, CALL
etc.
1
0
Features - Deleting and Deactivating the Breakpoints
1
1
Features - List Preview
List Preview
1
2
Features - Find
1
3
Features - Source Code Display
session.
1
4
Features - Save Parameters as Test Data(SE37)
1
5
Features - SAP Memory and ABAP Memory Values
(Internal Only)
1
6
Watchpoints
▪ Watchpoints are used to monitor the values of variables, workareas and internal tables.
1
7
Breakpoints and Watchpoints Comparison
▪ Breakpoints are for executable statements whereas watchpoints are used to monitor
▪ A user can set a maximum of 30 breakpoints whereas a user can set a maximum of 10
watchpoints.
1
8
Comparison of Session Breakpoint and External Breakpoint
▪ A session breakpoint is attached to user session and exists until the user closes the last
▪ The icon of session breakpoint looks like a computer monitor set in front of a stop sign
whereas the icon of external breakpoint looks like a person set in front of a stop sign.
▪ The session breakpoint is used to debug the ABAP code internally whereas the external
breakpoint is used to debug the ABAP code from an external process like Web Dynpro
▪ Desktop 1, Desktop 2 and Desktop 3 are considered as user specific desktop in the
debugging mode.
2
0
Way to Debug a Dialog Screen or Pop Up Screen
▪ Firstly, we need to create a text document using the below mentioned code.
[Function]
Command=/H
Type=SystemCommand
▪ Then drag and drop this text document on the required dialog screen or pop up screen.
2
1
Update Debugging
2
3
Script Tab(Contd.)
▪ The various scripts for selection and updating of tables are as follows:
2
4
Thank You
2
5