Visit the SAP Forum

Languages : English | Dutch | French | Portugese | Italian



INTERVIEW EBOOK
Get 30,000 Interview Questions & Answers in an eBook.

Interview Success Kit - Get Success in Job Interviews



Send your Resume to 6000 Companies
START YOUR WEBSITE
India's Best Web Hosting Company

Analyzing Trace Records


Home »SQL Trace Tool »Analyzing Trace Records


A D V E R T I S E M E N T

S A P - R E S O U R C E S


Get Free SAP Resources:

Are you looking for:
  • SAP Jobs
  • Free SAP eBooks
  • SAP Softwares
  • SAP Tutorials
  • ERP Implementation Examples
Enter Email Address:
(Enter your email address above and we will instantly send you the download link to you, when you confirm your email.)
Search SAP Resources:

Analyzing Trace Records

Prerequisites

You have displayed the trace records that you want to analyze in a basic or extended list.

Functions

Sorting the Trace List and the Extended Trace List

You can sort the list by any of the parameters in the list heading, that is, transaction name, process identification number, process type, client, and user name. To sort the list, position the cursor on the relevant column and choose the pushbutton Sort or the appropriate menu option.



Switching from the Trace List to the Extended Trace List

To switch from the basic simple list to the extended list, choose the pushbutton Extended List or choose the appropriate menu option.

Detailed Display and Replacing Placeholders

When the logged statement is formatted, you can specify whether to replace the placeholders in the statement by the current variables or leave them in the statement and list the variables separately. If there are no variables, the two display forms are identical. To display the statement, double-click its short form or the menu option Detail, or click the magnifying glass icon.


To replace the placeholders with the current variables, choose the pushbutton Replace Placeholder in the SQL Statement, or choose the appropriate menu option.

Displaying Information about DDIC Objects

If you wish to look at the Dictionary description for the object (table or lock object) to which the statement refers, position the cursor on the object and choose DDIC info. Alternatively, you can choose the same function from the menu. If the current statement contains several DDIC object (for example, a join), the Object Name row contains the first object to appear in the statement.


If the log entry is an RFC entry, the column contains a shortened version of the name of the instance on which the function module is executed. In this case, you cannot display a Dictionary definition.

You can display further DDIC Dictionary information by opening the actual definition of the object in the DDIC. For more information, refer to Finding Dictionary Information.

Execution Plan for SQL Statements

To display the execution plan of a selected SQL statement, place the cursor on the statement and choose the pushbutton Explain SQL Statement. The SQL statements for which an execution plan can be displayed depends on the database system that you are using. The execution plan for a SELECT statement under the Oracle database system looks like this:


Execution Plan for SQL Statements
Displaying the Source Code

To switch to the ABAP source code containing the current statement in the log, position the cursor on the short form display of the statement and choose the pushbutton Display Call Positions in the ABAP Program or the menu option of the same name.


Note that the source code cannot always be displayed. For example, if the call comes from the SAP kernel, you cannot branch to the program code.

Identical Selects

When you are analyzing a trace log, it can be particularly useful to find out if there are any identical select statements. You can do this by choosing the menu option Identical selects in the menu Trace List. The system compiles a list of any SQL statements that are executed more than once. You can then eliminate any SQL statements that are repeated or superfluous.


Summarizing the Trace List

You can summarize the select statements in order to get an overview of the total execution time and the total number of records found. To do this, use the menu option Trace List->Summarize Trace by SQL Statement. You can also group the trace records by table access using the menu option Trace List->Combined Table Accesses.

Embedded SQL

One of the difficulties of connecting a programming language with an SQL interface is the transfer of retrieved data records. When the system processes an SQL statement, it does not know how big the result will be until it has made the selection. The result consists of table entries, which all have the same structure. The system has to transfer these records to the calling program in the form of a data structure, for example an array, that is known to the calling program.


The disadvantage of an array is its static definition. You have to specify the size of an array before runtime. However, because you cannot know the size of the dataset the system will return, you must define a very large array to avoid an overflow.


To circumvent this problem, the SAP System translates ABAP Open SQL statements into Embedded SQL. To do this, the system defines a cursor. The cursor is the logical connection to the selected datasets in the database and is used to regulate the data transfer between ABAP programs and the database. See also Database Operations.


During every FETCH operation, the database passes one or more data records to the database interface.

Measured Database Operations



Each SQL statement is broken down into database operations by the SAP System The SQL Trace allows you to measure the runtime of each of these operations

DECLARE

Defines a new cursor within an SAP work process and assigns the SQL statement to this. The short form of this statement is displayed in the list of the trace records under Statement. The cursor is given a unique number, the cursor ID. The cursor ID is used for communication between the SAP System and the database system.

PREPARE

Converts the SQL statement and defines the execution plan.

OPEN

Opens a cursor for a prepared (converted) SELECT statement. OPEN passes the parameters for the database access. OPEN is used only for SELECT statements.

FETCH

Passes one or several records selected from the database through the SELECT statement to the DB interface of the SAP System. The selected data is identified through the cursor.

REOPEN

Opens again a cursor that the system has prepared for a SELECT statement and passes the new parameters to the database.

EXEC

Transfer of the parameters for the statement from the database and execution of the statement that change data in the database (for example, using UPDATE, DELETE, or INSERT).

REEXEC

Opens again a cursor that the system has already prepared for a previous EXEC statement.



A D V E R T I S E M E N T

discussionDiscussion Center
Discuss
Discuss

Query

Feedback
Yahoo Groups
Y! Group
Sirfdosti Groups
Sirfdosti
Contact Us
Contact
Sign in

User Name:
Password:
Forget password? | Register


INTERVIEW EBOOK

Get 30,000 Interview Questions & Answers in an eBook.

Interview Success Kit - Get Success in Job Interviews


Send your Resume to 6000 Companies

SAP Resources

  • SAP Articles
  • SAP Books
  • SAP Certifications
  • SAP Companies
  • SAP Study Materials
  • SAP Events
  • SAP Faqs
  • SAP Jobs
  • SAP Job Consultants
  • SAP Links
  • SAP News
  • SAP Sample Papers
  • SAP Interview Questions
  • SAP Training Institutes
  •  
    SAP Tutorial

  • Introduction
  • SAP History
  • SAP Facts
  • SAP Tables
  • SAP Function
  • SAP Report
  • Reasons To Use SAP
  • SAP Landscape
  • SAP Transaction Code
  • SAP Lotus Notes Integration
  • Business Connector and XML
  • Enterprise Release 4.7

  • SAP Training Institutes

  • SAP Training Institutes
  • Job Consultants Address
  • SAP Companies Address

  • Business Process Cycle

  • Analyze
  • Design
  • Implement
  • Operate
  • Optimize
  • Skills And Education

  • Logistics Module

  • Sales and Distribution
  • Quality Management
  • Materail Management
  • Plant Maintenance
  • Financial Modules (FI/CO)
  • Project system
  • Production Planning
  • Service Management

  • SAP NetWeaver

  • Introduction
  • Object Model
  • Interoperability
  • Creating Web Apps
  • Java Connector
  • Advantages & Conclusion
  • Life Cycle Management
  • Composite Application Framework

  • SAP Tools

  • SQL Trace Tool
  • SAP CRM
  • SAP SRM
  • SAP SCM
  • SAP ERP
  • SAP BW

  • SAP Modules

  • SAP FI Module
  • SAP CO Module

  • SAP Technical

  • SAP ITS Architecture
  • Financial Management
  • Manufacturing Planning and Execution
  • Customer Order Management
  • Lackbox Processing
  • SD and Financial Accounting Integration
  • SAP - HR (Human Resource)

  • SAP Miscellanous

  • Web Application Server(WAS)
  • Data Archiving
  • Mobile Engine
  • SAP Script
  • SAP Transactions
  • SAP Business Warehouse(BW)

  • SAP Reference

  • SAP Facts
  • SAP Tables
  • SAP Function
  • SAP Report
  • SAP Landscape

  • SAP Others

  • SAP Treasury
  • SAP Finance
  • SAP WAS
  • SAP Data Archiving
  • SAP ALE
  • SAP EDI
  • SAP Exchange
  • SAP X-APPS
  • SAP Applications Components
  • SAP Software
  • Dunning
  • SAP IDES
  • SAP Payroll Basics
  • SAP BASIS and Security Authorization
  • SAP Backup
  • SAP Router

  • ABAP Tutorials

  • Introduction
  • ABAP Transaction
  • ABAP Function
  • ABAP File Processing
  • ABAP Objects
  • ABAP Syntax
  • ABAP Queries
  • SAPMail Using ABAP
  • ABAP Programming Hints

  • SAP Projects & Codes

  • Finding the user-exits
  • Purchase Order Display
  • Batch Input
  • Dynamic Open SQL
  • Creating Extract Dataset
  • Reading database tables
  • Load table from a UNIX file
  • Create subscreen

  • SAP Resources

  • SAP Books
  • SAP Links

  • Interview Question



  • Common Interview Que.
  • ABAP Interview Que.
  • ERP Interview Que.
  • HR Interview Que.
  • MM Interview Que.
  • PP Interview Que.
  • ALE Interview Que.
  • EDI Interview Que.
  • Basis Interview Questions
  • SAP-SD Interview Questions
  • FI&CO Interview Questions
  • BW Interview Questions
  • CRM Interview Questions
  • Interview Questions

  • Careers at SAP

  • Careers in SAP (SAP Jobs)
  • Advertise
  •