Entering content frameBackground documentation Generic and Full Table Buffers Locate the document in its SAP Library structure

Generic table areas or full tables are managed in the generic/full table buffer TABL. The individual generic areas are managed in the buffer like autonomous, fully buffered tables.

Technical Implementation and Buffer Access

Like the single-record buffer, the generic/full table buffer has a central administration structure, a table directory and the data area.

The main difference between the generic/full buffer and the single-record buffer lies in the data area administration. The generic/full buffer divides its storage into areas (extents) of variable length. The length of an extent is a multiple of a fixed block size (256 bytes). The buffer management tries to place the contents of a generic table area or a whole table in an extent. This reduces the storage requirements for buffered data in comparison to single-record buffering.

The table names are sorted alphabetically in the table directory. The data records are transferred to the corresponding extent in one step, already sorted by the database. In a buffer access, there is first a binary search for the corresponding table name in the table directory. Then there is a binary search for the corresponding data record in the extent.

Displacement

Unlike with single-record buffering, the displacement for generic/full buffering is carried out asynchronously at certain fixed times. These times are defined dynamically depending on the number of accesses to the buffer. The time between two displacements therefore depends on the buffer utilization factor.

Data is only displaced if the free space in the buffer falls below a defined value or the access quality (that is, the number of accesses that can be satisfied directly from the buffer) is not good enough at the time of access. An attempt is made to free a certain area of the buffer. A larger number of tables is therefore displaced at certain times.

The tables accessed least frequently are displaced. The table accesses are weighted differently, depending on the time of the access. Accesses lying further in the past are weighted less than those that occurred shortly before the displacement.

This method ensures that tables which are accessed frequently at a certain time and then not used again can be displaced from the buffer after a defined time.

The individual generic areas if the buffer of generically buffered tables are treated as independent tables. Some generic areas of a table can therefore be displaced while other generic areas of the table are kept in the buffer.

The buffer is reorganized at certain intervals once the tables have been displaced, thus reducing buffer fragmentation.

Global Synchronization

The modifications made in the local buffers must be synchronized in distributed systems in order to keep the buffered data consistent. The general procedure for synchronization is described in Synchronization of Local Buffers.

The effect of various ABAP commands on the local and global synchronization of the generic/full buffer is described below.

If changes are made with WHERE conditions (UPDATE dbtab WHERE ..., DELETE FROM dbtab WHERE ...), the entire generic area or the entire table is invalidated in the buffer of the local server (server at which the command was submitted) and on all other servers at the time of synchronization.

Changes without WHERE conditions (UPDATE dbtab, INSERT dbtab, DELETE dbtab) change the corresponding records in the buffer of the local server at the time of synchronization. The entire generic area or the entire table is invalidated in the buffers of all the other servers.

Modifications with a WHERE condition therefore place a much greater load on buffer management than those without a WHERE condition.

Leaving content frame