0% found this document useful (0 votes)
51 views

Software Engineering Fundamentals: Sap Abap: Debugging

ABAP_DEBUGGER

Uploaded by

akmohant
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Software Engineering Fundamentals: Sap Abap: Debugging

ABAP_DEBUGGER

Uploaded by

akmohant
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Software Engineering Fundamentals:

SAP ABAP
Debugging

Copyright 2008 Accenture All Rights Reserved. Accenture, its logo, and Accenture High Performance Delivered are trademarks of Accenture.

Module Objectives

Define debugging
Describe branching to debugging mode
Define key debugging concepts and functions
Explain the debugging mode
Describe examining/changing variables
Identify breakpoints and watchpoints
Debug internal tables

Copyright 2008 Accenture All Rights Reserved.

What is Debugging?
Tool used to identify and eliminate errors in
ABAP programs
Allows the verification of program logic in a stepby-step manner by examining the results of
individual statements

Copyright 2008 Accenture All Rights Reserved.

Branching to Debugging Mode


ABAP
Debugger
ABAP Editor

Object List
Development object ... ... ...

...
Test/execute
...

Debugging
Program

B170D051

Any screen

Breakpoints

... ... ... System Help

Program ... . Breakpoint ... .

...
Utilities
...

/h

Copyright 2008 Accenture All Rights Reserved.

...
Debug ABAP
...

Key Debugging Concepts

Debugger modes
Examining the value of variables
Changing the value of variables
Setting breakpoints
Setting watchpoints
Viewing contents of internal tables

Copyright 2008 Accenture All Rights Reserved.

The Debugging Display


Below is the screen shot of how the new debugger looks like.

Copyright 2008 Accenture All Rights Reserved.

Debugging Mode

Copyright 2008 Accenture All Rights Reserved.

Examining the Value of Variables

Copyright 2008 Accenture All Rights Reserved.

Changing the Value of Variables


Tools

Copyright 2008 Accenture All Rights Reserved.

The Most Important Debugging


Functions
Single Step

Processes the next program line

Execute

Executes all processing steps belonging to one statement

Continue

Processing continues until the next breakpoint (or end of


program) is encountered

Table

Displays the contents of internal tables

Breakpoint

Identifies breakpoints

Watchpoint

Interrupts the program when there is a change in a field

Return

Returns from a routine

Hexadecimal display Displays data in hexadecimal format


Replace

Copyright 2008 Accenture All Rights Reserved.

Allows the change of data contents during debugging

10

Setting Breakpoints
Menu:

Utilities
-> Breakpoints

Keyword:

BREAK-POINT

ABAP Editor

Debugging Mode

Line selection (double-click)


Breakpoint pushbutton
Menu:

Copyright 2008 Accenture All Rights Reserved.

Breakpoint ->
Create/Delete
Activate/Deactivate
Delete All
Deactivate All
Save
Breakpoint At
Create Watchpoints
11

Watchpoints
Debugging

..

Breakpoint ..
Create/Delete

ABAP Debugger
C

..

Watchpoint

..
..

or
Create Watchpoint

Copyright 2008 Accenture All Rights Reserved.

12

Viewing Contents of Internal Tables

Click on Tables tab to take you to the next tab where you can check the contents of table.

Copyright 2008 Accenture All Rights Reserved.

13

Call Stack Option


This is used to display the sequence of calls till the current
breakpoint.
Once inside the debugger, click on the Tools icon to load the
Call stack option. This will show us the list of events that have
been processed till it reaches the current breakpoint.

Copyright 2008 Accenture All Rights Reserved.

14

Call Stack
Load the call stack tool. View the sequence of events that have
been processed till it reaches the current breakpoint.

Copyright 2008 Accenture All Rights Reserved.

15

Debugging Concepts
Apart form being able to debug an ABAP program in the debugger, you
can also choose the debugger call by choosing a breakpoint. A
breakpoint is a signal at a particular point in the program that tells the
ABAP runtime processor to interrupt processing and start the
debugger.
Static Breakpoints
Static breakpoints are always user-independent if there is no specification of
a user name. Once a user has inserted the statement BREAK-POINT or
BREAK name in an ABAP program, the system always interrupts the
program at that point for that user or only for the user name. This procedure
is only useful in the development phase of an application when program
execution is always to be interrupted at the same place.

Dynamic Breakpoints
Dynamic breakpoints are user-specific. Therefore, you should use them if
you want the program to be interrupted only when you run it yourself; not
when it is being executed by other users. All dynamic breakpoints are
deleted when you log off from the R/3 System.
Dynamic breakpoints are more flexible than static breakpoints because you
can deactivate or delete them at runtime.
Copyright 2008 Accenture All Rights Reserved.

16

Debugging Concepts
System Debugging:
The System Debugging function enables the user to analyze system
programs, in addition to application programs, using the Debugger. This
function is called or terminated through the menu Settings System
Debugging On /Off. By selecting the menu Settings Save, this predefined
setting is stored to the database and thus activated again each time the new
Debugger is activated.

Update Debugging:
Update function modules do not run in the same user session as the
program that is currently running in the ABAP Debugger. These function
modules are therefore not included in debugging. Only if you select the
Update Debugging option can you display and debug them after the
COMMIT WORK.
If you call an update session during a user session, breakpoints that were
defined beforehand in the calling processing unit are copied to the new
update session, where they can be displayed under Breakpoints. If, in the
ABAP Debugger, you check Update Debugging under Settings and then,
for example, call the update module func using CALL FUNCTION func IN
UPDATE TASK, a new window is opened in which you can debug this
function module in the update session. All the breakpoints that were set in
the calling processing unit can also be processed here.
Copyright 2008 Accenture All Rights Reserved.

17

Exercise 7 Use the ABAP Debugger


Overview
This exercise requires participants to use the debugging mode.
Participants also use the
SAP R/3 debugging function.

Duration 20 minutes

Copyright 2008 Accenture All Rights Reserved.

18

Questions and Comments


What questions or comments
do you have?

Copyright 2008 Accenture All Rights Reserved.

19

You might also like