SlideShare a Scribd company logo
1 of 10
Starting abap debugging
1. Putting /H in command box and hitting execute button
2. Setting breakpoint in program.
Difference among F5 , F6 ,F7 and F8
F5: debug in single step (line by line)
F6: Skips Subroutines/FM
Whenever a control encounters a subroutine or FM debug them unlike F5
F7: controls return to main program from Subroutines & FM
F8: executes program until next break point.
Breakpoint Types
1. Debugger breakpoint:
When you set a breakpoint in the Debugger, it is created as a debugger breakpoint by default. A
debugger breakpoint is only valid while the Debugger instance, in which it was set, is active. When the
Debugger is closed, all debugger breakpoints set in it are deleted.
2. Session breakpoint:
If you set a breakpoint in the ABAP Editor, for example, this breakpoint is a session breakpoint. Session
breakpoints remain active independently of the existence of a Debugger and are valid for all external
sessions of a logon. Within the Debugger, you can convert a debugger breakpoint into a session
breakpoint and vice versa.
If the setting Session Breakpoints Active Immediately is checked
(via Utilities → Settings → ABAP Editor → Debugging in the ABAP Editor or Object Navigator), you can
set a session breakpoint in an external session of a logon to force a running program into the Debugger
that runs in the same logon (for example, in an external session) and will process the point at which the
session breakpoint was set.
3. User breakpoints:
User breakpoints (previously known as external breakpoints) are valid for all user logons on the current
server of the current system. User breakpoints are specifically required when debugging BSP or Web
Dynpro applications. In these cases, you do not log on using the SAP GUI but via a browser, for example.
Therefore, any breakpoints must be set before logging on.
User breakpoints are only valid for a period of 2 hours.
As of Release 7.00, user breakpoints set for BSP or Web Dynpro applications are also valid for SAP GUI
logons.
Within the Debugger, you can convert debugger or session breakpoints into user breakpoints and vice
versa.
We can create maximum 30 breakpoints only.
System Debugging
If you set this option, the Debugger is also activated for system programs (programs with status S in their
program attributes). When you save breakpoints, the System Debugging setting is also saved.
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 you can display and debug them after the COMMIT WORK.
Remote abap debugging
1.
Open the Function module/ Proxy class and set an external break-point. Execute the transaction code
“SRDEBUG” (Note: this tcode is available only in ECC 6.0 system onwards)
Click on the button Activate Debugging. A pop-up screen will be opened. Fill the User-ID with which
break-point has been set. (The same user-id should be used as authentication data in the XI while
creating RFC communication channel). Select the radio buttons “all Appl. Servers” and “External
breakpoints already set”. Click on OK.
Another pop-up will be opened with a message “End debugging?” Leave the pop-up as it is. (Don’t close
the transaction).
When you run transaction in source system debugger will start in target system where SRDEBUG
transaction is set
2.
For example we are calling an RFC enabled FM in ECC system from CRM system.
Scenario 1: Calling a custom RFC FM
1: Add an infinite loop in the remote custom Function Module (adding a “DO. ENDDO.” statement at
the start of the FM would be enough).
2: Execute your program in the CRM system. The execution stops at the RFC call, because of the
infinite loop.
3: login to the ECC system and go to transaction SM50. Select the process which is executing
the RFC and navigate to the menu: “Program/Session->Program->Debugging” this triggers the debugger
Session in a separate window.
Scenario 2: Calling a Standard RFC FM
When we are debugging a standard program we cannot add the infinite loop, hence we cannot go to
SM50 and debug the work process. The RFC destination for the ECC system has a User specified, the
RFC function module gets executed using this users credentials. Usually the basis team set up the RFC
user as non Dialog user, this does not allow debugging. Contact your Basis team and get this changed to
a dialog user enabling you to debug RFC function calls via the normal debugger.
Debugging a Popup Window
Sometimes we might want to start debugging from a popup window / information message, in this case
we cannot type "/h" as the “OK Code” box is not available.
Method 1: From any SAP windows press the “Customize Local Layout” button (Alt + F12) and select
“Create Shortcut…” Select system command in Type and and put /h in Command Provide desktop in
location and click on finish. A file is generated on your desktop. Now drag the file onto the popup
window / information message or click on file and debugging is enabled!
Method 2: For this create a text file with .SAP extension on your desktop, and type the below lines into
the file:
[System]
Name= ECD
Description= ECD [host.com]
Client=100
[User]
Name= Username
Language=EN
[Function]
Title=
Command=/H
Type=SystemCommand
[Configuration]
WorkDir=C:Documents and SettingsJohnSapWorkDir
[Options]
Reuse=1
Debugging background job
1. To debug active background process Go to the transaction SM37 and select the background job (with
job status ‘Active’) that you want to debug. Now select ‘Capture: active job’ from menu ‘Job’,
2. Also you can do the same from transaction SM50. Select the work process where this job is running
and then choose the menu path Program/ModeProgramDebugging.
3. To debug completed background process select job in SM37 and write 'JDBG' in command prompt and
press enter. You will be in debug mode. Press F7 couple of time until you get into the code.
Watchpoints
Watchpoints allow you the option of monitoring the content of individual variables. The Debugger stops as
soon as the value of the monitored variable changes. In addition, conditions can be specified. The
Debugger also checks whether such a condition is fulfilled.
Like a breakpoint, a watchpoint is an indicator in a program that tells the ABAP runtime processor to
interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated
until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific,
and so do not affect other users running the same program. You can only define watchpoints in the
Debugger.
Use
You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a
field changes. When the value changes, the Debugger interrupts the program.
We can create maximum 24 watchpoints in a session
Creating a Watchpoint
In the toolbar of the New Debugger, you will find the pushbutton Create Watchpoint . It brings
you to the dialog box Create Watchpoint.
Using this function, you can enter the variable to be monitored.
All possible ABAP data structures are allowed here.
Watchpoint is reached
After you have created the watchpoint, the value of the variable will be monitored.
As soon as a change is found in the content of the variable after a Debug step and any conditions set
have been met, the Debugger will stop and you see the message "Watchpoint is reached
(<Watchpointvariable>)“.
In the Breakpoints tool (desktop Breakpoints/Watchpoints / Tab Watchpoints), you can view this reached
watchpoint in detail.
The reached watchpoint is marked with a yellow arrow. The old and the new values of the watchpoint
variable are at your disposal.
In addition, you can use the pushbutton Compare Variables ( ) to determine the differences between
the old and the new variable.
In addition, you can maintain the watchpoint in this view – that is change, activate, deactivate, or delete it.
Validity Area for Watchpoints
In contrast to breakpoints, watchpoints are only valid locally in the roll area. If a roll area changes, none of
the watchpoints defined in the underlying roll area are visible. Also, watchpoints that were created in the
New ABAP Debugger cannot be used further in the Classic Debugger (for example, after changing the
Debugger) and vice versa.
To debug script:
Execute the report RSTXDBUG to activate the script debugger.
OR Goto SE71 and give your form name and go to Utilities-->Active De-bugger.
To debug Smart form:
1. One way to debug smart form is to debug the Function Module of that smart form.
Within PERFORM %GLOBAL_INIT node level coding can be found.
2. If you want to debug particular smart form node that the solution would be, insert a "Program Line" just
above the node you want to debug and this program line write a normal abap breakpoint.
3. SFTRACE can be used for debugging SMARTFORMS.
Go to tcode SFTRACE / SMARTFORM_TRACE --> click "trace on" and click checkboxes Warning/Error
under abap breakpoints tab.
So whenever you call the smart forms, it will stop at this breakpoint and you can debug onwards

More Related Content

What's hot

Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questionsPradipta Mohanty
 
Call transaction method
Call transaction methodCall transaction method
Call transaction methodKranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script formsKranthi Kumar
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modificationsscribid.download
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniquesJugul Crasta
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAPsapdocs. info
 
Step by step lsmw tutorial
Step by step lsmw tutorialStep by step lsmw tutorial
Step by step lsmw tutorialraonivaz
 
User exits
User exitsUser exits
User exitsanilkv29
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exitsKranthi Kumar
 
User exit training
User exit trainingUser exit training
User exit trainingJen Ringel
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programsKranthi Kumar
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONHitesh Gulani
 

What's hot (20)

SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
Field symbols
Field symbolsField symbols
Field symbols
 
Badi document
Badi documentBadi document
Badi document
 
Dialog programming ABAP
Dialog programming ABAPDialog programming ABAP
Dialog programming ABAP
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
 
Alv theory
Alv theoryAlv theory
Alv theory
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniques
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAP
 
Step by step lsmw tutorial
Step by step lsmw tutorialStep by step lsmw tutorial
Step by step lsmw tutorial
 
User exits
User exitsUser exits
User exits
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
 
User exit training
User exit trainingUser exit training
User exit training
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
sap script overview
sap script overviewsap script overview
sap script overview
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
 
ABAP Advanced List
ABAP Advanced ListABAP Advanced List
ABAP Advanced List
 

Similar to Basic Debugging

Magento 2 Language Translator Extension
Magento 2 Language Translator ExtensionMagento 2 Language Translator Extension
Magento 2 Language Translator ExtensionAppJetty
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Pantech ProLabs India Pvt Ltd
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeansHuu Bang Le Phan
 
Debugging programs with Keil uVision
Debugging programs with Keil uVisionDebugging programs with Keil uVision
Debugging programs with Keil uVisionSaravananVijayakumar4
 
Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorRamaPrabha24
 
Mule soft debugprogram
Mule soft debugprogramMule soft debugprogram
Mule soft debugprogramabhipokharna
 
Reverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsReverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsEran Goldstein
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of ckinish kumar
 
Sure Outputs
Sure OutputsSure Outputs
Sure OutputsSAP Sure
 
Language Translator Magento 2 Extension
Language Translator Magento 2 ExtensionLanguage Translator Magento 2 Extension
Language Translator Magento 2 ExtensionBiztech Store
 
Contact management system
Contact management systemContact management system
Contact management systemSHARDA SHARAN
 
Modularisation techniques new
Modularisation techniques newModularisation techniques new
Modularisation techniques newJeet Thombare
 
A View of MPC Control from Operations to Design
A View of MPC Control from Operations to DesignA View of MPC Control from Operations to Design
A View of MPC Control from Operations to DesignJim Cahill
 
AVB201.1 Microsoft Access VBA Module 1
AVB201.1 Microsoft Access VBA Module 1AVB201.1 Microsoft Access VBA Module 1
AVB201.1 Microsoft Access VBA Module 1Dan D'Urso
 
CSO Laboratory Manual
CSO Laboratory ManualCSO Laboratory Manual
CSO Laboratory ManualDwight Sabio
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfNALANDACSCCENTRE
 
Testing level
Testing levelTesting level
Testing levelzahid7578
 

Similar to Basic Debugging (20)

Magento 2 Language Translator Extension
Magento 2 Language Translator ExtensionMagento 2 Language Translator Extension
Magento 2 Language Translator Extension
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
Debug tool
Debug toolDebug tool
Debug tool
 
Debugging programs with Keil uVision
Debugging programs with Keil uVisionDebugging programs with Keil uVision
Debugging programs with Keil uVision
 
Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessor
 
Mule soft debugprogram
Mule soft debugprogramMule soft debugprogram
Mule soft debugprogram
 
Reverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsReverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentals
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
 
Sure Outputs
Sure OutputsSure Outputs
Sure Outputs
 
Interactive debugging system
Interactive debugging systemInteractive debugging system
Interactive debugging system
 
Vb%20 tutorial
Vb%20 tutorialVb%20 tutorial
Vb%20 tutorial
 
Language Translator Magento 2 Extension
Language Translator Magento 2 ExtensionLanguage Translator Magento 2 Extension
Language Translator Magento 2 Extension
 
Contact management system
Contact management systemContact management system
Contact management system
 
Modularisation techniques new
Modularisation techniques newModularisation techniques new
Modularisation techniques new
 
A View of MPC Control from Operations to Design
A View of MPC Control from Operations to DesignA View of MPC Control from Operations to Design
A View of MPC Control from Operations to Design
 
AVB201.1 Microsoft Access VBA Module 1
AVB201.1 Microsoft Access VBA Module 1AVB201.1 Microsoft Access VBA Module 1
AVB201.1 Microsoft Access VBA Module 1
 
CSO Laboratory Manual
CSO Laboratory ManualCSO Laboratory Manual
CSO Laboratory Manual
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
 
Testing level
Testing levelTesting level
Testing level
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Basic Debugging

  • 1. Starting abap debugging 1. Putting /H in command box and hitting execute button 2. Setting breakpoint in program. Difference among F5 , F6 ,F7 and F8 F5: debug in single step (line by line) F6: Skips Subroutines/FM Whenever a control encounters a subroutine or FM debug them unlike F5 F7: controls return to main program from Subroutines & FM F8: executes program until next break point. Breakpoint Types 1. Debugger breakpoint: When you set a breakpoint in the Debugger, it is created as a debugger breakpoint by default. A debugger breakpoint is only valid while the Debugger instance, in which it was set, is active. When the Debugger is closed, all debugger breakpoints set in it are deleted. 2. Session breakpoint: If you set a breakpoint in the ABAP Editor, for example, this breakpoint is a session breakpoint. Session breakpoints remain active independently of the existence of a Debugger and are valid for all external sessions of a logon. Within the Debugger, you can convert a debugger breakpoint into a session breakpoint and vice versa. If the setting Session Breakpoints Active Immediately is checked (via Utilities → Settings → ABAP Editor → Debugging in the ABAP Editor or Object Navigator), you can set a session breakpoint in an external session of a logon to force a running program into the Debugger that runs in the same logon (for example, in an external session) and will process the point at which the session breakpoint was set. 3. User breakpoints: User breakpoints (previously known as external breakpoints) are valid for all user logons on the current server of the current system. User breakpoints are specifically required when debugging BSP or Web Dynpro applications. In these cases, you do not log on using the SAP GUI but via a browser, for example. Therefore, any breakpoints must be set before logging on. User breakpoints are only valid for a period of 2 hours. As of Release 7.00, user breakpoints set for BSP or Web Dynpro applications are also valid for SAP GUI logons.
  • 2. Within the Debugger, you can convert debugger or session breakpoints into user breakpoints and vice versa. We can create maximum 30 breakpoints only. System Debugging If you set this option, the Debugger is also activated for system programs (programs with status S in their program attributes). When you save breakpoints, the System Debugging setting is also saved. 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 you can display and debug them after the COMMIT WORK.
  • 3. Remote abap debugging 1. Open the Function module/ Proxy class and set an external break-point. Execute the transaction code “SRDEBUG” (Note: this tcode is available only in ECC 6.0 system onwards) Click on the button Activate Debugging. A pop-up screen will be opened. Fill the User-ID with which break-point has been set. (The same user-id should be used as authentication data in the XI while creating RFC communication channel). Select the radio buttons “all Appl. Servers” and “External breakpoints already set”. Click on OK.
  • 4. Another pop-up will be opened with a message “End debugging?” Leave the pop-up as it is. (Don’t close the transaction). When you run transaction in source system debugger will start in target system where SRDEBUG transaction is set
  • 5. 2. For example we are calling an RFC enabled FM in ECC system from CRM system. Scenario 1: Calling a custom RFC FM 1: Add an infinite loop in the remote custom Function Module (adding a “DO. ENDDO.” statement at the start of the FM would be enough). 2: Execute your program in the CRM system. The execution stops at the RFC call, because of the infinite loop. 3: login to the ECC system and go to transaction SM50. Select the process which is executing the RFC and navigate to the menu: “Program/Session->Program->Debugging” this triggers the debugger Session in a separate window. Scenario 2: Calling a Standard RFC FM When we are debugging a standard program we cannot add the infinite loop, hence we cannot go to SM50 and debug the work process. The RFC destination for the ECC system has a User specified, the RFC function module gets executed using this users credentials. Usually the basis team set up the RFC user as non Dialog user, this does not allow debugging. Contact your Basis team and get this changed to a dialog user enabling you to debug RFC function calls via the normal debugger. Debugging a Popup Window Sometimes we might want to start debugging from a popup window / information message, in this case we cannot type "/h" as the “OK Code” box is not available. Method 1: From any SAP windows press the “Customize Local Layout” button (Alt + F12) and select “Create Shortcut…” Select system command in Type and and put /h in Command Provide desktop in location and click on finish. A file is generated on your desktop. Now drag the file onto the popup window / information message or click on file and debugging is enabled!
  • 6. Method 2: For this create a text file with .SAP extension on your desktop, and type the below lines into the file:
  • 7. [System] Name= ECD Description= ECD [host.com] Client=100 [User] Name= Username Language=EN [Function] Title= Command=/H Type=SystemCommand [Configuration] WorkDir=C:Documents and SettingsJohnSapWorkDir [Options] Reuse=1 Debugging background job 1. To debug active background process Go to the transaction SM37 and select the background job (with job status ‘Active’) that you want to debug. Now select ‘Capture: active job’ from menu ‘Job’, 2. Also you can do the same from transaction SM50. Select the work process where this job is running and then choose the menu path Program/ModeProgramDebugging. 3. To debug completed background process select job in SM37 and write 'JDBG' in command prompt and press enter. You will be in debug mode. Press F7 couple of time until you get into the code.
  • 8. Watchpoints Watchpoints allow you the option of monitoring the content of individual variables. The Debugger stops as soon as the value of the monitored variable changes. In addition, conditions can be specified. The Debugger also checks whether such a condition is fulfilled. Like a breakpoint, a watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program. You can only define watchpoints in the Debugger. Use You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program. We can create maximum 24 watchpoints in a session Creating a Watchpoint In the toolbar of the New Debugger, you will find the pushbutton Create Watchpoint . It brings you to the dialog box Create Watchpoint. Using this function, you can enter the variable to be monitored. All possible ABAP data structures are allowed here.
  • 9. Watchpoint is reached After you have created the watchpoint, the value of the variable will be monitored. As soon as a change is found in the content of the variable after a Debug step and any conditions set have been met, the Debugger will stop and you see the message "Watchpoint is reached (<Watchpointvariable>)“. In the Breakpoints tool (desktop Breakpoints/Watchpoints / Tab Watchpoints), you can view this reached watchpoint in detail. The reached watchpoint is marked with a yellow arrow. The old and the new values of the watchpoint variable are at your disposal. In addition, you can use the pushbutton Compare Variables ( ) to determine the differences between the old and the new variable. In addition, you can maintain the watchpoint in this view – that is change, activate, deactivate, or delete it. Validity Area for Watchpoints In contrast to breakpoints, watchpoints are only valid locally in the roll area. If a roll area changes, none of the watchpoints defined in the underlying roll area are visible. Also, watchpoints that were created in the New ABAP Debugger cannot be used further in the Classic Debugger (for example, after changing the Debugger) and vice versa.
  • 10. To debug script: Execute the report RSTXDBUG to activate the script debugger. OR Goto SE71 and give your form name and go to Utilities-->Active De-bugger. To debug Smart form: 1. One way to debug smart form is to debug the Function Module of that smart form. Within PERFORM %GLOBAL_INIT node level coding can be found. 2. If you want to debug particular smart form node that the solution would be, insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. 3. SFTRACE can be used for debugging SMARTFORMS. Go to tcode SFTRACE / SMARTFORM_TRACE --> click "trace on" and click checkboxes Warning/Error under abap breakpoints tab. So whenever you call the smart forms, it will stop at this breakpoint and you can debug onwards