Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Buffer trace lists only parameters of executed SQL stmts

Former Member
0 Kudos


I use SAP 4.6c.

When I switch on the buffer trace and list the results, I can see a column called 'statement'. In this column, only the parameters of the SQL Query are listed. I can not see to which key fields or attributes of the table the parameters match to.

It is possible to save the trace as a file and extract all OPEN stmts and READ SINGLE stmts (with Excel for example). Thus I get all parameters of executed stmts on buffered tables. But I do not know to which attributes or key fields of the WHERE clause targeted with the parameters...

What I would like to have is one list with all executed SQL stmts on buffered tables. I would like to reuse the stmts for simulation purposes.

Does anybody know how to get this?




Former Member
0 Kudos

You can filter the list to see only OPEN / READ SI .

When you press dispaly trace , just select operations

"OPEN" and "READ SI" in the select option.

However you cannot download the underlying select statement for the individual lines on the list.

This you will have to do manually.


0 Kudos


if I would like to reuse the stmts, I can not see the fields of the primary key of the corresponding table. These are not provided in the buffer trace view. But in the column "statement" the parameters are shown. The first parameter matches to the first field of the primary key. All following parameters (if shown in the stmt column) refer on the next fields of the primary key.

Is it possible to reconstruct an sql stmt by this...

select * from tab where key1 EQ 'param1' and key2 EQ 'param2' ....

SO without the knowledge of the key fields, can I use something like key1 and key2 etc in the reconstructed sql stmt instead?

Former Member
0 Kudos

You cannot write an SQL like Key1 . key2 , you will have to specify the field names .

What you are trying to achieve can be done , but you will have to write program for this to genearte the kind of Sql statements you want by reading the key fields from dictionary and accordingly generating the SQL statement .

0 Kudos the only possibilty is to take a look at each table to see which the primary key fields are.

btw. what do the numbers in the stmt mean. a stmt looks like this

'P 44 param1 param2 ... '

0 Kudos

Hello Holger!

To get an explanation for the statement column, press Details (F2). It's the total key length.

But your approach won't work.

I'm sure, it's possible to buffer non-primary-key selects, too. In the buffer trace (overview list), only the translation into primary key access is shown (because that is the way the buffer is organized).

If you want to reproduce the SQL-statements, which where used, then you have to go for the 'display in ABAP' (F5) approach.

Have a look in the old posting for making a report for this analysis.