Debugging
ABAP Debugger
Runtime Analysis
Runtime Measurement of Program Segments
BREAK-POINT
Basic form
BREAK-POINT.
Additions:
1. ... f
2. ... AT NEXT APPLICATION STATEMENT
Effect
The BREAK-POINT is a debugging aid. When you run a program normally, it is interrupted at the statement, and the system automatically starts the debugger, allowing you to display the contents of any fields in the program and check how the program continues.
If the program is running in the background or in an update task, the system generates a Syslog message.
Note
• If a COMMIT WORK statement occurs in a SELECT loop, the database cursor is lost. This causes a runtime error in the next loop pass when the system tries to read the next line of the table.
Since debugging sometimes generates automatic COMMIT WORKs (non-production client or not debugging in debugging mode), it can be difficult to debug SELECT loops because BREAK-POINT statements within the loop can so easily lead to runtime errors.
• You can set dynamic breakpoints in the Debugger without having to change the ABAP program. Such breakpoints are only valid for the user that set them, and are deleted when the user logs off.
Addition 1
... f
Effect
If the program is not running in dialog mode (background, update task), the contents of field f are output along with the system log message.
Addition 2
... AT NEXT APPLICATION STATEMENT
Note
This addition is for internal use only.
Changes and further developments, which may be incompatible, are possible at any time, and without notice or warning.
Effect
This statement is only relevant to system programs (program attributes, status "S"), or system modules, subroutines, or function modules (names begin with "%_")
If system debugging is not switched on, the program is not interrupted until it reaches a statement that is not in a system program (or module, subroutine, or function module).
If system debugging is switched on, the program is interrupted at the statement itself.
Note
When system debugging is switched off, BREAK-POINT statements in system programs are ignored at runtime unless you use the AT NEXT APPLICATION STATEMENT addition.
GET RUN TIME FIELD
Basic form 5
GET RUN TIME FIELD f.
Effect
Relative runtime in microseconds. When you first call GET RUN TIME, the field f is set to zero (initialized). Each subsequent call places the runtime since the first call into the field f. f must have type I.
The ABAP statements between two GET RUN TIME statements are known as the performance section, and the time between the two calls is known as the measurement interval.
Notes
You can use SET RUN TIME CLOCK RESOLUTION to set the measurement accuracy. The default setting is high accuracy.
Example
Runtime measurement for the MOVE statement
DATA: T1 TYPE I,
T2 TYPE I,
TMIN TYPE I.
DATA: F1(4000), F2 LIKE F1.
TMIN = 1000000.
DO 10 TIMES.
GET RUN TIME FIELD T1.
MOVE F1 TO F2.
GET RUN TIME FIELD T2.
T2 = T2 - T1.
IF T2 < tmin =" T2."> Interval...').
Variant 1
SET RUN TIME CLOCK RESOLUTION HIGH.
Effect
GET RUN TIME uses high accuracy with a short measurement interval to measure the runtime.
Variant 2
SET RUN TIME CLOCK RESOLUTION LOW.
Effect
GET RUN TIME uses low accuracy with a long measurement interval to measure the runtime.
Note
Runtime errors:
• SET_RUN_TIME_CLOCK_ERROR : After GET RUN TIME, you may no longer use SET RUN TIME CLOCK RESOLUTION.
SET RUN TIME ANALYZER ON/OFF
Variants:
1. SET RUN TIME ANALYZER ON.
2. SET RUN TIME ANALYZER OFF.
Effect
These statements only work if you are executing a program using runtime analysis. If you select the Particular units option, the system only measures the statements that occur between SET RUN TIME ANALYZER ON and SET RUN TIME ANALYZER OFF.
Note
You should remove these statements from your source code when you have finished measuring runtime. This ensures that other users can define their own runtime monitoring criteria as well.
Variant 1
SET RUN TIME ANALYZER ON.
Effect
Starts writing performance data.
The return code is set as follows:
SY-SUBRC = 1:
The runtime analysis is not active, or the performance data file is not open for writing.
SY-SUBRC = 0:
All other cases.
Variant 2
SET RUN TIME ANALYZER OFF.
Effect
Stops writing performance data.
Example
DO 3 TIMES.
PERFORM NOT_TO_BE_MEASURED.
SET RUN TIME ANALYZER ON.
PERFORM TO_BE_MEASURED.
SET RUN TIME ANALYZER OFF.
PERFORM NOT_TO_BE_MEASURED.
ENDDO.
FORM NOT_TO_BE_MEASURED. ENDFORM.
FORM TO_BE_MEASURED. ENDFORM.
Note
You can also start and stop measurement dynamically:
1. From the menu:
• System → Utilities → Runtime analysis → Switch on
• System → Utilities → Runtime analysis → Switch off
1. In the command field
• /RON
• /ROFF
Saturday, October 11, 2008
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2008
(167)
-
▼
October
(145)
- SAP ALE ABAP DETIAL
- SAP ABAP ALE IDOC'S
- SAP - DIFFERENCE BETWEEN CONVERSION AND INTERFACE
- BAPI AND IDOC ALE
- SAP ABAP MESSAGE CONTORL
- SAP IDOC'S IN ABAP INTRODUCTION
- SAP ABAP IDOC'S OUTLOOK
- SAP ABAP IDOC PROCESSING
- SAP ABAP IDOC'S BASIC TOOLS I
- SAP ABAP IDOC'S BASIC TOOLS II
- SAP ABAP IDOC'S INBOUND BASIC TOOLS III
- SAP IDOC OUT BOUND TRIGGERS II
- SAP IDOCS OUTBOUND TRIGGER II
- SAP IDOC'S OUTBOUND TRIGGER III
- SAP Work flow based outbound Idoc's
- SAP ALE Change Pointers
- SAP Dispatching ALE IDocs for Change Pointers
- SAP IDOC design and Processing
- SAP Creation of the IDoc Data
- SAP Developing an Outbound IDoc Function
- SAP Converting Data into IDoc Segment Format
- SAP Partner Profiles and Ports
- SAP Defining the partner profile for ALE IDOC
- SAP Data Ports ( WE21 ) in idoc
- SAP RFC in R/3
- SAP Workflow from Change Documents
- SAP ALE Distribution Scenario
- SAP Useful ALE Transaction Codes
- BAPI Creating IDocs and ALE Interface
- R/3 RFC from MS Office Via Visual Basic
- SD WORK FLOW SCENARIOS I
- SD WORK FLOW SCENARIOS II
- SD WORK FLOW SCENARIOS III
- SD WORK FLOW SCENARIOS IV
- SD WORK FLOW SCENARIOS V
- SD WORK FLOW SCENARIOS VI
- SD WORK FLOW SCENARIOS VII
- MM WORK FLOW SCENORIOS I
- MM WORK FLOW SCENORIOS II
- MM WORK FLOW SCENORIOS III
- MM WORK FLOW SCENORIOS IV
- MM WORK FLOW SCENORIOS V
- MM WORK FLOW SCENORIOS VI
- MM WORK FLOW SCENARIOS VII
- MM WORK FLOW SCENARIOS VIII
- MM WORK FLOW SCENARIOS IX
- MM WORK FLOW SCENARIOS X
- MM WORK FLOW SCENARIOS XI
- WORK FLOW SCENARIOS in SAP ABAP
- SAP ABAP WORK FLOW I
- SAP ABAP WORK FLOW II
- SAP ABAP WORK FLOW III
- SAP ABAP Work Flow IV
- SAP ABAP Workflow Technology
- SAP OPTIMIZATION
- abap type key ward
- PERFORMENCE TIPS
- SAP ABAP INTERNAL TABLES IN BRIEF
- SAP ABAP RUN TIME ANALASIS
- MEMORY In SAP ABAP
- NAVIGATION In SAP ABAP
- WORK BENCH AND TOOLS In SAP ABAP
- DATA OBJECTS AND STATEMENTS In SAP ABAP
- INTERNAL PROGRAM MODULARIZATION In SAP ABAP
- SAP ABAP CONSITENCEY THROUGH INPUT CHECKS
- RUN TIME ENVIRONMENT In SAP ABAP
- SAP ABAP INTER TABLE OPERATIONS
- STATEMENTS In SAP ABAP
- SAP ABAP INTERNAL TABLES
- SAP ABAP SUB ROUTIENS
- SAP ABAP FUNCTION MODULES AND GROUPS
- SAP ABAP QUARY ADMINSTRATION
- SAP ABAP SAVING LISTS AND BACK GROUND PROCESSING
- SAP ABAP PROGRAM INTERFACE
- SAP ABAP LOCK CONCEPT
- SAP ABAP AUTHORISATION CHECKS
- SAP ABAP PERFORMENCE TIPS
- In SAP SYSTEM FIELDS
- SAP ABAP CONTROL BLOCKS
- SAP ABAP BUFFERING
- SAP ABAP MATCH CODE OBJECTS
- SAP ABAP LOCKS
- SAP SAMPLE CODE FOR OUTPUT TO EXCEL AND IN PUT FIL...
- SAP MULTIPLE INTERACTIVE REPORT SAMPLE CODE
- MULTIPLE INTERACTIVE REPORT SAMPLE CODE II
- CALLING PROGRAM AND PASSING DATA
- SAP TECHNIQUES FOR LIST CREATION AND SAP QUARY
- SAP SELECTION SCREENS ABAP REPORT
- SAP ABAP FAQ ON SCRIPTS I
- SAP ABAP FAQ ON SCRIPTS II
- SAP ABAP FAQ ON SCRIPTS III
- IN SAP ABAP TABLE TYPES
- SAP ABAP TYPES OF VIEWS
- SAP ABAP DATA BASE UPDATES COMPLETE
- SAP ABAP LOCK CONCEPT
- SAP ORGANIZING DATABASE UPDATES
- SAP ENHANCEMENTS TO DICTIONERY ELEMENTS
- DATA BASE DIALOG IN ABAP
- ABAP DICTIONARY I
- PERFORMANCE DURING TABLE ACCESS
-
▼
October
(145)
No comments:
Post a Comment