ABAP Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Open SQL → Open SQL - Overview → Open SQL - SAP Buffering
SAP Buffer - Restrictions
Only transparent tables and pooled tables can be buffered. Buffering is not possible for cluster tables. There is no special restriction of the key length of the table when buffering, which means that keys in buffered tables can be up to 900 bytes long.
The following Open SQL statements bypass the SAP buffer implicitly and access the database tables directly, since the operation in question can only be executed on the database and not in the SAP buffer:
SELECTwith the additionFOR UPDATE.
SELECTwith the additionDISTINCT,
SELECTwith aggregate expressions.
- Open SQL statement with the addition CLIENT
SPECIFIED when the client ID is not specified in a
WHEREcondition.
SELECTwithJOINexpressions.
SELECT, if theWHEREcondition compares a column with another column from a database table or database view specified afterFROM.
- Access to a table or view with individual record buffering without specifying (in the
WHEREcondition) all the equality conditions joined byANDfor all the key fields of the primary key.
- Access to a generically buffered area without complete specification of equality conditions joined
by
ANDin aWHEREcondition.
- Open SQL statements with
IS [NOT] NULLin the additionsWHEREandHAVING.
- Use of a subquery in a
WHEREcondition.
SELECTwith FOR ALL ENTRIES in accesses to a table or view with generic buffering if the requirement to specify the generic area exactly (as specified above) is violated. The condition afterFOR ALL ENTRIEScannot produce anORrelationship between multiple generic areas.
SELECTwith the additionGROUP BY,
SELECTwith the addition ORDER BY, if individual columns are specified as the sort key, and these columns are not a left-aligned subset of the primary key in the correct order.
- After the invalidation of an entry in the buffer using a write statement, the next five reads that should have accessed the entry bypass the buffer of the current application server by default. The next read performed on the changed entry reloads it into the buffer and removes the invalidation. The number of reads that bypass the buffer before the reload is specified in the profile parameter zcsa/sync_reload_c.
Other versions:
7.31 | 7.40 | 7.54
Note
Bypassing the SAP buffer using the additions above should be noted for access to buffered database tables
or views for performance reasons. To bypass the SAP buffer in the statement SELECT
explicitly, the addition BYPASSING BUFFER should always be used. It is not enough to rely on the implicit behavior of the additions above.