0% found this document useful (0 votes)
181 views25 pages

Bugging in Sap SD

The document provides an overview of debugging in SAP ABAP for functional consultants. It defines debugging as finding the root cause of transaction behavior issues. Debugging is necessary when the cause cannot be found through functional methods alone. The document reviews the classic and new debuggers in SAP, how to select and switch between them, commonly used debugging keys, setting breakpoints, and customizing the debugging desktop. It provides functional consultants with basic debugging skills to help resolve issues.

Uploaded by

kartik mourya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
181 views25 pages

Bugging in Sap SD

The document provides an overview of debugging in SAP ABAP for functional consultants. It defines debugging as finding the root cause of transaction behavior issues. Debugging is necessary when the cause cannot be found through functional methods alone. The document reviews the classic and new debuggers in SAP, how to select and switch between them, commonly used debugging keys, setting breakpoints, and customizing the debugging desktop. It provides functional consultants with basic debugging skills to help resolve issues.

Uploaded by

kartik mourya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Skip to content

Saptutorials.in
Elevate your SAP skills with our comprehensive SAP tutorials
Home
 Blog
 Tutorials
 YouTube Channel
 About Us:-

sap debugging for functional


consultants
October 23, 2022 by saptutorials
In this article, we will share a quick and easy guide to sap debugging
for functional consultants. When it comes to ABAP code debugging or
analyzing an ABAP program, functional consultants frequently struggle.
This is to help those who would like to explore and learn the SAP ABAP
Debugging knowledge area. This is helpful for all functional people with
minimal knowledge of SAP.
Table of Contents
 What is debugging?
 Why do we need to Debug?
 Introduction of sap debugging for functional consultants
 What is ABAP Debugging?
 Types of Debugger
 Selecting and switching the debugger
o Debugger settings
o Selecting the debugger
o Switching the debugger
 Debugging Function Keys and their functionality
 Customize the debugging desktop components
 Variable fast display
 Break point
o Types of breakpoints
 Watch point
 Internal table and related operations in debugging

What is debugging?
Definition: Debugging is the way to find the root cause of SAP
transaction behavior (e.g, finding a reason why a certain value in a field was
updated or determining why users receive an error, warning, or abnormal
transaction termination message during transaction processing).

Why do we need to Debug?


 Debugging is necessary if the root cause cannot
be determined from functional methods such as checking to
customize or master data.
 Because ABAP is SAP’s backbone, every member of a functional
team must have dealt with SAP development technicalities
underlying business functionality at some point. This need for
technical details can occur during various phases, such as writing
functional specifications or analyzing production environment
issues.
 To understand basic terminology for ABAP and various tools and
techniques for debugging.
 This knowledge is helpful when you are trying to find the root
cause of an issue or designing a needed functionality to fill a GAP
in requirements.
Introduction of sap debugging for functional
consultants
SAP ABAP Debugging is a tool that helps to identify and analyze errors.
Through debugging, we can analyze a program, understand the flow logic and
most importantly find out the root cause of any issue. Debugging is a task that
an ABAP consultant should be familiar with, although functional consultants
would also benefit immensely from debugging skills. It will save their time for
analysis and issue resolution, reduce the over-dependence of the ABAP team,
and help in effort estimation.ABAP debugger is an integrated testing tool
within the ABAP workbench through which we can check the flow logic of
programs.
What is ABAP Debugging?
Debugging is when you stop a program or transaction at a certain point, so
you can walk step by step through the ABAP programming to see where an
error occurs. But as a functional consultant you need basic ABAP skills to be
able to do this, Most good functional consultants will have basic debugging
skills and this is very very important because it reduces the excessive
independence of ABAP teams. Most of the time, part of our workload is to
resolve errors that occur during the execution of certain transactions.
However, if these errors message cannot be resolved by setting up the master
data or transactional data (i.e.: error message without any meaning) you need
to access the program in debug mode (by typing “/h” in the transaction bar
and then executing the transaction), which will allow us to analyze the
program and see where the problem lies, and thus save time.
If you are not sure about which line of code you want to debug, enter
transaction /h in the command prompt, sometimes referred to as the OK
CODE, while executing any transaction. Press Enter to activate the debugger.
You’ll see the message in the status line and now if you were to press enter
again, hit save, or perform any function on this transaction, you will see the
DEBUGGER screen appear
Types of Debugger
Two types of debuggers

1. Classic debugger
2. New debugger
The Classic ABAP Debugger runs in the same role area as the application
being analyzed. The Classic ABAP Debugger is a one-process debugger, where
the debugger and debugged run in the same internal session.

The New debugger: The New debugger is a two-process debugger, available


for all releases after 6.40. The new ABAP debugger starts in a separate external
session.-> In the new debugger, the debuggee session will be inactive while
the debugger is active. So during debugging we can still see the input values
in the debuggee screen. As long as the debuggee session is active, the
debugger is not shut down. The advantage is the debugger with all the
settings, variables, and breakpoints is always available when we restart
debugging. /hx command in a debug session ends the debugger session.
A debugger settings screen appears. Go to Settings->Options.

sap debugging for functional consultants


Selecting and switching the debugger
Debugger settings
If we choose “Close Debugger After Continue (F8) and Roll Area End”, the
debugger will be closed after we execute the program. With this setting, the
debugger behaves like a classic debugger.
debugging in sap ABAP step by step
Selecting the debugger
We can chose the debugger type in the ABAP development environment for
example, in ABAP editor(Tcode – SE38) or in the object navigator(Tcode –
SE80) via menu path Utility-> Settings
ABAP debugging
In the user-specific settings, select the classic debugger or new debugger
option. The selected debugger option will become the default debugger tool
for the user.
de
bugging in sap ABAP
Switching the debugger
We can switch between the classic debugger and the new debugger at any
time. From classical debugger to new debugger, through path Debugger ->
switch to new ABAP debugger
sap debugging for beginners

Debugging Function Keys and their


functionality
Starting the debugging session, The new debugger can be started with the
same commands as a classic debugger.

Using the command “/h”


 Execute the program in debug mode
 Setting breakpoint
Commonly used debug keys:

F5 – Single-step execution


 F6 – Single step/skip subroutines
 F7 – move to the next breakpoint or finish loop
 F8 – Execute / Stop at the next breakpoint
New Debugger screen main parts Desktop

 Control Area
 Tool
 System fields
 Process Info
The new debugger has 3 custom desktops, 7 standard desktops
1. Standard
2. Structures
3. Tables
4. Objects
5. Detail Display
6. Data explorer
7. Breakpoint/Watchpoint
In the new debugger, we can scroll vertically and horizontally through source
code. New Debugger screen main parts

Debuggers

Customize the debugging desktop components


We can maintain up to 4 tools on the desktop. We can undo the layout
changes by clicking on the back button. We can customize the desktop at our
convenience using the following buttons on the right side of the debugger
screen.

 Close the current tool


 Add new tool
 Replace current tool
 Make the current tool full screen and – to align/maximize tools
vertically or horizontally
 Swap tools
 Services of the tool
We can save the current layout of the user-specific desktop using the layout
save button of the new debugger. When the swap tool button is selected, the
following pop-up screen appears. Based on the option selected, tools will be
swapped. When we click on the “add new tool” or “replace tool” button, a
pop-up screen appears to choose the new tool to be displayed or replaced on
the desktop. Then the selected tool will get added or replaced on the desktop.
on desktop.

Variable fast display


Variable fast display or variable overview displays data objects with current
content and technical attributes. Variables 1 and 2: Double-click on any
variable to get its content and attributes. Local and global tabs display all local
and global variables of the current program. We can select the default tab in
the variable fast display using the menu path Settings->Options. In new

types of debugging in sap abap


In the new debugger options screen select the default tab for the fast variable
display tool. We can filter out the global variable by selecting the checkbox to
hide constants, tables, data, and common parts.
debugging for functional consultants in sap

Break point
The breakpoint is the indication to the ABAP runtime processor to stop the
program processing at a certain specified statement and to start the ABAP
debugger.

Types of breakpoints
 Static breakpoint
 Dynamic breakpoint
Static breakpoint: Static breakpoint is useful during the development phase.
We can set the breakpoint using the keyword BREAK-POINT. Due to this hard
coding, the program is interrupted regardless of the user who executes it.
BREAK user_name Using this command, the program is interrupted only when
the specified user runs the program. We can find the static break point in the
program using an extended program
check or transaction code SLIN. Chose Program -> Check -> Extended
Program Check or TCode SLIN
sap abap debugging for functional consultants
Dynamic breakpoint

It is set in the ABAP editor or debugger by double-clicking on that line. These


breakpoints are user-specific and will be deleted when the user logs off. We
can delete or deactivate the breakpoint at runtime. On selecting create
breakpoint from the menu options as shown below
breakpoint
Create Breakpoints A pop-up screen appears where we can choose the type of
dynamic breakpoint as per requirement.

debugging in sap abap step by step


Breakpoint at statements The Debugger stops program immediately before a
specified program statement is executed. Break point at subroutines The
Debugger stops the program immediately before a specified subroutine is
executed.

Breakpoint at function module


The debugger stops the program immediately before the specified function
module is executed. Breakpoint at method The Debugger stops the program
immediately before the specified method is executed. There is a separate tab
for managing breakpoints in the new debugger. We can activate or deactivate
or delete or create any breakpoint in the breakpoint tab of the debugger.

Text Link Test


Double-clicking on the navigation button shows a breakpoint on the source
code.

sap debugging

Watch point
Watch points are user-specific dynamic breakpoints. We can define watch
points in the debugger screen to monitor the content of specified fields. We
can set a watchpoint to interrupt program execution when the content of a
field or structure is changed

 Local watchpoints are valid in a specific program


 Global watch points are valid in a specific program and all the
programs it calls.
 Click on create watch point button on the debugger screen.

Watch point
Select a local or global option as per the requirements. Mention the program
for which we want to set watchpoint; the current program name will default in
the program field. If we just enter the field name and select continue, the
breakpoint will be created in such a way that every time the content of the
field changes program execution will be interrupted.

We can create conditional watchpoints by selecting appropriate relational


operators like >, <, >=, <=, <>, =. As soon as the watchpoint field values
change or the condition is met, the debugger will stop and the system will
show the message “ Watchpoint is reached.” We can set a watch point for
internal tables in the new debugger. If we set the watchpoint at a table
without mentioning the condition, the debugger will stop whenever the table
content changes. This affects program performance and also creates memory
problems. So it is preferred for short program durations. The new debugger
creates a clone of the watchpoint variable. So once the watchpoint is reached,
we can see the old and new values of a variable.

Internal table and related operations in


debugging
The internal table in the new debugger We can save internal table data to
local files by clicking on the table services Button
debugging in programming
Chose to save to local file and continue services button
SAP debugging
Select the number of records and data format for the download file We can
delete the entire internal table content or selected records by choosing delete
table. On confirmation, the internal table will be completely refreshed. We can
upload the data to the internal table in debug mode from a local file on the
desktop.

We can insert new records to the internal table using the context menu of the
table. Right-clicking on the internal table record and choosing Insert Row from
the available options A pop-up appears asking you to use a template while
creating a new record. If we choose to use a template, a new record will be
inserted at the selected position. In the new debugger, we can scroll through
the internal table vertically or horizontally.

We can search for a specific field value in the internal table. For example, Go to
the context menu of the internal table and choose “search.”
debugging
Conclusion
These are some fundamental facts that functional consultants may find
beneficial. As we become more involved in debugging, we will be able to
investigate many more aspects. Those abilities can only be acquired over time
through real-world practice. I hope this was useful.

You might also like the below articles.


 SAP BRIM
 SAP ALM
 Cloud computing
 Advantages of sap
 Best ERP Software
 SAP Solution Manager 7.2
 SAP Technical
 SAP Solution manager
 SAP C4HANA
 SAP Successfactors
 MRP live
 SAP Best Practices
 Sap learning hub
Here are some interesting training videos you can watch on YouTube.

Share on Facebook

Tweet

Follow us

Share this:

 Click to share on Twitter (Opens in new window)


 Click to share on Facebook (Opens in new window)
 Click to print (Opens in new window)
 Click to share on LinkedIn (Opens in new window)
 Click to share on Reddit (Opens in new window)
 Click to share on Tumblr (Opens in new window)
 Click to share on Pinterest (Opens in new window)
 Click to share on Pocket (Opens in new window)
 Click to share on Telegram (Opens in new window)
 Click to share on WhatsApp (Opens in new window)

Like this:

Loading...
Related

The Magic of SAP ABAP: A Beginner’s Journey into the World of Business Application Programming
In "Blog"

Different Roles of an SAP Consultant


In "Blog"

What is a SAP Technical and How Does it Work?


In "Blog"

CategoriesBlog, SAP ABAP

...
Search Google

Search for:
Categories
 Blog
 career
 fiori app library
 MDM
 News
 RPA
 SAP ABAP
 SAP APO
 SAP CRM
 SAP FI
 sap industry solutions
 SAP MM
 SAP PM
 SAP PP
 SAP SD
 shortcuts and tricks
 Software development
 Tech Trends
 Tutorials
 Uncategorized
Recent Posts

 Mastering the Dunning Process for Effective B2B Debt Collection in SAP
 Understanding the Significance and Creation of Chart of Accounts in
SAP FICO
 Different Roles of an SAP Consultant
 Understanding SAP System Landscape Architecture
 Product Costing in SAP: Understanding the Process
Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of
new posts by email.
Email Address
Subscribe
Join 153 other subscribers
Select
LanguageAfrikaansAlbanianAmharicArabicArmenianAssameseAymaraAzerbaijaniBambaraBasqueBelarusianBengaliBh
ojpuriBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese
(Traditional)CorsicanCroatianCzechDanishDhivehiDogriDutchEsperantoEstonianEweFilipinoFinnishFrenchFrisianGalici
anGeorgianGermanGreekGuaraniGujaratiHaitian
CreoleHausaHawaiianHebrewHindiHmongHungarianIcelandicIgboIlocanoIndonesianIrish
GaelicItalianJapaneseJavaneseKannadaKazakhKhmerKinyarwandaKonkaniKoreanKrioKurdish (Kurmanji)Kurdish
(Sorani)KyrgyzLaoLatinLatvianLingalaLithuanianLugandaLuxembourgishMacedonianMaithiliMalagasyMalayMalayalam
MalteseMaoriMarathiMeiteilon (Manipuri)MizoMongolianMyanmar (Burmese)NepaliNorwegianOdia
(Oriya)OromoPashtoPersianPolishPortuguesePunjabiQuechuaRomanianRussianSamoanSanskritScots
GaelicSepediSerbianSesothoShonaSindhiSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamil
TatarTeluguThaiTigrinyaTsongaTurkishTurkmenTwiUkrainianUrduUyghurUzbekVietnameseWelshXhosaYiddishYoruba
Zulu
Powered by Translate
Archives

 March 2024
 February 2024
 January 2024
 December 2023
 November 2023
 October 2023
 September 2023
 August 2023
 July 2023
 June 2023
 May 2023
 April 2023
 March 2023
 February 2023
 January 2023
 December 2022
 November 2022
 October 2022
 September 2022
 August 2022
 July 2022
 June 2022
 May 2022
 April 2022
 March 2022
 February 2022
 January 2022
 December 2021
 November 2021
 October 2021
 September 2021
 August 2021
 July 2021
 June 2021
 May 2021
 April 2021
 March 2021
 February 2021
 January 2021
 December 2020
 November 2020
 October 2020
 September 2020
 August 2020
 July 2020
 June 2020
Please follow & like us :)

 Privacy Policy
 Disclaimer
 Contact us
 Sitemap

Copyright © 2020 Saptutorials

You might also like