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

ABAP Debugging Techniques Make Settings For The New Debugger

This document provides an overview of various ABAP debugging techniques, including: 1) Executing code in single steps, continuously, until return or next breakpoint using function keys F5 through F8. 2) Searching internal tables during debugging by selecting the table and entering search criteria. 3) Saving breakpoints in a session for later reuse by any user. 4) Downloading internal tables to Excel files for analysis outside the debugger.

Uploaded by

Ranjith Narayan
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

ABAP Debugging Techniques Make Settings For The New Debugger

This document provides an overview of various ABAP debugging techniques, including: 1) Executing code in single steps, continuously, until return or next breakpoint using function keys F5 through F8. 2) Searching internal tables during debugging by selecting the table and entering search criteria. 3) Saving breakpoints in a session for later reuse by any user. 4) Downloading internal tables to Excel files for analysis outside the debugger.

Uploaded by

Ranjith Narayan
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 13

ABAP Debugging Techniques

Make settings for the new debugger:


After executing the transaction, choose the Menu path Utilities -> Settings. In the User
Specific Settings, choose the Debugging tab in the ABAP editor.
he execution of the source code can be done in the follo!ing !a"s#
Single step(F5)
he progra$ is executed in steps line-b"-line and in procedures.
Execute(F6)
he progra$ is executed line-b"-line. he procedures are processed in a single step.
Return(F7)
he progra$ is executed to the point !here the control is passed bac% to the caller of
the current procedure.
Continue (F8)
he progra$ is executed up to the next brea%point. If there are no $ore brea%points
in the progra$, the s"ste$ executes the rest of the progra$ directl".
Search in internal table during debugging:
In debug $ode, gi&e the internal table na$e
'lic% on the internal table and press the find button or 'trl ( ). Put the &alues in the
search structure and press *nter.
he re+uired ro! is highlighted here.
Saving breakpoints:
If "ou need to debug the sa$e code again and ha&e a set of brea%points in place, "ou can
create a session to sa&e the brea%points and settings. ,ater this session can be loaded b"
an" user, and the sa$e set of brea%points is restored.
Path# -e! Debugger# Debugger - > Debugger Session -> Sa&e
'lassic Debugger# Debugging -> Sessions -> Sa&e
Downloading of internal tables into Ecel files:
Skip Breakpoints:
he ne! ABAP debugger gi&es an option to s%ip the first n occurrences of a brea%point.
this !ould be useful !hile debugging loops as !e $ight !ant to s%ip the first n
executions of the loop or the first n ti$es a function $odule / subroutine called.
Script recording and pla!back:
0hile debugging co$plex progra$s, or testing a user exit, !e generall" ha&e to perfor$
a set of repetiti&e actions in the debugger before reaching the point in code !e are
actuall" interested in. he actions $ight be an"thing fro$ launching a transaction to
adding a fe! lines to an internal table. An" action !e perfor$ on the SAP 1UI can be
auto$ated using Script 2ecording 3 Pla"bac%44 5ust start the 6Script 2ecorder7 b"
processing the 6'usto$i8e ,ocal ,a"out7 button 9Alt ( ):;< and select 6Script
2ecording and Pla"bac%=7 as sho!n belo!. hen hit the 6record Script7 button
and perfor$ the set of actions as "ou !ould generall" do the$. he >B script gets sa&ed
in the default SAP !or% director". ?ou can pla" it bac% using the 6Pla"bac% script7
button and the entire set of operations is perfor$ed auto$aticall".
Debugging "e#ote $unction %alls
1o to ransaction SM@A 9ransactional 2)'<.
&avigation:
&ote: It is not possible to go to a state$ent of a pre&ious *&ent !hich has alread" been
executed.
Debug a SAP Script:
1o to S*B: and open the desired la"out.
Select $enu Utilities -> Acti&ate Debugger or execute progra$ C2SDDBU1C.
o trace in a SAP script gi&e all the &alues E and press the race on/off
'lic% the Bac% Button and SAPscript debugger trace report !ill be displa"ed.
Debug a S#art for#
*xecute the transaction FSMA2)G2MSH gi&e the for$ na$e and execute it to get the
function $odule !hich is generated.
o get the *rror, execute the function Module in Debug Mode and set the Brea%point.
Debugging an A'( report
Debugging an A,> 2eport can be done onl" in the list for$at.
*xecute the A,> report to see the result
)pdate Debugging
0e $ight !ant to debug an update function $odule, but these do not run in the sa$e user
session as the debugger, hence the" cannot be debugged directl". If !e enable the
6Update debugging7 option then a separate debugging session opens after 'GMMI
0G2I. his is useful in debugging update ter$inations.
*atchpoints:
0atchpoints allo! the option of $onitoring the content of indi&idual &ariables. he
debugger stops as soon as the &alue of the $onitored &ariable changes.
In addition, conditions can be specified. he Debugger also chec%s !hether such a
condition is fulfilled.
%reate a *atchpoint:
In toolbar, clic% the create 0atchpoint button . *nter the &ariable na$e and
specif" the condition.

You might also like