SAP

Software Mile builds the integrations and applications that connect SAP to the rest of the business – because in most organizations running SAP, the friction is at the edges where SAP meets everything else.

Integration Is Where the Value Is

  • Integration between SAP and CRM, ecommerce, and operational systems via APIs and middleware
  • Custom applications and portals that surface SAP data to people who should not be in SAP
  • Data extraction and reporting for teams SAP does not serve directly
  • Workflow automation across the SAP boundary

We are not an SAP implementation shop – we are the team that makes SAP work with everything around it. Tell us what needs to connect to SAP.

Inside SAP or Around It

The dividing line usually follows the business logic. Anything that posts to finance, changes master data, or has to obey SAP’s own validation is normally safer built inside SAP, which is ABAP work for an SAP-side team. Anything that is a user interface, a partner integration, a mobile workflow, or a reporting layer for people who will never learn SAP usually belongs outside it.

The work described on this page is the outside half. Drawing that line early avoids the common outcome where an external application slowly reimplements rules SAP already enforces, then drifts out of agreement with them, and nobody notices until a reconciliation fails.

Which Integration Route Fits: OData, IDoc, RFC, or Files?

SAP offers several ways in and out, and the right one depends on volume, timing, who owns the interface, and how much you are willing to maintain. Choosing on familiarity alone is how organizations end up with real-time interfaces carrying nightly batch volumes.

  • OData and REST services. Good for interactive applications and front ends that need current data one record at a time.
  • IDoc. Suited to document-style exchange with partners and EDI-shaped flows, with queuing and monitoring already built around it.
  • RFC and BAPI. Direct function calls when you need SAP’s own logic executed, normally behind middleware.
  • File and batch extracts. Still the pragmatic answer for nightly volume, and far easier to reconcile than a real-time feed nobody is watching.
  • Event and message middleware. Worth the extra layer when several systems need the same change, so point-to-point links stop multiplying.

Read-Only or Write-Back?

Reading from SAP is comparatively low risk. Writing into it is a different project: you inherit validation, error handling, partial failures, and what happens when a document posts in SAP but the calling system never hears back. An integration specified as two-way often turns out to need write access on one screen and read access everywhere else.

Where write-back is genuinely required, it should go through SAP’s own transactions and validation, and it needs an owner on the SAP side for testing and change windows.

What Happens to Your Integrations During an S/4HANA Move?

Point-to-point connections built directly against tables and custom function modules are the ones that break, because the underlying data model changed. Integrations built against released interfaces and routed through a middleware layer tend to survive with configuration changes, which is the practical argument for that layer existing at all.

If a move is on your roadmap, that is a reason to consolidate existing links now, before adding more. An inventory of what currently talks to SAP, and how, is worth producing before anyone quotes a migration.

Reporting on SAP Data Without Slowing SAP Down

Querying production on a schedule that keeps growing is the arrangement that eventually breaks. Extracting into a reporting store on a defined cadence gives analysts room to slice data while keeping load on the source system predictable and scheduled, and it lets you join SAP data to the systems around it. The extraction job reads from SAP too, so it needs an agreed window and volume.

The trade-off is freshness against isolation, and it deserves an explicit decision at design time. A daily refresh is often enough for reports that were about to justify a real-time pipeline.

Connectivity Before Code: What the Landscape Has to Allow

Most SAP integration work stalls before the first line of code, and it stalls on access rather than design. The recurring version is an interface coded against a service that turns out never to have been activated in that system, or pointed at a client whose data does not match what the business described. Connectivity testing against the actual target system, early and before the build is scheduled, is what separates a two-day setup problem from one that consumes the first sprint.

  • A network route from wherever the code runs to the SAP application server. Ports follow the instance number: the dispatcher on 32NN, the gateway on 33NN, the message server on 36NN, and the ICM on 80NN for HTTP and 443NN for HTTPS. A firewall rule normally has to be requested for each one actually used.
  • The service switched on. For OData that means the ICF node under /sap/opu/odata activated in SICF and the service registered on the Gateway side. A 403 on a URL that otherwise looks correct is more often an inactive node than a rejected user.
  • The right client. One host serves several clients, the data differs between them, and an interface pointed at the wrong client returns plausible results that are simply from somewhere else.
  • Authorizations at the object the interface actually touches, not just the ability to log on. S_RFC governs which function groups an RFC caller may invoke, S_SERVICE which services may be started, and the underlying data still carries its own authorization objects on top of that.
  • A technical user rather than a person's dialog account, created as a system or communications user type so it cannot be used for interactive logon and does not stop working when that person changes roles or leaves.
  • SAProuter, where it fronts the landscape, listens on 3299 and needs an entry in its route permission table for the calling address. A connection that hangs rather than being refused usually points at the route table, not the port.
  • A decision on transport security: SNC for RFC connections or TLS for HTTP. Either one requires certificate or key material installed on both ends before anything connects, which is a lead-time item rather than a configuration switch.

What SAP Does With a Call That Runs Too Long

SAP does not fail a slow call cleanly, which is why a large share of integration incidents get blamed on the network. Requests are handled by work processes, and work processes are a finite pool shared with the people using SAP interactively. When a call exceeds what that pool allows, the caller sees a dropped connection or a truncated response while the useful evidence stays inside SAP.

  • The dialog work process runtime limit, rdisp/max_wp_run_time, terminates a dialog step that runs past it. The default in many systems is 600 seconds. Inside SAP this produces a TIME_OUT short dump; outside it produces a connection that simply ends.
  • The ICM has its own timeout, set per port through PROCTIMEOUT on the icm/server_port_n parameter, and it is frequently shorter than the work process limit.
  • Reverse proxies, load balancers and API gateways in front of SAP each add a timeout, and the shortest one in the chain governs. This is why an identical call can succeed from inside the landscape and fail from outside it.
  • Enqueue locks. A write held open by a long transaction blocks other writers on the same object, and the second caller either waits or fails depending on how it was written.
  • Work process exhaustion. Parallel interface calls compete with interactive users for the same pool, so an integration that behaves well in isolation can degrade the system when it is scheduled during business hours.
  • The diagnostic that separates these: ST22 for short dumps, SM21 for the system log, SM50 or SM66 for what the work processes were doing, and /IWFND/ERROR_LOG for Gateway-side OData failures. If none of them show anything at the timestamp in question, the call never reached SAP and the fault is in front of it.

Detecting What Changed Since the Last Run

The expensive part of most SAP interfaces is not the first load. It is knowing what changed since the last one, and deletes are the case designs miss most often, because a row that is gone produces nothing to notice.

Two defects recur in delta designs. The first is using a last-changed timestamp as a watermark with a strict greater-than comparison, which silently drops records written in the same second as the previous high-water mark; the remedy is a deliberate overlap on every run, combined with writes keyed on the document number so that reprocessing the overlap is harmless. The second is treating a document as unchanged because its header timestamp did not move, when the change was actually on an item or a linked table carrying its own timestamp. Beyond those, the mechanisms available for detecting change differ mainly in what they cost the source system and in what they cannot see at all.

  • Change documents, in CDHDR and CDPOS, record field-level before and after values for objects configured to log them. Coverage is per object and per field, so the first question is whether the field you care about is logged at all.
  • Change pointers, written to BDCP2 and activated per message type, are the mechanism behind standard master data distribution by IDoc. They are dependable for what they are configured for and blind to everything else.
  • Header date and time fields are the cheapest option and the weakest. They carry no deletes, their granularity is often one second, and the time zone they are recorded in is worth establishing before the first run rather than after.
  • Event-driven notification, where a posting raises an output or a message the interface consumes, gives near-immediate deltas and makes the interface dependent on configuration that someone else can change without telling you.
  • Database log based replication captures everything, deletes included, at the cost of binding the interface to the physical table layout rather than to a released interface.

Volume, Paging, and Where Per-Record Calls Belong

Sizing an interface means settling how much comes back in one response, how many responses make up one run, and what happens when a run is interrupted halfway. The defaults rarely suit: SAP Gateway applies a server-side page size regardless of what the client asks for, and a client that ignores paging will either truncate silently or ask for everything and time out.

Per-record calls are the correct shape for interactive lookups, where somebody is waiting on a single document and the only latency that matters is the one in front of them. They become the failure mode when the same pattern is reused for bulk reads and writes, because the fixed cost of each call, authentication, session setup and work process allocation, is then paid thousands of times over for work that a single extract would have done once.

  • $top and $skip page an OData collection, but deep paging gets more expensive the further in it goes, since the server generally still has to produce and discard the skipped rows. A filter on a keyed field beats a large $skip.
  • $select limits which fields come back. On a wide table that is the single largest reduction available, and specifying it costs nothing.
  • Counting is a separate operation. $inlinecount in OData v2, $count in v4, forces a full count of the matching set, so requesting it on every page turns one expensive operation into many.
  • $batch reduces HTTP round trips by grouping requests into one request body, but the server still processes them in order. It saves network time, not SAP work. The change set inside a batch is the part that is atomic.
  • Retry safety has to be designed in rather than added later: an external reference generated by the caller and written onto the document, or a query on that reference before any retry, is what makes a retry safe to attempt.
  • Large extracts belong in a background work process rather than a dialog one, which is also what puts them outside the dialog runtime limit described above.

What to Settle Before the Design Is Fixed

One question belongs before the technical design rather than after it. SAP's digital access model prices documents created in SAP by systems outside it, counted by document type rather than by named user, which means an integration that posts documents can carry a licensing consequence unrelated to how well it is built. What counts and what it costs is a question for your SAP account team, and the answer occasionally changes which system should own the posting.

The other question is whether the interface needs to be built at all. An existing route turns up more often than it gets looked for, and these are the places to look.

  • What SAP already publishes as a standard interface for the object in question. Released OData services, standard IDoc message types and released BAPIs carry a compatibility commitment across releases that a custom function module written against tables does not.
  • What connector the other system's vendor already ships. CRM, ecommerce and warehouse products frequently have an SAP adapter that somebody else has already maintained through several SAP releases.
  • What integration platform the organization is already licensed for. Middleware that is paid for, monitored and staffed is worth more than a new direct link written for a single requirement.
  • An existing copy: if a warehouse or reporting store already loads the tables involved on a schedule, a new reporting requirement can often read from there and never open a connection to SAP.
  • Whether a person is already doing this by hand, and how often. Automating a monthly export replaces ten minutes of work with an interface that needs monitoring, error handling and an owner for as long as it exists.

Frequently Asked Questions

What has to exist on the SAP side before integration work can start?

An SAP contact with the authority to activate services and grant authorizations, a non-production client that resembles production closely enough for a test there to mean something, and agreement on which interface type the object will use. None of the three is code, and the third carries most of the schedule risk, because changing interface type later normally means rewriting both ends. If the SAP side is run by a third party rather than in house, the lead time to obtain those things is worth establishing before any dates are set.

An interface that worked for weeks suddenly stops authenticating. What usually happened?

Most often the password policy caught up with it. A dialog user is prompted to change its password when it expires, and a non-interactive caller has no way to answer that prompt, so the interface runs normally until the expiry interval elapses and then fails all at once. The same symptom appears when a role change quietly removes something the interface had been relying on. Both look identical from outside SAP, so the SAP-side log is where to start rather than the integration code.

Does the integration have to run inside the customer's network?

It has to be able to reach the SAP application server, which is not the same requirement. A site-to-site VPN, a SAProuter fronting the landscape, or an API layer published in a DMZ all satisfy it without the application itself sitting on the internal network. What is rarely the right answer is exposing the SAP host directly to the internet. Where external systems need access, a gateway or reverse proxy in front is the normal arrangement, and it is also where rate limiting and request logging can be applied.

Does this apply to any version of SAP?

The available routes differ by product and release. ECC 6.0 and S/4HANA on premise both support RFC, BAPI, IDoc and OData, although which OData services exist out of the box varies considerably by release and by which components are activated. S/4HANA Cloud in the public edition is the significant exception: direct table access and classic custom ABAP are not available there, so an integration is confined to released APIs, and a design that assumed table reads does not port. SAP Business One and SAP Business ByDesign are separate products with their own interfaces and should not be assumed to behave like ERP.

How does the work actually proceed?

An inventory comes first: which objects, which fields, in which direction, at what volume and on what schedule. The interface type is chosen from that, then the field-level mapping is agreed, which is the step needing the most customer input, because it requires someone who knows what those fields mean in this organization's configuration rather than in general. Build and test run against a non-production client. Cutover then needs a defined fallback, meaning an answer to what the business does on day one if the interface has to be switched off.

What do we have to decide, as opposed to what you decide?

Direction and volume, the object and field list, and the error policy. The error policy is the one that gets deferred and should not be: when a record is rejected by SAP validation, does the rest of the batch continue or stop, where does the rejected record wait, who is told, and who is permitted to correct and resubmit it. You also decide how long the interface keeps its own record of what it sent and received, which is what makes a later dispute answerable rather than a matter of recollection. These are business decisions because they describe who does what at eight in the morning after something failed overnight.

We already have a warehouse holding SAP data. What should we check before pointing a new application at it?

Confirm the copy carries the fields you need rather than the subset somebody selected when it was built, since extracts are usually scoped to the reports that justified them. Check whether deletes and cancellations are reflected or only inserts and updates, because a copy that never removes anything will overstate open items. Check whether currency and unit conversions were applied on load, so you know whether the figures are raw document values or already converted. Then find out who owns it, because every new consumer makes its schema harder to change.