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

Reset or Bypass SQL Buffer ABAP Program

Former Member
0 Likes
3,067

Hi,

How to bypass or reset the use of the buffer table in an ABAP program with the purpose of evaluating their performance access. I can not change the program because it is in production.

Thanx.

Diovani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,400

Hi Diovani,

I'm not sure if you really want to mess with the table buffer for measuring the performance of a program. Normally in SAP only tables with non-volatile data are buffered, for example you shouldn't find any tables with transactional or master data that are buffered. Usually those are the larger tables that cause performance problems. So before fiddling with buffers I'd do a performance analysis of the program and then try to decide if there possibly could be an issue with buffered tables . I'm assuming that you're trying to reset the buffer in order to avoid for skewed measurements due to repeated executions, but I think there's probably not many cases where this would really matter (especially considering the average quality of ABAP programs, sigh...). So for your specific program most likely there's many other bottlenecks to be fixed before you'll arrive at buffered tables (unless it's already inefficient by accessing the buffered tables too often).

Anyhow, if all my mumble didn't deter you from resetting buffers in production for measuring performance and your traces showed that the program really is using the buffers, here's what you can do (I'd recommend though not to do this in production): Check data dictionary and see what kind of buffer is defined for the table (i.e. is it a single records buffer, generic buffer or full buffer). Log on to the application server where you want to perform your trace. Execute transaction AL12 and choose menu entry Reset Buffer --> Single Buffer for tables with single buffering and for all other tables the Generic Buffer. On the resulting popup enter the table for which you want to remove the buffer and click on the button Remove. This removes all buffered entries for the given table (which you can check via ST02).

Best wishes, harald

2 REPLIES 2
Read only

Former Member
0 Likes
2,400

Hi ,

I am giving you the SAP standrad help comments here as prescriblely :

FROM clause

Specifies the database tables from which the data in the selection in the SELECT clause is to be read.

Syntax

... FROM [<tab> [INNER]|LEFT [OUTER] JOIN] <dbtab> [AS <alias>]

[ON <cond>]

[CLIENT SPECIFIED]

[BYPASSING BUFFER]

[UP TO <n> ROWS]

You can read a single table <dbtab> or more than one table, using inner and outer joins to link tables with conditions <cond>, where <tab> is a single table or itself a join condition. You can specify individual database tables either statically or dynamically, and you can replace their names with an alternative <alias>. You can bypass automatic client handling with the CLIENT SPECIFIED addition, and SAP buffering with BYPASSING BUFFER. You can also restrict the number of lines read from the table using the UP TO <n> ROWS addition.

For More Information please see this link : using keyword in find "BYPASSING BUFFER"

Link: [http://help.sap.com/saphelp_46c/helpdata/en/87/56d00722c011d2954a0000e8353423/frameset.htm]

Regards,

Read only

Former Member
0 Likes
2,401

Hi Diovani,

I'm not sure if you really want to mess with the table buffer for measuring the performance of a program. Normally in SAP only tables with non-volatile data are buffered, for example you shouldn't find any tables with transactional or master data that are buffered. Usually those are the larger tables that cause performance problems. So before fiddling with buffers I'd do a performance analysis of the program and then try to decide if there possibly could be an issue with buffered tables . I'm assuming that you're trying to reset the buffer in order to avoid for skewed measurements due to repeated executions, but I think there's probably not many cases where this would really matter (especially considering the average quality of ABAP programs, sigh...). So for your specific program most likely there's many other bottlenecks to be fixed before you'll arrive at buffered tables (unless it's already inefficient by accessing the buffered tables too often).

Anyhow, if all my mumble didn't deter you from resetting buffers in production for measuring performance and your traces showed that the program really is using the buffers, here's what you can do (I'd recommend though not to do this in production): Check data dictionary and see what kind of buffer is defined for the table (i.e. is it a single records buffer, generic buffer or full buffer). Log on to the application server where you want to perform your trace. Execute transaction AL12 and choose menu entry Reset Buffer --> Single Buffer for tables with single buffering and for all other tables the Generic Buffer. On the resulting popup enter the table for which you want to remove the buffer and click on the button Remove. This removes all buffered entries for the given table (which you can check via ST02).

Best wishes, harald