Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP Database Accesses →  Open SQL →  Open SQL - Overview →  Open SQL - SAP Buffering →  SAP Buffer - Buffering Types 

SAP Buffer - Generic Buffering

When a read is performed on a row, all rows are loaded into the SAP buffer that match this row in a left-aligned part of the primary key. The number of key fields covered is specified in the definition and is always less than the total number of key fields. Together, these key fields are the generic key.

The individual generic areas are handled like standalone tables or views whose primary key is the generic key and that are fully buffered.

If a fully specified generic key is used to access an unbuffered row in Open SQL, an attempt is made to load the area. If the row is not found, this is noted in the buffer and the database is not accessed again the next time a row is accessed using a fully specified generic key.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • In a generically buffered table or view, access to nonexistent data is very fast (see Buffer Management).

  • When using generic buffering, any Open SQL statements must respect the generic key to prevent them from bypassing SAP buffering.

  • Generic buffering should be used if usually only certain areas of the table or view are required. These areas should not be too small, to prevent too many of them from being created and overloading buffer management. They should also not be too big, to prevent too much data from being loaded. Full buffering may also be more efficient in some cases. Accordingly, the generic key must not cover too many or too few fields.

Example

One good application of generic buffering are language-dependent tables that have the language code field as a generic key.