Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 4 of 5

The database layer

9 min

Every SAP system has exactly one database, which holds all of its data: business data for every client, customizing, the ABAP repository and dictionary, and much of the system's own administration data. For SAP S/4HANA, that database is always SAP HANA. Earlier SAP ERP releases could run on several database products; SAP S/4HANA was built for SAP HANA only.

ABAP programs and CDS viewsBusiness logic and data models; many calculations pushed down to the database
Database interfaceTranslates ABAP SQL into the database's native SQL; manages table buffering
SAP HANA databaseIn-memory, column-oriented storage for all clients' data, customizing and repository
Persistence and replicasData and log volumes on disk, backups, and system replication for high availability
The database layer from the ABAP program down to storage.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-101

The database interface

ABAP programs do not talk to SAP HANA directly. Each work process contains a database interface that translates the program's ABAP SQL into the database's native SQL, adds the client automatically for client-specific tables, and serves frequently read, rarely changed tables from table buffers in the application server's memory. Automatic client handling is why a user in client 100 never sees client 200's data, even though both live in the same tables.

What SAP HANA changes

SAP HANA keeps data in memory and, for most business tables, stores it by column rather than by row. That makes aggregations and scans across large volumes fast, which is why SAP S/4HANA could simplify its data model, for example by bringing finance postings together in the universal journal instead of maintaining many separate totals tables. It also changed how ABAP is written: modern SAP code pushes calculations down into the database through core data services (CDS) views rather than reading large volumes into the application server and calculating there.

AspectOlder SAP ERP on other databasesSAP S/4HANA on SAP HANA
Database choiceSeveral supported database productsSAP HANA only
StorageMostly row-based, disk-orientedIn-memory, mostly column-based
Totals and aggregatesMany redundant totals and index tablesFewer aggregates; calculated on the fly
Where logic runsMostly on the application serverIncreasingly pushed down to the database (CDS views)
Sizing driverDisk space and CPUMemory size of the data, plus CPU
What moving to SAP HANA changed in the database layer.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-101

Why administrators and testers care

  • Sizing and data volume: SAP HANA memory is sized to the data, so volume decisions (archiving, history in a migration) have direct cost.
  • Backups and recovery: the database is where everything lives; backup and log settings determine how much data could be lost.
  • System copies and refreshes: refreshing QAS from production is essentially a database copy plus post-processing, which is why it overwrites all clients in the target system.
  • Performance testing: results depend on realistic data volumes; a test on a nearly empty database says little about production.
  • High availability: SAP HANA system replication keeps a secondary database ready to take over.
  1. Request a refreshTest lead asks to refresh CMQ from production before a regression cycle
  2. Copy the databaseProduction database copied into CMQ: all clients overwritten
  3. Post-processingSystem settings, RFC destinations, interfaces and users adjusted so CMQ does not act like production
  4. Re-apply in-flight transportsChanges not yet in production imported again
  5. Release for testingTest data rebuilt; cycle starts
A system refresh seen from the database layer. Because it copies the whole database, every client in the target is replaced.
The Sign-Off Table · thesignofftable.com/academy/sap-bas-101

What would you do?

Priya asks Basis to refresh only test client 100 in CMQ from production and leave training client 200 untouched. Basis proposes a full system copy. What is the issue?

Key points
  • Every SAP system has one database; for SAP S/4HANA it is always SAP HANA.
  • The database interface translates ABAP SQL, adds the client automatically and manages table buffers.
  • SAP HANA is in-memory and mostly columnar, enabling a simpler data model and code pushdown with CDS views.
  • Sizing, backups, refreshes, performance testing and high availability all depend on the database layer.

Check your understanding · not graded

Lesson check

  1. 1. In SAP S/4HANA, the database is:

  2. 2. What adds the client automatically to database access for client-specific tables?

  3. 3. Why does a database-level refresh of CMQ affect every client?

  4. 4. What does code pushdown with CDS views mean?