Step 5 — Create the RFC Connection in SAP
Step 5 — Create the RFC Connection in SAP
This guide shows how to set up the TCP/IP RFC destination that Crestone will use to communicate with your SAP system.
The RFC destination provides the secure transport channel for Crestone to execute remote-enabled function modules.
Note on handling extractions: By default, Crestone uses a single RFC connection (CRESTONE_SERVER) to communicate with the SAP system, which means that extractions are executed sequentially—that is, an RFC connection can only process one extraction at a time. If your scenario requires running multiple extractions simultaneously, see the "Using Parallelism: Additional RFC Connections (Slots)" section below.
Prerequisites
- SAP GUI (SAP Logon) access to the target system/client.
- Technical user dedicated to Crestone integration with the role
ZCRESTONEassigned (see Step 4). - Hostname/IP, system number (SYSNR), client, and logon language for the SAP application server where Crestone will connect.
Connecting through a SAProuter: if the SAP system Crestone connects to is only reachable through a SAProuter (common when SAP sits behind a firewall/DMZ), enter the SAProuter string in the SAP Router field of the connector configuration in Crestone (available on the SAP ABAP and SAP BW source connectors). Leave it empty if Crestone reaches the application server directly. This is separate from the RFC destination configured below in SAP.
1) Open the RFC configuration
- Log in to SAP with a user authorized to maintain RFC destinations.
- Launch transaction
SM59(RFC Destinations). - In the navigation tree, expand TCP/IP Connections.
- Click Create (or use Display/Change → Create).

2) Maintain the RFC destination
Fill the tabs as follows:
Technical Settings
- RFC Destination:
CRESTONE_SERVER. - Connection Type: Select
T(TCP/IP Connection). - Description: Provide a short purpose (e.g., "Crestone integration").
- Activation Type: Choose
Registered Server Program. - Program ID: Set a unique identifier (e.g.,
CRESTONE_SERVER). This must match the ID configured in the Crestone connector. - Leave Gateway Host and Gateway Service with the default values for your SAP system unless BASIS specifies otherwise.
No logon credentials are required for TCP/IP destinations. Save the destination when the fields are complete.
Click Save when the fields are complete.

These Gateway options are essential for RFC connection with SAP. Although they are located at the bottom of the screen and require scrolling, they must be completed for the integration to function correctly.

-
Gateway Host: Here you must specify the IP address or hostname of the SAP server acting as the Gateway host. This information is critical, as it defines which SAP system the RFC service will connect to.
-
TCP Service: This value corresponds to the standard SAP Gateway service, in the format: sapgw + SAP instance number
(for example: sapgw00, sapgw01, etc.).
Special Options
Classical serialization ("classic") must be configured, as it is the setting that ensures the orderly and stable processing of asynchronously transmitted data. If left configured as "fast" (or any option other than "classic"), the connection will fail and produce the following error:
[JCO ERROR SYSTEM FAILURE: Index -1 out of bounds for length 0 RFC ERROR SYSTEM – Message number: 341]

Regarding the handling of outgoing bgRFCs, the option to convert outgoing bgRFCs to outgoing qRFCs should be selected. This maintains execution order, improves queue monitoring, and facilitates error analysis during the testing and validation phase.
3) Test the connection
- With the new destination selected, choose Connection Test.
- Confirm you receive status Connection test OK.
- If any errors appear, verify that the Crestone connector is running and registered with the same Program ID, and confirm network/firewall settings permit the registration.

4) Configure SAP Gateway security
- Access transaction
SMGW. - Navigate to Goto ▸ Expert Functions ▸ External Security ▸ Maintain ACL Files.

- In the secinfo file, add the standard entry that allows program
CRESTONE_SERVERto start, specifying:TP:CRESTONE_SERVERHOST: the application server host name or*(per security policy)USER: the SAP user permitted to start the program (often*for registered programs)

- In the reginfo file, add the standard entry that allows program
CRESTONE_SERVERto register from the connector host, for example:TP:CRESTONE_SERVERHOST: connector host/IPACC:*(permitted users/clients)

Coordinate these ACL entries with your BASIS/security team; incorrect values can block gateway registrations or expose the gateway unnecessarily.
Verification
- The RFC destination appears under TCP/IP Connections with a green status icon.
- Connection tests complete without errors.
- Logs in transaction
SM59show successful registration/test timestamps.
Summary
- Create a TCP/IP RFC destination in
SM59with connection typeT. - Set the destination name and Program ID to
CRESTONE_SERVER(or your agreed identifier). - Save and test the destination to confirm successful registration and connectivity.
- Configure SAP Gateway security
- Use of parallelism: additional RFC connections (slots) Each extraction performed by Crestone consumes one RFC connection. With only one connection configured (CRESTONE_SERVER), extractions can only be processed sequentially, one at a time. If parallel processing is to be enabled, additional RFC connections must be created in SM59, following the same procedure detailed in steps 2) Maintain the RFC Destination, 3) Test the Connection, and 4) Configure SAP Gateway Security, using the following naming pattern:
- CRES_SLOT_1
- CRES_SLOT_2
- CRES_SLOT_3
- ... CRES_SLOT_N
Important:
The number of slots is configurable — there's no fixed maximum. Create as many CRES_SLOT_N destinations in SAP as parallel connections you want to enable, always starting at CRES_SLOT_1 and numbering sequentially with no gaps. Any name that doesn't follow the CRES_SLOT_<number> pattern will not be recognized by Crestone as a valid parallelism slot. When configuring each slot, create a new RFC destination (CRESTONE_SERVER is not modified — it stays as-is, as the fallback) using the slot name in every field where CRESTONE_SERVER was used as the example. For instance, if configuring CRES_SLOT_1:
- RFC Destination (step 2): CRES_SLOT_1
- Program ID (step 2): CRES_SLOT_1 (must match the ID configured in the Crestone connector for that slot)
- secinfo file (step 4): TP: CRES_SLOT_1
- reginfo file (step 4): TP: CRES_SLOT_1
The remaining technical parameters (connection type, activation type, gateway host/service, classical serialization, and conversion of outgoing bgRFC calls to outgoing qRFC calls) remain the same as in the CRESTONE_SERVER configuration.
Tip: in the secinfo and reginfo files you don't need one entry per slot — a single
wildcard entry TP: CRES_SLOT_* covers every slot you create, present and future. That way each
file only needs two entries in total: one for CRESTONE_SERVER (added in step 4 above) and one
(wildcard) for all CRES_SLOT_*:
# secinfo
P TP=CRESTONE_SERVER USER=* HOST=* USER-HOST=*
P TP=CRES_SLOT_* USER=* HOST=* USER-HOST=*
# reginfo
P TP=CRESTONE_SERVER HOST=* ACCESS=* CANCEL=*
P TP=CRES_SLOT_* HOST=* ACCESS=* CANCEL=*
the number of RFC connections created defines the maximum degree of parallelism available. For example, with 8 slots configured, Crestone will be able to run up to 8 simultaneous extractions; without additional connections, processing will be strictly sequential.
Platform-side activation: in addition to the SAP-side configuration, it must be activated from the tool — see the Parallel Extraction section in Settings.
Before creating several slots, take your SAP system's capacity into account: the number of slots you can actually run in parallel is limited by the resources available on your application server/gateway (available work processes). Creating more slots than your SAP can sustain won't improve performance — coordinate with your BASIS team before scaling up.