abap debugging techniques.ppt
TRANSCRIPT
-
7/30/2019 ABAP Debugging Techniques.ppt
1/23
ABAP Debugging Techniques
Presented by : Rafeeq Sheikh
-
7/30/2019 ABAP Debugging Techniques.ppt
2/23
Table of Contents
Need for Debugging .
Debugging requirement. .....
Initial Set Up .....
Debugging Types. .
Debugging Screen. .....
Single Dimensional structure ..
Two Dimensional structure. .
System Variables. .
Break Point. .
Watch Point. .
Termination of Batch Job .
Background Job Overview .
Dump Analysis .
Error List .
Runtime Analysis .
-
7/30/2019 ABAP Debugging Techniques.ppt
3/23
Need for Debugging
-
7/30/2019 ABAP Debugging Techniques.ppt
4/23
Need for Debugging
Problem Type Tool
Starting point for analyzing a
crashed program/ background job
System Log (SM21)
Runtime Error ABAP Dump Analysis (ST22)
Unexpected Program behavior ABAP Runtime Analysis (SE30)
Finding specific statement,
function, method
ABAP Runtime Analysis (SE30)
Performance problem ABAP Runtime Analysis (SE30)
SQL Trace (ST05)
Screen Processing Screen Trace (ST20)
Detailed error analysis source
code level
ABAP Debugger
-
7/30/2019 ABAP Debugging Techniques.ppt
5/23
Debugging Requirement
-
7/30/2019 ABAP Debugging Techniques.ppt
6/23
Debugging requirement
Report.
Function Module
User Exit
Screens Module Pool Program.
Standards Programs.
Background Jobs.
-
7/30/2019 ABAP Debugging Techniques.ppt
7/23
Debugging - Report
-
7/30/2019 ABAP Debugging Techniques.ppt
8/23
USAGE
Change field values at Runtime, of variable or ITab field
for manipulating the logic flow.
Skip record counts within a loop and arrive at particular
iteration of concern.
To directly pinpoint to a field value of Internal Table.
Check for proper Data retrieval and Logic flow.
-
7/30/2019 ABAP Debugging Techniques.ppt
9/23
Initial Set Up
Identify relevant variable to locate appropriate point in codeto start debugging.
Menu Bar Utilities Breakpoint Set.
Enter /h in command line. (Optional wherein needto debug incorrect value field on first screen)
Using hard code in ABAP program BREAK-POINT
Execute.
Control switches to Debugging Mode.
-
7/30/2019 ABAP Debugging Techniques.ppt
10/23
Single Step (F5): Control passes through eachexecutable statement.
Execute (F6): Control overruns through each
Subroutine, without passingthrough code within.
Return (F7): Control skips current subroutine.
Run (F8): Control runs to next debugging point or
reaches the end result of the program.
Debugging Types
-
7/30/2019 ABAP Debugging Techniques.ppt
11/23
Debugging Screen
-
7/30/2019 ABAP Debugging Techniques.ppt
12/23
Variable/ Field: Contains data. Structure: Consists Multiple fields.
Work Area: Current line of ITab, contains multiple
fields.
Process
FIELD button -> enter name in Col Field names data
displayed in Field Contents.
Field Contents can be modified using Change button.
Single Dimensional structure
-
7/30/2019 ABAP Debugging Techniques.ppt
13/23
Internal Table: Contents of database table retrievedby ABAP code (selected fields).
Process
Tables button enter name in Internal table sectionOR double click on ITab name Table
data displayed below.
Change field contents:
double click on any ITab field leadsto Single Field Contents screen useChange button for Runtime changes
Two Dimensional structure
-
7/30/2019 ABAP Debugging Techniques.ppt
14/23
SY-SUBRC: Successful execution of previous statementSystem variable providing fruitful information, about
confirmation of retrieval statement.
sy-subrc = 0 successful retrieval of data
sy-subrc 0 unsuccessful retrieval of data
SY-TABIX: Current line number of internal table.
SY-DBCNT: Total No of lines processed.
System Variables
-
7/30/2019 ABAP Debugging Techniques.ppt
15/23
Break Point is set within a loop with 10,000 iterations.
Interested to know about processing for 900th iteration.
Executing F8 until then is time consuming, instead use
Break Point feature.
Features:
Skip record counts within a loop.
Specify the record number for processing to be checked.
Break Point
-
7/30/2019 ABAP Debugging Techniques.ppt
16/23
To directly pinpoint a field of Internal Table havingparticular value.
Can be placed for any field of Internal table.
Features:
Comparison Operator.
Comparison Field Value.
Logical Operator.
Local/ Global data.
Watch Point
-
7/30/2019 ABAP Debugging Techniques.ppt
17/23
Debugging Background Job
-
7/30/2019 ABAP Debugging Techniques.ppt
18/23
Termination of Batch Job
Transaction for Batch Job: SM37
Execute for given User.
Identify particular Job from the displayed list of Jobs.
Check for Job Log.
For the erroneous Message Text note the MessageNumber and Class.
Identify the actual message text using SE91.
-
7/30/2019 ABAP Debugging Techniques.ppt
19/23
Background Job Overview
-
7/30/2019 ABAP Debugging Techniques.ppt
20/23
-
7/30/2019 ABAP Debugging Techniques.ppt
21/23
Dump Analysis
Transaction : ST22
Execute for given User/ Program/ Date.
Provides list of errors for given selection.
Selection of particular error gives the Runtime ErrorDescription.
-
7/30/2019 ABAP Debugging Techniques.ppt
22/23
List of Errors for given User
-
7/30/2019 ABAP Debugging Techniques.ppt
23/23
Runtime Error