# SAP S/4HANA AI Ontology & Governed MCP Connector

Canonical URL: https://naditu.com/connectors/sap-s4hana
Category: Global ERP
Read path: `Released CDS Views · OData V4 · HANA Read Replica`
Write gate: `Human-approved via RAP OData V4 & BAPI`

SAP S/4HANA stores tens of thousands of physical tables alongside custom Z-fields, split company codes and Data Control Language policies. Generic SQL or OData wrappers either expose unrestricted rows through a technical service user or choke an LLM context window with cryptic four- and six-letter field names. Naditu maps your released CDS views and Z-extensions into governed business objects while enforcing caller authorizations before any query runs.

## Business objects & field-level governance.

- **Sales Order & Delivery** (`I_SalesOrder · I_SalesOrderItem · VBAK · LIKP`) — NetPriceAmount & margin: Sales Ops and Finance only
- **Purchase Order & Supplier** (`I_PurchaseOrderAPI01 · EKKO · EKPO · I_BusinessPartner`) — Supplier bank & contract rebate: Purchasing and Finance only
- **Universal Journal Entry** (`I_JournalEntryItem · ACDOCA · BSEG`) — Company-code & cost-center row filter from caller SSO group
- **Production Order & Material** (`I_ManufacturingOrder · AFKO · MARA · MARC`) — StandardValuationPrice masked outside Plant Controlling

## Three physical schema traps solved in the layer.

1. **Service-account DCL bypass vs. per-caller company code scope:** Connecting an MCP tool with a single SAP communication user strips per-employee company code (BUKRS) and plant (WERKS) boundaries. Naditu intersects caller IdP groups with company-code and plant row policies on every call.
2. **ACDOCA ledger, record-type and reversal double counting:** Unfiltered SQL over ACDOCA mixes leading and non-leading ledgers (RLDNR = 0L vs local GAAP) and reversed documents. The ontology pins ledger, fiscal year variant and reversal exclusion rules once.
3. **Custom ZZ extensions and domain fixed-value codes:** Customer append structures and single-character delivery/billing status codes (such as A, B, C) are documented with your functional leads so models never guess field semantics.

## Common engineering questions.

### Does Naditu require SAP Business Data Cloud or Joule licenses to connect S/4HANA?

No. Naditu connects directly to your existing S/4HANA Private Cloud or On-Premise instance over released OData V4 services, RFC/BAPI or a read-only HANA replica inside your network.

### How are writes such as purchase requisitions or order blocks handled in S/4HANA?

Naditu never executes direct SQL inserts or updates against SAP tables. Mutations are drafted as typed payloads and submitted through official RAP OData V4 APIs or BAPIs only after a named approver confirms.

### Can we join SAP S/4HANA orders with Salesforce, MES or regional subsidiary ERPs?

Yes. Naditu resolves cross-system keys such as Business Partner numbers, SKU codes and work order references at query time without copying S/4HANA tables into an external lakehouse.
