SAP technical topicObjectCDS compatibility views in S/4HANAModuleRAP_CDS_ODATA

CDS Compatibility Views in S/4HANA

Compatibility views are SAP-delivered CDS views that replace classic transparent tables whose underlying data model changed in S/4HANA, such as BSEG over the universal journal or MSEG over the redesigned material document table. They preserve the old field structure for read access so unmodified custom code still compiles and selects correctly, but they are typically read-only, and they can perform very differently from the table they replaced under real production volume.

This page covers what a CDS compatibility view actually is underneath its familiar table name, why code that reads it in a small UAT dataset can still fail once it hits production volume or attempts a write, and how to decide whether to tolerate the compatibility layer or migrate the underlying code to a released CDS view. It is written for the moment a custom report or batch job that worked in testing breaks during a live period-end run.

Published 16 Sept 2026· 1,453 words

What it is

When SAP restructured the persistence layer for S/4HANA, several classic transparent tables lost their physical form. Financial line items moved into the single universal journal table, and material movement data moved into a single wide document table. To avoid breaking every piece of custom ABAP that ever did a direct SELECT against BSEG or MSEG, SAP renamed the underlying tables and put a CDS view in their place carrying the original table name and the original field list. From the outside, an old SELECT statement sees the same structure it always did. The structural fact that explains almost every downstream problem: this is a read-oriented compatibility shim, not a like-for-like replacement. It reproduces field values through joins, unions and case logic against the new tables, so it can be slower than the original table, it can behave differently under buffering, and in most cases it does not support INSERT, UPDATE, DELETE or MODIFY the way a real transparent table did.

When to use it

There is no scenario where a consultant deliberately designs new development against a compatibility view. It exists purely so that legacy code survives the technical conversion to S/4HANA without an immediate rewrite. The right use of the concept is diagnostic and tactical: when a custom program references a table name that has become a compatibility view, treat that as a flag to assess, not a green light to leave alone. It is acceptable to tolerate the view temporarily for low-volume, read-only, non-critical reporting while a proper fix is scheduled. It is a mistake to build new Z-reports, new interfaces, or new RAP business objects that select from the old table name on the assumption that it still behaves like a table, and it is a serious mistake to leave any write logic pointed at it, because that write will fail at runtime rather than at activation or syntax check.

How it fits the stack

Below the compatibility view sits the real S/4HANA persistence: the universal journal table for finance, the consolidated material document table for logistics, or whatever new table absorbed the old one's data. Above the compatibility view sits everything that never got rewritten: classic ABAP reports, custom function modules, older BAPIs, and any Z-code doing native SQL against the old table name. It does not supersede anything by itself; it is inserted as a bridge during the data model conversion, standing in for a table that no longer physically exists under that name. It is conceptually adjacent to, but distinct from, the released CDS view entities SAP provides for the same business data, which are properly modeled, association-aware, and intended as the actual long-term interface for new development, unlike the compatibility view which is a technical stopgap.

A worked example

A custom finance report built years before the S/4HANA conversion runs a direct SELECT against BSEG to pull open items for a reconciliation check, and a separate custom correction program occasionally does a targeted UPDATE against BSEG to fix a flagged posting flag. Both pass UAT: the reconciliation report returns correct figures against a handful of test documents, and the correction program is only exercised against one or two records by the tester. After go-live, at month-end close, the reconciliation report runs against the full year's line items and times out because the view resolving BSEG against the universal journal now does far more work per row than the old table did. In the same close cycle, the correction program fires against a batch of real postings and dumps immediately, because the compatibility view rejects the UPDATE outright. Neither failure was visible in a small, low-volume, read-light test environment; both were guaranteed by the nature of the object once the code hit production shape and production timing.

How to choose

  • Read versus write: if the custom code only selects, the compatibility view can often be tolerated short term; if it inserts, updates or deletes against the old table name, that is not a performance risk, it is a guaranteed runtime failure and must be fixed before go-live, not after.
  • Volume shape: check whether the code runs in a loop or against a full-period dataset. A single-record SELECT during UAT tells nothing about how the same view performs across a full ledger or a full posting period.
  • Tolerate versus rewrite: ask whether the released CDS view entity for the same business object already exists and covers the same fields. If it does, rewriting against it is usually less risky long term than leaving code on the compatibility layer, because the compatibility view is explicitly a transition artifact, not a supported target for new logic.
  • Detection method: static ABAP Test Cockpit checks catch static SELECT and DML statements against known converted tables reliably; dynamic SQL, generated reports, and third-party add-ons need a separate trace-based review because they will not surface in a static scan.
  • Business criticality and timing: a report used only for ad hoc lookups can wait; anything that runs inside period-end close, intercompany reconciliation, or a scheduled batch job that management depends on needs remediation before the first live close, not discovered during it.

Common pitfalls

  • Assuming identical field lists mean identical behavior; buffering that existed on the old transparent table is gone, and every access becomes a live database round trip through the view logic, which is invisible until volume is high.
  • Direct DML statements against a converted table name compiling and activating without error, then dumping only when actually executed against real data, so nothing in the transport or activation log warns anyone.
  • SELECT statements placed inside a loop that were tolerable against the old physical table becoming a serious performance problem once resolved through the compatibility view's join or union logic, and only showing up once the loop runs against a full month or year of data.
  • Authorization checks behaving differently through the view than they did against the physical table, producing access denials or unexpected data visibility that were never tested because the UAT user had broad authorizations.
  • Custom Z-tables or append structures built against the assumption that the old table's physical layout is stable, which breaks silently when the underlying table it joins against changes shape in a later S/4HANA release.

ECC, S/4HANA and clean core

Compatibility views exist purely to get an ECC-era codebase through a technical conversion without an immediate rewrite; they are not part of the target architecture and are explicitly discouraged as a basis for anything new. Under a clean core approach, custom development should never reference the old table name at all; it should consume the released CDS view entities that SAP provides for the same business data, or a RAP-based custom business object where extension is needed. SAP has not published a hard removal date for these compatibility layers, but treating them as permanent is the wrong assumption; each S/4HANA upgrade project should carry a task to inventory remaining direct references to converted tables and retire them, rather than letting them accumulate as technical debt that resurfaces at the next conversion or upgrade.

Whose problem this is

This starts as a developer-level finding, surfaced through code scanning during a conversion or upgrade project, but the remediation decision belongs to the architect, since it involves prioritizing rewrite effort against business risk. Functional consultants confirm which reports and batch jobs are business-critical enough to fix before go-live. The handover should list every affected object, whether the usage is read or write, and the target CDS view entity to migrate to.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-technical-topics/cds-compatibility-views-in-s-4hanaERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.