SAP Table Buffering, How Does It Work?

Something about what I wanted to write long time ago… Now it’s the time.
Single record buffering, full buffering and generic buffering.

I’ve read and read, so i found about this, which i think is very interesting and i hope to explain it to you the best way.

First, let’s start with this screen. 

As we see, we can see technical settings of the T503 table, and we realize of the Buffering type section of what we’ll talk about.

We know it exists various buffers by every SAP instance, so when data is stored in them, it isn’t necessary to access to the database, because we can directly get information from the intermediate memory or buffer, if it this option is marked :)

There are two important tables The single record table buffer (TABLP) and Generic Table Buffer (TABL), that we should know, so, the first one used in Single records buffer type and the second one used in Generic buffering and Full buffering type. 

Buffering types

- Single records buffer: Each record read from a table is saved as soon as it is using. 

  It can only use the next SQL statement, if we have all the key fields:

  SELECT SINGLE * FROM WHERE key1  = x1 AND key2  = x2  and it needn’t to access to dbtab,

  but, if we haven’t them, then the database will be accessed.

- Full buffering: The table is completely saved in the buffer, generally, it used for small tables.

- Generic buffering: The table is saved as soon as the key fields are used.  For example, in the case of t503 table, this one has No. Key Fields = 1.

This table has three keys:

If our query has the condition PERSG = ‘2′ then the buffer memory will contain only every register with PERSG = ‘2′, it depends of the key (No key fields = 1, in the screen above), but if our query has a condition with the two keys, then the buffer memory will contain only registers of that combination, as well as simultaneously queries are performed.

On the other hand, we have Buffering Tab:

- Buffering not allowed: Deactivating buffering for a table, for example if the data of a table change a lot.

- Buffering allowed but switched off: Deactivating buffering for a table. It’s possible to buffer this table, but, for reasons of performance, buffering has been deactivated, for example when a table is too large.

- Buffering switched on: Activating buffering for a table.

For more detail than seen here, you should check some SAP performance, it’s really interesing :)

comments powered by Disqus