Debugging 1730116885
Debugging 1730116885
1. Debugging
▪ Debugging is a technique by which we can find the error, correct the error and detect
the error.
2. Ways of Debugging
▪ Set the breakpoint on any executable statement and program stops automatically at
that point.
▪ We can debug the code with the help of transaction code /h.
3. Execution Keys
▪ F7 - Return
▪ SY-SUBRC - System variable for return code (successful = 0, not successful = other
than 0). To check whether the above statement, function, or select query is
executed or not.
3. SY-UNAME: Username
5. Static Breakpoints
6. Dynamic Breakpoints
The various operations on internal table in the debugging mode are as follows:
Debugger-Go to 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
FUNCTION, MESSAGE etc.
▪ In the debugging mode, we can find the specific records of internal table.
▪ We need to do CTRL + F for the internal table data, one pop-up appears to pass the
column values, pass the input and it point to the records having matching values.
▪ In the debugging mode, we can open the code in a new session without closing the
debugging session.
▪ We can save the function module parameter values in the debugging mode.
▪ The path to save function module parameters values as test data is as follows:
Services of the Tool - Save Parameters as Test Data(SE37)
▪ We can check the values of SAP memory and ABAP memory in the debugging mode.
▪ The path to check the memory id values in the debugging mode is as follows:
Watchpoints are used to monitor the values of variables, work areas and internal tables.
16. Breakpoints and Watchpoints Comparison
▪ A user can set a maximum of 30 breakpoints whereas a user can set a maximum of
10 watchpoints.
▪ A session breakpoint is attached to user session and exists until the user closes the
last session, whereas external breakpoint has a validity of 2 hours.
▪ 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 applications, BSP (Business Server Pages) etc.
▪ Desktop 1, Desktop 2 and Desktop 3 are considered as user specific desktop in the
debugging mode.
The layouts are different and in desktop 2 we can see the ABAP STACK (It is based on the LIFO).
But in Standard desktop we can see both normal and ABAP STACK and Desktop 3 is just most
preferable one to debug.
19. 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.
▪ Update debugging is used to debug the code which is written in the update task as
we cannot debug the update task code using normal debugging.
▪ We can use the script tab to stop the debugger on the selection of specific tables
and update of tables.
▪ We need to go to script tab, click on to load script and pass the name of the script as
per the requirement.
• After click on the Start Script and enter the table like MARA, MAKT, MARD.
The various scripts for selection and updating of tables are as follows:
Note: To check the inserting and updating fields into DB tables in the debugging you should change
the normal debugging mode to update mode.