All Articles
ERP Integration7 min readPublished

SAP AI Integration: OData, BAPI/RFC and Read Replicas, Compared

Three supported ways into SAP, one to avoid, and the reasoning that decides which of the three fits a given integration.

Stratify Engineering
Stratify EngineeringAI Architecture Team

Executive Summary

Connecting an AI layer to SAP is a solved problem, but the route matters more than most integration plans account for. SAP exposes several supported interfaces — OData services, BAPI and RFC function calls, and read replicas where direct access to the production system is restricted — and each treats SAP as a system of record the AI layer queries and writes back to, rather than something to be replaced or bypassed. What does not survive is screen-scraping the SAP GUI, which produces an integration that breaks on the next cosmetic interface change and needs constant babysitting. This is a practical guide to the three supported paths, when each fits, and why routing through SAP's own interfaces is what lets the integration survive an SAP upgrade without turning into custom ABAP your SAP partner then has to maintain.

Diagram showing an AI layer connecting to SAP through OData services, BAPI and RFC calls, and a read replica where direct access is restricted, contrasted with screen-scraping the SAP GUI as the access path to avoid because it breaks on the next cosmetic interface change. Diagram showing an AI layer connecting to SAP through three supported access paths — OData services, BAPI and RFC calls, and a read replica where direct access is restricted — each treating SAP as a system of record it queries and writes back to, versus screen-scraping the SAP GUI, which is marked as the path to avoid because it breaks on the next cosmetic interface change. SAP AI INTEGRATION Through SAP's Interfaces, Not Around Them AI Layer Agents & Retrieval Sits outside SAP. Treats SAP as a system of record it queries and writes back to. A · OData Services Standard REST-style read/write — the default first choice. B · BAPI / RFC Calls Transactional function modules — for actions OData doesn't expose. C · Read Replica Where direct access is restricted — reporting-grade, not real-time writes. ✕ Screen-Scraping the SAP GUI Breaks on the next cosmetic change. Not a path any of the three above need. WHY IT SURVIVES THE NEXT SAP UPGRADE No custom ABAP for your SAP partner to maintain — the integration calls interfaces SAP already publishes and supports. Enterprise AI Engineering · Zero Vendor Lock-In · Data Sovereignty thestratify.ai
Diagram showing an AI layer connecting to SAP through OData services, BAPI and RFC calls, and a read replica where direct access is restricted, contrasted with screen-scraping the SAP GUI as the access path to avoid because it breaks on the next cosmetic interface change.
3 Supported Paths
OData services, BAPI/RFC calls, and read replicas cover the realistic access patterns for an AI layer
0 Custom ABAP
Routing through SAP's published interfaces avoids code inside SAP that your SAP partner then has to maintain
Survives Upgrades
An integration built against OData, BAPI/RFC or a replica keeps working across SAP version upgrades
1 Path To Avoid
Screen-scraping the SAP GUI breaks on the next cosmetic change and is not a supported interface

Key Takeaways

  • OData services are the default first choice: a standard, REST-style interface for read and write operations against SAP business objects.
  • BAPI and RFC function calls cover transactional actions that a given OData service does not expose — the two are complementary, not competing.
  • A read replica is the right answer where direct access to the production SAP system is restricted, though it is reporting-grade rather than suited to real-time writes.
  • Screen-scraping the SAP GUI is not a supported path: it produces an integration that breaks the moment a screen is cosmetically redesigned, with no warning before it does.
  • The AI layer sits outside SAP and treats it as a system of record — nothing about this approach requires migrating data out of SAP or replacing the ERP itself.

Three ways in, and one way to avoid

SAP is not a closed system as far as integration is concerned — it publishes several interfaces specifically for external systems to read and write against it, and an AI layer is, from SAP's perspective, just another external system calling those interfaces. The three that cover the realistic set of integration needs are OData services, BAPI and RFC function calls, and read replicas for cases where direct access to production is restricted. What all three share is that the AI layer sits outside SAP entirely: SAP remains the system of record, nothing is migrated, and the integration survives an SAP version upgrade because it was never built against SAP's internals in the first place.

The path that does not belong on this list is screen-scraping the SAP GUI — automating against pixel positions and screen text rather than a published interface. It is sometimes reached for when no API appears to cover a need, but it produces an integration with no contract to rely on: the next transport, patch or cosmetic redesign can silently break it, and there is no SAP-side commitment that the screen will stay where it was.

OData services — the default first choice

SAP's OData services expose business objects — sales orders, material master records, financial documents — through a standard, REST-style interface with predictable query semantics: filtering, expansion of related entities, and both read and write operations depending on how the service is configured. For an AI layer, this is usually the first thing to check, because it requires no custom development on the SAP side if a service already exists for the object in question, and it behaves like any other REST API the rest of the integration is likely already calling.

Where OData earns its place as the default is maintainability: a service SAP publishes and versions is a contract the AI layer can rely on across upgrades, in a way a hand-built workaround cannot be.

BAPI and RFC — for what OData doesn't expose

Not every transactional action has an OData service in front of it. BAPIs (Business Application Programming Interfaces) and RFC (Remote Function Call) modules are SAP's older but still fully supported mechanism for invoking transactional logic directly — posting a goods movement, creating a purchase requisition, triggering a workflow step — and they remain the right tool where the specific action needed has no corresponding OData service, which is common for less standard or more industry-specific SAP configurations.

These are typically reached through a middleware layer or an SAP connector library rather than called raw, since BAPI/RFC calls use SAP's own remote-call protocol rather than plain HTTP. That middleware layer is exactly where an AI agent's tool-calling logic sits: the agent calls a well-defined function, and the function handles the SAP-specific plumbing underneath it.

Read replicas — where direct access is restricted

Some SAP environments — particularly larger or more tightly governed ones — restrict direct API or RFC access to the production system for good reason: an AI workload with a query pattern the SAP team has not reviewed is a real risk to a system the rest of the business depends on. In those cases, a read replica, refreshed on a defined interval, gives the AI layer a data source it can query freely without touching production load or requiring sign-off on every new query pattern.

The tradeoff is real and worth being explicit about with stakeholders: a replica is reporting-grade, not transactional. It fits retrieval, natural-language querying and dashboard use cases well — the same pattern behind the white paper on chatting with data over Odoo ERP — but it is the wrong foundation for a workflow that needs to write back to SAP in real time. Where both read and write are needed, a replica typically pairs with OData or BAPI/RFC for the write path rather than replacing it.

Why this survives the next SAP upgrade

The throughline across all three supported paths is that none of them requires custom ABAP running inside SAP itself. That matters beyond elegance: custom ABAP is code your SAP partner has to test against every future upgrade, patch and transport, and it is code that sits inside the system your ERP vendor is contractually responsible for supporting. An integration built entirely against OData, BAPI/RFC and read replicas is, from SAP's point of view, indistinguishable from any other external consumer of its published interfaces — which is precisely why it keeps working when SAP itself changes underneath it.

This is the same argument that runs through AI system integration more broadly: connect to what an enterprise already runs rather than building inside it or replacing it, so the integration is additive rather than a dependency the core system now has to carry.

Frequently Asked Questions

Riyadh Skyline
CONTACT US

Let's Build the Future
of Enterprise AI

Have a project in mind or need expert guidance?
We'd love to hear from you.

GLOBAL HEADQUARTERS
Stratify AISecond Floor, Diamond Building,
Salah Ad Din Al Ayyubi Rd, Al Malaz,
Riyadh 12836, Saudi Arabia
EMAIL
[email protected]
PHONE
+966 54 688 0286
Global Reach Map
Global NetworkWorldwide Presence

Global Enterprise Partner

Empowering businesses across North America, Europe, Asia, and the Middle East.

Send Us a Message

An engineer replies within one working day — not a sales sequence. No newsletter, no cold calls.

Your information is secure and never shared.