SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing External Data → ABAP Database Accesses → Open SQL → Open SQL - Overview →Open SQL - SAP Buffering
When accessing a database table using Open SQL, SAP buffering is usually active if it is defined for the database table in question. The definition of a database table in ABAP Dictionary determines whether and how it is buffered. There are three buffering types:
With the exception of the statements listed below, read Open SQL statements access the buffer. Modifying Open SQL statements that make modifications using work areas access the buffer of the current application server directly and invalidate the entries affected in the buffer of the other application server. Modifications using UPDATE ... SET ... WHERE ... or DELETE ... WHERE ... invalidate the entries affected in the buffers of all the application servers. The invalidation of the entries on the other application servers does not happen directly and uses a buffer synchronization that is called periodically. The time interval can be set using the profile parameter rdisp/bufreftime and has a default value of two minutes. An access to an invalidated entry of a buffer reloads the entry from the database.
You can use the addition BYPASSING BUFFER of the SELECT statement to switch off access to the buffer explicitly. As well as specifying the BYPASSING BUFFER explicitly, SAP buffering is also avoided implicitly by some variants of Open SQL statements since the corresponding operations can only be carried out in the database and not in the SAP buffer. The following Open SQL statements avoid SAP buffering implicitly and access the database table directly:
Note
The avoidance of the SAP buffer using the additions above should be noted for access to buffered data for performance reasons. To explicitly avoid the SAP buffer in the SELECT statement you should always use the BYPASSING BUFFER addition and not rely on the implicit behaviour of the additions above.