Extracting data from SAP S/4HANA Cloud with released CDS views

By ABAP for Agents · Updated

TL;DR

  • In SAP S/4HANA Cloud Public Edition you extract through C1-released CDS views annotated with @Analytics.dataExtraction.enabled. You don't get tables, SAPI extractors or SLT.
  • Private edition and on-premise connect like classic S/4HANA. Custom CDS views and SLT are available there too.
  • The runtime is ODP. Datasphere replication flows read these views from the CDS_EXTRACTION container through SAP_COM_0532, and the views need to be on an allowlist first.
  • SAP's docs mark I_Product, I_Customer and I_Supplier as extraction-enabled with automatic delta. For G/L line items SAP documents I_GLAccountLineItemRawData. Check I_JournalEntryItem in your own system before you plan on it.
  • A_ OData APIs are for documented transactional use. SAP's API Policy restricts large-scale extraction outside the pathways it provides for it.

"Can we just pull the tables?" isn't an option in SAP S/4HANA Cloud Public Edition. The supported way out is a set of CDS views that SAP has released for extraction, read through SAP's extraction runtime by SAP Datasphere, SAP BW/4HANA or another consumer that SAP supports.

This guide covers what makes a CDS view extractable, how the public and private editions differ, the route into Datasphere, the key master and finance views, why the A_ OData APIs are the wrong tool for bulk loads, and how to find extraction views yourself. Every statement comes from SAP's documentation on the SAP Help Portal, SAP Learning and SAP's API Policy, all linked under Sources. We haven't tested this against a real SAP system. View names, communication scenarios and container names change between releases, so check them in your own tenant.

Public edition vs private edition

SAP S/4HANA Cloud Public Edition is the strict case. SAP Data Intelligence's documentation says it directly: "For SAP S/4HANA Cloud, only standard ABAP CDS views that are C1-released can be integrated." SAP Learning's table of Datasphere replication sources shows the same picture. For S/4HANA Cloud, the only containers are CDS_EXTRACTION (released extraction views) and SQL_SERVICE (views exposed through the ABAP SQL service). ODP_SAPI extractors and SLT appear only for on-premise sources.

SAP S/4HANA Cloud Private Edition connects like SAP S/4HANA on-premise. SAP's Green Ledger documentation, for example, groups "SAP S/4HANA Cloud Private Edition, or SAP S/4HANA" under on-premise connections and gives public edition its own section. On those systems the Data Intelligence docs add two options that public edition lacks: you can create your own extraction-enabled CDS views, and SLT is available.

Even on private edition and on-premise, released extraction views are the upgrade-safe choice. The ABAP Keyword Documentation says extraction views should be released to contract C1 "to guarantee compatibility … when the S/4HANA system is upgraded".

What makes a CDS view extractable

Three things together, all from SAP's documentation:

  • Release. The view is released with the C1 stability contract. The ABAP Keyword Documentation adds that you also choose the visibility "Use in Key User Apps", and that "Only C1-released extraction view with this visibility will be exposed in S/4HANA CE" (cloud edition).
  • @Analytics.dataExtraction.enabled: true. This marks the view as suitable for replication. SAP's Data Integration page explains that this annotation enables full loads and @Analytics.dataExtraction.delta enables delta loads. Datasphere's trigger-based change data capture uses delta.changeDataCapture.automatic for simple projections and delta.changeDataCapture.mapping for views with joins.
  • Only the field list travels. "Only the fields included in the field list of the view are available … Associations are not exposed via data extraction." If you need a field from an association, you need a view that projects it.

SAP also says "only a subset of the documented CDS views is enabled for data extraction". A released view isn't automatically an extraction view.

How the extraction runs: ODP, CDI and the ABAP Pipeline Engine

SAP's Architecture Overview for Data Integration names ODP as the extraction runtime and describes two ways to call it from S/4HANA Cloud Public Edition:

RouteCommunication scenarioNotes from SAP
ABAP Pipeline EngineSAP_COM_0532 (WebSocket RFC)"Recommended in most cases"
Cloud Data Integration (CDI)SAP_COM_0531 (OData V4)Slower. Datasphere's connection docs label it legacy

"The same set of released ABAP CDS extraction views is available for both." SAP BW/4HANA connects through SAP_COM_0042 (RFC/ODP). Consumers named in SAP's architecture page include SAP BW, BW/4HANA, Data Intelligence, Datasphere, HANA and HANA Cloud.

The ABAP SQL service is a separate route. SAP calls it "the strategic mechanism for exposing CDS view entities to external SQL consumers", and Datasphere's connectivity page recommends it for replication and federation. It has its own setup and isn't the ODP route this guide describes.

Into SAP Datasphere, step by step

SAP's "Integrating CDS Views Using SAP Datasphere" lists the steps for public edition with SAP_COM_0532:

  1. Create a communication user.
  2. Create a communication system (inbound only) for Datasphere.
  3. Create a communication arrangement for SAP_COM_0532.
  4. Allowlist the views. Maintain an authorization group with the CDS views you allow ("Define Allowlists for CDS View Extraction"). Views that aren't in it don't appear in the CDS_EXTRACTION folder. The ABAP SQL service doesn't use this allowlist.
  5. In Datasphere, create a connection of type SAP ABAP with protocol RFC.
  6. Build a replication flow on the CDS_EXTRACTION container. SAP Learning lists the load types: Initial Only, Initial and Delta, Delta Only.

Step 4 is where most "the view isn't there" questions end. It's a customizing step in the S/4HANA system, not in Datasphere.

Key views for master data and finance

What SAP's S/4HANA Cloud Public Edition CDS documentation (release 2608) says about four views that people often ask for:

ViewWhat it isExtraction status in SAP's docs
I_ProductProduct masterReleased. "Enabled for data extraction in full mode as well as in delta mode. Deltas are determined automatically by change data capture."
I_CustomerCustomer master (dimension)Same statement: full and delta, automatic CDC
I_SupplierSupplier master (dimension)Same statement: full and delta, automatic CDC
I_JournalEntryItemJournal entry items from table ACDOCA (cube)Released. Its documentation page has no data extraction section, so verify it before planning on it

For G/L line items, SAP documents I_GLAccountLineItemRawData with extraction type "Full" plus CDC delta on table ACDOCA. SAP's own Green Ledger content replicates that view to Datasphere. Two points from its page: it returns line items "without the ledger", so for extension ledgers you join I_LedgerSourceLedger, and it includes balance carry-forward postings. I_JournalEntryItem, by contrast, "does not expose technical balance carried forward items of period 000". The two views won't add up to the same balances unless you handle that.

For open receivables and payables, SAP's Datasphere content builds on a replication flow of I_OperationalAcctgDocItem, which is sourced from BSEG. See replacing SELECT on BSEG for how the finance views relate.

Why not the A_ OData APIs?

The A_ entities, such as A_Product or A_BusinessPartner, are published OData APIs for integrating transactional processes. SAP's API Policy says published APIs are for "Documented Use". Among the possible controls, it lists "limits and preconditions for bulk extraction / replication". In section 2.2.2 it says that "except through and within the limits of SAP-endorsed architectures, data services, or service-specific pathways expressly identified and intended for such purposes, SAP prohibits API use for … scraping, harvesting, or systematic and/or large-scale data extraction or replication". The policy also allows throttling or suspension.

The practical reading: use the extraction views and the ODP route above for bulk loads and deltas, and keep the A_ APIs for what they're documented for. SAP says the same about custom OData exposure in a related product: "the External API scenario is not intended for one-off mass data extraction", and calls should "limit the requested data with appropriate filters and/or paging".

Finding extraction views yourself

  • SAP Business Accelerator Hub. SAP's Data Integration page says the Hub "shows released CDS views and also indicates whether an individual CDS view is enabled for data extraction". Look for Data Source for Data Extraction under Supported Capabilities.
  • View Browser app. In the tenant, the View Browser shows whether a view is extraction-enabled.
  • I_DataExtractionEnabledView. A CDS view that lists the extraction-enabled views, with DataExtractionViewName, DeltaChgDataCaptureIsSupported and IsSAPReleasedView. SAP documents it for S/4HANA Cloud and for S/4HANA from 2020.
  • SAP Help per view. Each view page in the S/4HANA Cloud CDS documentation has a "Data Extraction" section when the view is extraction-enabled, as shown for I_Product, I_Customer and I_Supplier above.

If you use an AI assistant to write extraction views or queries, give it these limits up front. Assistants often suggest table reads or A_ API paging loops, which run into exactly the limits described above. The 10 mistakes AI makes in ABAP and Claude Code and AGENTS.md for ABAP show how to keep such rules in the agent's context, and the free abap-for-agents-lite rules are a starting point.

Sources

Get the rules

Start with the free rules: ABAP for Agents Lite (MIT) has the core rules from this guide, ready for Cursor, Claude Code, GitHub Copilot, Windsurf and AGENTS.md, in English and Portuguese.

Need more? The full Rules Pack (v1.1) has 300+ rules across 20 topics (adding performance, security, RAP, CDS, OData and Fiori, ABAP Cloud and clean core, LUW and locks, BAPIs, ABAP Unit and S/4HANA migration) plus 8 agent skills, with free updates. It is 19 € at launch (29 € after).

ABAP mistakes AI coding assistants make, and how to prevent them

The pillar guide. Nine repeat mistakes, why models make them, and the rule or code pattern that prevents each one.

FOR ALL ENTRIES with an empty table: the trap and the fix

Why an empty driver table reads the whole database table, the one-line guard, the silent duplicate-row trap, and the alternatives.

Cursor rules for SAP ABAP: a setup guide

Project rules in .cursor/rules for ABAP: rule types, glob patterns for abapGit and ADT files, an always-on core rule and a quick test.

Using Claude Code and AGENTS.md with SAP ABAP

One AGENTS.md for every agent, a CLAUDE.md that imports it, an on-demand review skill, and how to check that Claude Code loaded them.

GitHub Copilot custom instructions for ABAP

copilot-instructions.md for the core rules, applyTo-scoped instruction files for ABAP sources, a review prompt file, and where each one works.

SAP's ADT MCP server with Claude Code, GitHub Copilot and Codex

What SAP's ADT MCP server in ABAP development tools for VS Code is, how to connect Claude Code, Copilot and Codex, and a read-only-first setup.

Column totals in a Fiori Elements List Report with RAP and CDS

How to get a totals row in an OData V4 List Report from RAP: the two CDS annotations, currencies and units, the table type, and what to check when the sum doesn't show.

Replacing SELECT on BSEG in S/4HANA: ACDOCA, I_JournalEntryItem and I_OperationalAcctgDocItem

Why the ATC flags reads on BSEG in S/4HANA, what BSEG still holds, when to move to I_JournalEntryItem or I_OperationalAcctgDocItem, the ledger trap and when an exemption is the right answer.

Get notified about updates

New rules when SAP or the AI tools change: about one short email a month. No spam.

We'll send you a confirmation email first (double opt-in); you're only subscribed after you click the link. Unsubscribe anytime with one click. Emails are sent via Kit.