← SAP Clean Core Engineering Hub
GUIDE #72 Open Buffering Architect →
ARCHITECTURAL BLUEPRINT #72

SAP Clean Core Table Buffering, Single-Record & Generic Buffer Guide

Achieve sub-millisecond query performance on SAP S/4HANA application servers. Master Single-Record, Generic, and Full table buffering, DDLOG synchronization, and buffer-bypass avoidance.

📖 Production Clean Core Reference Manual

Deep architectural blueprints for SQL tuning, table buffering, and CDS optimization in The SAP Clean Core & ABAP Cloud Handbook.

Get Enterprise Suite (-80% Off: €9.80) →

1. Why Table Buffering Matters Even on SAP HANA

A common misconception in SAP S/4HANA projects is that because SAP HANA is an in-memory database, application server table buffering is obsolete. This assumption is dangerously false:

2. Buffering Types & Architectural Decision Matrix

Choose the buffering strategy based on data volume and access pattern:

  1. Single-Record Buffering (#SINGLE):
    • Best for large master data tables (e.g. > 10,000 rows) where programs access isolated records using the complete primary key.
    • Each record is loaded individually upon request.
  2. Generic Buffering (#GENERIC):
    • Best for tables organized by organizational units (e.g. Client + Company Code, or Client + Country).
    • A query matching the leading generic keys loads the entire sub-segment into memory.
  3. Full Buffering (#FULL):
    • Best for small lookup tables (< 1,000 records) accessed by multiple non-key combinations.
    • The entire table is loaded on the first SELECT.

3. Cross-Instance Invalidation via DDLOG

In a scaled-out SAP landscape with multiple application server instances (PAS and AAS), modifying a buffered table requires cache synchronization:

4. SQL Constructs That Bypass the Buffer

Developers must structure ABAP SQL carefully to avoid unintentional buffer bypasses:

" ❌ Bypasses buffer: Aggregate function
SELECT COUNT(*) FROM zclean_config INTO @DATA(lv_cnt).

" ❌ Bypasses buffer: Incomplete primary key on single-record table
SELECT SINGLE config_value FROM zclean_config WHERE company_code = '1010' INTO @DATA(val).

" ✅ Hits buffer: Full primary key provided
SELECT SINGLE config_value FROM zclean_config 
  WHERE config_id = 'TAX_RATE' AND company_code = '1010' 
  INTO @DATA(val).
Interactive Generator: Use Tool #85: SAP Clean Core Table Buffering Architect to generate CDS buffering annotations and run SQL buffer-bypass audits.

Build Scalable Enterprise SAP Systems

Get complete blueprints for performance tuning, database optimization, and Clean Core architecture in The SAP Enterprise Architecture Suite.

Get Enterprise Suite (-80% Off) → View on Amazon ($19.99) →