0% found this document useful (0 votes)
160 views13 pages

ABAP - Debugger

The document discusses the ABAP/4 debugger tool which allows stopping a program during execution when conditions are met. It describes different ways to start the debugger and its components like views for program structure, call sequences, field contents, and internal tables. General debugging commands like single step, continue, and return are also outlined. The document then covers breakpoints, watchpoints, and using SQL Trace to analyze database access logs for a user. It concludes with an overview of authorization objects and fields in SAP and an example report using authority checks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views13 pages

ABAP - Debugger

The document discusses the ABAP/4 debugger tool which allows stopping a program during execution when conditions are met. It describes different ways to start the debugger and its components like views for program structure, call sequences, field contents, and internal tables. General debugging commands like single step, continue, and return are also outlined. The document then covers breakpoints, watchpoints, and using SQL Trace to analyze database access logs for a user. It concludes with an overview of authorization objects and fields in SAP and an example report using authority checks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 13

ABAP / 4 - Debugger is the development

workbench tool which allows you to stop


a program during its execution when a
particular condition is met.
When the program is stopped , you can
use the debugger to display the contents
of the table and variable being used by
the program.
Starting the ABAP / 4 Debugger in different ways
Method 1 : By Clicking the Execute button and enter
/H in command box.

Method 2 : In ABAP / 4 editor, by executing a program
Choosing Program-->Execute -->Debugging
from the Menu.

Method 3 : Setting Breakpoint in the Program.
Components of ABAP / 4 - Debugger
O - Presents the program structure, events, subroutines and
Modules.
S - Displays the calling sequence within a particular event,
up to the current breakpoint.
V - It is the default view, which displays the contents of
up to, four field.
F - Displays the field contents and in this view you can
define values for the watchpoints.
T - Allows modifying the contents of internal table.
P - Displays all program, which are needed for program
debugging including system program.
General Commands in Debugging
1. Choose : --> to select a field into debugging view screen ,
instead of double-clicking , choose option can be used.
2. Single step -->
this is used to trace the program step by step
3. Execute --> Similar to Single Step but it will execute
block by block in the program.
4. Continue --> this is used to release the program from
running step by step to running freely through the code.
5. Return ---> this is used to traverse in different
application logic layers in the program. For every click of
return , the control will be moved to its next
hierarchical level..
A Breakpoint is the signal,
which is specified in the
program, tells the system to
stop the program execution
and to start the Debugger.
Types of Breakpoints in ABAP / 4 :
Static are set up with BREAKPOINT keyword
inside the program, which you can directly
display with the ABAP / 4 source code editor.
Dynamic break point is not visible in the code.
Position the cursor over the source code and go
for Utilities breakpoint set
Watchpoint are field specific. Here the program
is stopped when the field reaches the value
specifed in the Watchpoint.
Watch points are used to
dynamically set breakpoints in the
program code. If a variable is
marked as a watch point , the
program halts in debug mode every
time the value inside that field
changes.
Setting WATCHPOINTS
Execute a program in debugging mode.
Position the cursor over the needed field.
Press the F button to get a view of the
fields.
Select the checkbox for the needed
Watchpoint.Click on the CONTINUE
button.
To display the active Watchpoint select
Goto Breakpoint

SQL Trace captures information about Database access
made on the system. Like Runtime Analysis , SQL
Trace is not limited to a Single program. It can be
turned on for a single user and all activity by that user
is logged. After logging is complete , SQL trace
provides tools to analyze the logs.
The SQL trace is accessed through T-Code ST05.
The Components under SQL trace.
Trace On List Trace
Trace on For User
Trace off
In Sap R/3 System security is referred to as
Authorizations.
The ability to perform an operation in the
system is referred to as an Authorization object.
An authorization object can have up to 10 fields
. Each field is the equivalent of an SAP data
element.
There fore , An Authorization object grants the
ability to perform some operation in the system.
To create Authorization fields T-Codes : su20,
SU21.--> Sap std menu --> Tools ---> ABAP
Workbench --> Development-->Other Tools--
>Authorization objects -->
Fields -->click on create -->specify Field Name --
> and Data Element --> specify Check table if
any.<--Back<--back--> click on objects-->select
class form menu --> click on Create --> specify
Object class--> short text--> and save--> DCLK
on class to specify object list--. Choose object
and -->create-->specify fields-->save..
REPORT ZAUTH. TABLES : KNA1.
AUTHORITY-CHECK OBJECT ID ZCUST
ID KUNNR FIELD 1000
ID NAME1 FIELD RAJU
ID LAND1 FIELD IN
ID ORT01 DUMMY.
IF SY-SUBRC NE 0.
MESSAGE I123(0) WITH YOU R NOT
AUTHORIZED TO CHANGE DATA IN KNA1.
ENDIF.

You might also like