Ansicht
Dokumentation

ABENBUFFER_RESTRICTIONS - BUFFER RESTRICTIONS

ABENBUFFER_RESTRICTIONS - BUFFER RESTRICTIONS

General Data in Customer Master   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- Restrictions

Only transparent tables can be buffered. Global temporary tables cannot be buffered. There is no special restriction on the key length of the table when buffering, which means that keys in buffered tables can be up to 900 bytes long. For database accesses using Native SQL and AMDP, the table buffer is not used in principle.

Any writes access the data in the database table directly and trigger asynchronous buffer synchronization. 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 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.

The fact that certain operations can only be performed on the database and not in the table buffer produces the further restrictions for reads listed below. If these restrictions are not respected, read statements bypass the table buffer implicitly and access the DDIC database tables, DDIC views or CDS view entities directly.

  • The following reads always bypass the table buffer:

  • No JOIN expressions can be specified.

  • The GROUP BY clause cannot be used. This also excludes the HAVING clause.

  • The ORDER BY clause cannot be used in cases where single columns are specified as sort keys and these columns are not a left-aligned subset of the primary key in the correct order or if the addition DESCENDING is specified in a column.

  • When a table or view with single record buffering is accessed, all key fields of the primary key must be listed using equality conditions joined using AND.

  • When a generically buffered area is accessed, it must be specified completely using equality conditions joined using AND.

  • Only host variables or host expressions can be used on the right side of a relational expression that is used to identify a single record or a generically buffered area. In any other relational expressions of a condition, columns can also be specified in comparisons or when BETWEEN is used. This applies in cases where neither numeric operand has the type DF16_DEC or DF34_DEC, both operands are character-like, or both operands have the type RAW with the same length.

  • No column can be compared with another column in a data source specified after FROM.

  • If FOR ALL ENTRIES is used when accessing a table or view with generic buffering, the generic area must be specified exactly, and multiple generic areas cannot be joined using OR.

  • The variant of the operator IN with an operand list on the left side cannot be used.

Notes

  • For performance reasons, the fact that the table buffer is bypassed when these restrictions are not met should always be remembered when accessing buffered tables or views.
  • To bypass the table buffer in the statement SELECT explicitly, the addition BYPASSING BUFFER should always be used. It is not enough to rely on the implicit behavior itself.
  • The prerequisites for table buffering of CDS view entities are checked as restrictions for the view itself. If a CDS view entity can be enabled for table buffering and buffering is switched on with a CDS entity buffer, there should be no reason for ABAP SQL to bypass the buffer.
  • In cases where an internal table is used as a data source of a query, the read restrictions also determine whether the table can be evaluated on the AS ABAP or whether its content needs to be transported to the database.






ABAP Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 10074 Date: 20240508 Time: 134605     sap01-206 ( 120 ms )