- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
an hour ago
On-premise SAP systems (ECC and S/4HANA) support two connection protocols in ZCC for ERP: RFC, for BAPIs & table reads and OData v2 over HTTP. This article covers RFC.
When you need BAPI and a MID Server
Neither protocol is a default, and many systems use both RFC and OData. The choice is per entity. If the data or operation you need is exposed both as an OData and RFC service, either protocol can reach it. If it is only available as a BAPI or table, RFC is the way in.
RFC always needs a MID Server. It is a network protocol carried by the SAP Java Connector (JCo), which runs on a MID Server inside the network where SAP is reachable. A connection record on your instance points the MID Server at the SAP system and supplies the login, and the MID Server calls out to your instance, so SAP takes no inbound connection and nothing on its core changes. One MID Server registers to one ServiceNow instance but can reach several SAP systems.
Before you start
A few things have to be in place on both sides before an RFC connection will work.
ECC on SAP NetWeaver 7.31 or later, or any version of S/4HANA, with JCo set up before you install the connector. The full list, including plugin dependencies, is on the Installation requirements page.
Installing JCo on the MID Server
First, enable ZCC on the MID Server. On the MID Server record, add Zero Copy Connector for ERP to the Supported applications list and to the Capabilities list, alongside ALL. Then give the MID Server's service account, mid_user, the sn_erp_integration.erp_mid_server role so it can send data back through the ImportSet API.
Then install JCo. Get the SAP files from whoever administers the SAP RFC account and add them as MID Server JAR records under MID Server > JAR Files: sapjco3.jar for Windows and Linux, sapjco3.dll for Windows, libsapjco3.so for Linux. Add the DuckDB JDBC driver as a MID Server JAR too. The MID Server restarts several times as these sync. JCo also has to be configured on the SAP side before you install the connector, following SAP's JCo installation guide.
The full steps are in the ZCC for ERP install and configuration docs.
Filling in the connection
Create the RFC connection under the supplied alias, rather than building one from scratch. The fields are mostly what you would expect: a connection name, the host name or IP of the SAP application server, the SAP client, a two-character login language, and the SAP system number.
For a load-balanced connection, leave SAP System Number blank and fill the load-balancing fields instead: the message server port or logical name, the three-character system ID, and the load balancing group. A connection that will not come up often turns out to be System Number filled in when it should be blank.
For encrypted transport, RFC supports SNC (Secure Network Communication), set on the same connection through the SNC fields. It needs a compatible security library on the MID Server plus the SNC parameters and certificate. Set it up once the basic connection works.
The credential is the SAP service account's user name and password, and it has to match the service user in SAP exactly. The authorisation objects that account needs are described in the doc's, so confirm the Basis team has set it up before you expect a heartbeat to pass.
Checking the connection
Create an ERP system record, point it at the RFC connection. When you save, the connector checks the link. An ERP system has separate heartbeats for RFC and HTTP, because the protocols do different work. A successful RFC heartbeat triggers retrieval of the BAPI catalog and table list over RFC; OData retrieval, if you have an HTTP connection, runs over HTTP in parallel. On an RFC-only system, watch the RFC heartbeat and the BAPI and table retrieval status. A working system shows the heartbeat as Success and retrieval as complete.
A failed heartbeat or retrieval gives you a Restart data retrieval action to refetch what failed, and known errors link to a knowledge base article on the heartbeat tab.
One property has to be set before you can build against what the connector found. An admin enables sn_erp_integration.enableModelModification on the right scope, which triggers retrieval of all tables and BAPIs into the Model Manager. It is set for a non-production systems. Until it is on, you can connect but not customise or clone models.
BAPIs and RFCs over time
BAPI signatures stay stable across SAP versions, which makes them a solid base for a connector. The risks are elsewhere. A BAPI can be deprecated, replaced by an S/4HANA OData equivalent, or changed in its logic or return values while the signature stays the same. The practical approach is to watch SAP's deprecation notes for the BAPIs your models use, and to prefer an OData service where it is the better long-term fit on S/4HANA. That is decided per entity, and it is easier to settle early than to unwind later.
For connection procedures, JCo setup, field references, and system configuration, see the Zero Copy Connector for ERP documentation.