SlideShare a Scribd company logo
4
Most read
10
Most read
Debugging
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
What is Debugging? Tool used to identify and eliminate errors in ABAP programs Allows the verification of program logic in a step-by-step manner by examining the results of individual statements
Branching to Debugging Mode Program ... . Breakpoint ... . ABAP Editor ABAP  Debugger Debugging Program  B170D051 Breakpoints Object List Development object  ...  ...  ... . . . Test/execute . . . Any screen ...  ...  ...  System  Help . . . Utilities . . . . . . Debug ABAP . . . /h
Key Debugging Concepts Debugger modes Examining the value of variables Changing the value of variables Setting breakpoints Setting watchpoints Viewing contents of internal tables
The Debugging Display  ABAP Debugger Watchpoint f Z C C Table Breakpoints Watchpoints Calls Overview Settings Fields Main Program Source code of EVENT START-OF-SELECTION where matkl = c_matkl.    Loop at i_tab.    v_counter = v_counter + 1.    at new vbeln.    write:/ i_tab-vbeln color COL_HEADING.  ENDAT.  write: /10 i_tab-posnr,    i_tab-arktx.    endloop.  ZZXXXXX ZZXXXXX I_TAB-VBELN 0001234 + /
Debugging Mode
Examining the Value of Variables
Changing the Value of Variables
The Most Important Debugging Functions Single Step Execute Continue Table Breakpoint Watchpoint Return Hexadecimal display Replace Processes the next program line Allows the change of data contents during debugging Processing continues until the next breakpoint (or end of  program) is encountered Displays the contents of internal tables Displays data in hexadecimal format Interrupts the program when there is a change in a field Identifies breakpoints Executes all processing steps belonging to one statement Returns from a routine
Setting Breakpoints Menu: Keyword: Utilities -> Breakpoints BREAK-POINT Line selection  (double-click) Breakpoint pushbutton Menu: ABAP Editor Debugging Mode Breakpoint ->  Create/Delete Activate/Deactivate  Delete All Deactivate All Save Breakpoint At Create Watchpoints
Watchpoints Debugging   ..  Breakpoint  .. ABAP Debugger Watchpoint f Z C C or Create/Delete .. .. .. Create Watchpoint
Viewing Contents of Internal Tables
Exercise Exercise 7  – Use the ABAP Debugger, 20 minutes
Question and Answers Any questions?

More Related Content

DOC
Basic Debugging
PPT
Module pool programming
PDF
Abap reports
PDF
SAP ABAP data dictionary
PPTX
Sap User Exit for Functional Consultant
PDF
Sap Abap Reports
DOCX
Badis
DOCX
Field symbols
Basic Debugging
Module pool programming
Abap reports
SAP ABAP data dictionary
Sap User Exit for Functional Consultant
Sap Abap Reports
Badis
Field symbols

What's hot (20)

DOC
1000 solved questions
PDF
Abap sample code
PPT
ABAP Message, Debugging, File Transfer and Type Group
PDF
Module-Pool-Tutorial.pdf
PDF
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
PPT
Introduction to ABAP
PPTX
SAP Adobe forms
DOCX
Sap abap modularization interview questions
PDF
Smartforms interview questions with answers
PDF
Table maintenance generator and its modifications
PPTX
SAP Modularization techniques
PDF
Bapi step-by-step
PDF
Technical Overview of CDS View – SAP HANA Part I
PDF
Ebook abap-101-exercises-beginner-starting-from-scratch
PPT
Maximizing SAP ABAP Performance
PPT
Sap abap ale idoc
DOC
SAP ABAP CONSULTANT CV
PPT
User exit training
PDF
Enhancement framework the new way to enhance your abap systems
PPTX
1000 solved questions
Abap sample code
ABAP Message, Debugging, File Transfer and Type Group
Module-Pool-Tutorial.pdf
500+ SAP ABAP INTERVIEW QUESTIONS WITH ANSWERS
Introduction to ABAP
SAP Adobe forms
Sap abap modularization interview questions
Smartforms interview questions with answers
Table maintenance generator and its modifications
SAP Modularization techniques
Bapi step-by-step
Technical Overview of CDS View – SAP HANA Part I
Ebook abap-101-exercises-beginner-starting-from-scratch
Maximizing SAP ABAP Performance
Sap abap ale idoc
SAP ABAP CONSULTANT CV
User exit training
Enhancement framework the new way to enhance your abap systems
Ad

Viewers also liked (20)

PDF
SAP Web Dispatcher - Best Bits
PPT
Chapter 07 abap dictionary changes1
PPT
Chapter 01 overview of abap dictionary1
PPT
data modelling1
PPT
cardinality1
PPT
Chapter 05 adding structures1
PPT
Chapter 02 abap dictionary objects1
PPT
Chapter 04 abap dictionary tables in relational databases1
PPT
Chapter 06 abap repository information system1
PPT
Ale Idoc
PPT
Lecture02 abap on line
PDF
05 internal tables
PPT
Chapter 08 abap dictionary objects views1
PPT
Chapter 10 online help & documentation1
PPT
0104 abap dictionary
PDF
Sujith ~ cross applications
PDF
Bapi jco[1]
PPT
Chapter 03 foreign key relationships1
PPT
PPT
table maintenance generator1
SAP Web Dispatcher - Best Bits
Chapter 07 abap dictionary changes1
Chapter 01 overview of abap dictionary1
data modelling1
cardinality1
Chapter 05 adding structures1
Chapter 02 abap dictionary objects1
Chapter 04 abap dictionary tables in relational databases1
Chapter 06 abap repository information system1
Ale Idoc
Lecture02 abap on line
05 internal tables
Chapter 08 abap dictionary objects views1
Chapter 10 online help & documentation1
0104 abap dictionary
Sujith ~ cross applications
Bapi jco[1]
Chapter 03 foreign key relationships1
table maintenance generator1
Ad

Similar to 0106 debugging (18)

DOC
Abapdebuggingfrombasictoadvance 140214043218-phpapp01
PPT
INTERDUCTION TO ABAP DEBUGGING.ppt vey helpful
PPTX
Debugger Of Turbo C
PDF
debugging-for-functional-consultants_compress.pdf
PPTX
VISUAL
PPTX
Simple debugging
PPTX
Simple debugging
PDF
JavaScript - Chapter 15 - Debugging Techniques
PPT
ABAP BASICs learn the basics of ABAP-1.ppt
PPTX
Day 3 whiteboard.pptx bootcamp for SAP ABAP
PPT
Lecture05 abap on line
PPT
Abap function module help
PPT
Chapter 5 modularization & catch statement (paradiso-a45b1d's conflicted co...
PPTX
Debugging- bajju.pptx
PPTX
Matlab for diploma students(1)
PPT
Error Correction Techniques
PPT
0105 abap programming_overview
PPTX
Modularisation techniques new
Abapdebuggingfrombasictoadvance 140214043218-phpapp01
INTERDUCTION TO ABAP DEBUGGING.ppt vey helpful
Debugger Of Turbo C
debugging-for-functional-consultants_compress.pdf
VISUAL
Simple debugging
Simple debugging
JavaScript - Chapter 15 - Debugging Techniques
ABAP BASICs learn the basics of ABAP-1.ppt
Day 3 whiteboard.pptx bootcamp for SAP ABAP
Lecture05 abap on line
Abap function module help
Chapter 5 modularization & catch statement (paradiso-a45b1d's conflicted co...
Debugging- bajju.pptx
Matlab for diploma students(1)
Error Correction Techniques
0105 abap programming_overview
Modularisation techniques new

Recently uploaded (20)

PDF
Pre independence Education in Inndia.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Insiders guide to clinical Medicine.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
Cell Structure & Organelles in detailed.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Cell Types and Its function , kingdom of life
PDF
Basic Mud Logging Guide for educational purpose
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
Pre independence Education in Inndia.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Supply Chain Operations Speaking Notes -ICLT Program
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?
Sports Quiz easy sports quiz sports quiz
Insiders guide to clinical Medicine.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
TR - Agricultural Crops Production NC III.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
RMMM.pdf make it easy to upload and study
Cell Structure & Organelles in detailed.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Types and Its function , kingdom of life
Basic Mud Logging Guide for educational purpose
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial disease of the cardiovascular and lymphatic systems

0106 debugging

  • 2. 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
  • 3. What is Debugging? Tool used to identify and eliminate errors in ABAP programs Allows the verification of program logic in a step-by-step manner by examining the results of individual statements
  • 4. Branching to Debugging Mode Program ... . Breakpoint ... . ABAP Editor ABAP Debugger Debugging Program B170D051 Breakpoints Object List Development object ... ... ... . . . Test/execute . . . Any screen ... ... ... System Help . . . Utilities . . . . . . Debug ABAP . . . /h
  • 5. Key Debugging Concepts Debugger modes Examining the value of variables Changing the value of variables Setting breakpoints Setting watchpoints Viewing contents of internal tables
  • 6. The Debugging Display ABAP Debugger Watchpoint f Z C C Table Breakpoints Watchpoints Calls Overview Settings Fields Main Program Source code of EVENT START-OF-SELECTION where matkl = c_matkl. Loop at i_tab. v_counter = v_counter + 1. at new vbeln. write:/ i_tab-vbeln color COL_HEADING. ENDAT. write: /10 i_tab-posnr, i_tab-arktx. endloop. ZZXXXXX ZZXXXXX I_TAB-VBELN 0001234 + /
  • 8. Examining the Value of Variables
  • 9. Changing the Value of Variables
  • 10. The Most Important Debugging Functions Single Step Execute Continue Table Breakpoint Watchpoint Return Hexadecimal display Replace Processes the next program line Allows the change of data contents during debugging Processing continues until the next breakpoint (or end of program) is encountered Displays the contents of internal tables Displays data in hexadecimal format Interrupts the program when there is a change in a field Identifies breakpoints Executes all processing steps belonging to one statement Returns from a routine
  • 11. Setting Breakpoints Menu: Keyword: Utilities -> Breakpoints BREAK-POINT Line selection (double-click) Breakpoint pushbutton Menu: ABAP Editor Debugging Mode Breakpoint -> Create/Delete Activate/Deactivate Delete All Deactivate All Save Breakpoint At Create Watchpoints
  • 12. Watchpoints Debugging .. Breakpoint .. ABAP Debugger Watchpoint f Z C C or Create/Delete .. .. .. Create Watchpoint
  • 13. Viewing Contents of Internal Tables
  • 14. Exercise Exercise 7 – Use the ABAP Debugger, 20 minutes
  • 15. Question and Answers Any questions?

Editor's Notes

  • #4: ATS App. Prog. – ABAP Programming Module Presentations When should debugging be used? When a program is syntactically correct but has logical flaws When actual results do not match expected results When component testing a program Anytime detailed examination of source code logic is required
  • #5: Several options exist for debugging a program: Start the program using the Debugging function (from the ABAP Editor initial screen, select either the Debugging pushbutton, or via menu option Program -> Execute -> Debugging From the Repository Browser’s object list, use the menu option Development Object -> Test/Execute and then select Debugging from the pop-up dialogue box. From any screen, select Systems -> Utilities -> Debug ABAP. From any screen, type /h in the system command line and press ENTER. Set break-points in the program and execute it normally. When the break-point is encountered, the program will enter the debug mode.
  • #7: The pushbuttons across the top of the screen provide links to other debugging information and will be discussed throughout this Module. The source code window displays the statements currently being executed or may be used to scroll through the code to set breakpoints. Breakpoints are identified with a stop sign and will be discussed in detail later in this Module. The field evaluation window displays the value of selected fields.
  • #8: When entering the debugger, there is a choice of seven different views: Fields - displays the field’s content and technical characteristics Table - displays the contents of an internal table Breakpoint - interrupts a program at a given line of code. Breakpoints can be static or dynamic. Watchpoint - interrupts a program only when there is a change in the contents of a particular field or filed string. It is possible to define multiple watchpoints, attach conditions to them, and link two or more watchpoints using a relational operator. Calls - displays an active event chain and the call sequence up to the current breakpoint. The most recent active call appears at the top of the list and the previous calls appear underneath. Overview - displays the structure of the programs being debugged. This view shows the event names and event types within a program and indicates which section is currently being used. Settings - displays the different options and error handling a user has when debugging
  • #9: ATS App. Prog. – ABAP Programming Module Presentations To display the value of a particular variable, double-click on the variable, which will copy it to the field evaluation window. The variable name may also be typed directly in the Field names column of the field evaluation window.
  • #10: While executing the program in debug mode, the value of a field may be modified. Once a field has been selected and the corresponding values are displayed in the field evaluation window, the field value may be manually changed in the Field contents column. The Change pushbutton (pencil icon) should then be selected to activate the field value change.
  • #12: There are different methods of setting breakpoints for a program: ABAP Editor Position the cursor on a program line. Save the breakpoint by selecting Utilities -> Break-points -> Set Or, use the ABAP statement BREAK-POINT to set breakpoints in the program. You can set personalised breakpoints using the statement BREAK USERNAME. Debugging mode Position the cursor on a program line. Set a breakpoint with F2, double-click, or select via Break-point -> Set/ Delete. The breakpoint at function allows you to set breakpoints at strategic points in the program code. The breakpoint button displays an overview of the breakpoints that have been set within the program.
  • #13: A watchpoint is a signal within a program’s code that tells the ABAP runtime processor to interrupt a program at a particular point in the code. Watchpoints are set from the debugger. Set and remove watchpoints as needed. Watchpoints are field-specific. Use a watchpoint to observe the changes to a particular field. The debugger interrupts the program when the field’s contents change. Watchpoints can be set either locally and globally. Global watchpoints are valid in all programs that are called. Local watchpoints are only valid within a specified program. Watchpoints: Up to five watchpoints can be defined Conditional watchpoints can be defined using <, <=, =, <>, >=, > Watchpoints can be combined with AND or OR Local and global watchpoints (i.e., stop only in my program) can be set defined. Menu from Debugging mode: Watchpoint -> Create Watchpoint.
  • #14: The contents of internal tables may be displayed by selecting the Tables pushbutton at the top of the Debugging screen.