Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing External Data →  ABAP Database Access →  ABAP SQL →  ABAP SQL - Overview →  ABAP SQL - Table Buffering →  Table Buffering - Buffering Types 

Table Buffering - Generic Buffering

When a read is performed on a row, all rows are loaded into the table buffer that match this row in a left-justified 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 through ABAP 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 ABAP SQL statements must respect the generic key to prevent them from bypassing table 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.