The SAP RFC connector lets you invoke RFCs (Remote Function Calls) and BAPIs (Business APIs) of an SAP system directly from an integration flow, using JSON for both input and output.
It abstracts the complexity of the SAP binary protocol (handled by the JCo libraries): you describe the call as JSON, and the connector takes care of the connection, type conversion, and transaction handling. The connector replaces the legacy implementation available in Canvas mode.
IMPORTANTThe SAP RFC connector is controlled by a feature flag. To enable it for your tenant, contact Sensedia support.
The connector connects to SAP using the connection pool of an SAP RFC data source, executes the RFC or BAPI you specify (for example, RFC_READ_TABLE or BAPI_USER_GET_DETAIL), and automatically converts the result to structured JSON.
IMPORTANTThe connector accepts only data sources of type SAP RFC. Pointing it to a JDBC data source results in a validation error.
Field | Required | Description |
|---|---|---|
| Data Source | Yes | The SAP RFC data source to use for the connection. Only SAP RFC data sources appear in this field. |
| Function Name | Yes | Name of the RFC or BAPI to invoke (e.g., RFC_READ_TABLE). |
| Payload | No | Input JSON with importing, changing, and tables. When the SensediaSapRfcPayload header is present, it takes precedence. |
| Commit | No | When enabled, runs BAPI_TRANSACTION_COMMIT after a successful call. Default: disabled. |
| autoParse | No | When enabled, automatically converts the RFC_READ_TABLE output into structured JSON. Default: disabled. |
In the Source Code (YAML) view, the component uses the URI scheme saprfc:label with the dataSource, functionName, commit, and autoParse parameters:
The payload is a JSON object made up of the standard SAP parameter blocks. Include only the blocks the function requires:
importing: input parameters sent to the function.changing: parameters the function may modify (returned with any values changed by SAP).tables: table structures (arrays) sent to or read by the function.Each field inside these blocks must use the exact technical name expected by the SAP function (case-sensitive).
NOTEYou can override the payload at runtime by setting the
SensediaSapRfcPayloadheader in a previous step (for example, with asetHeader). When this header is present, it takes precedence over the step's Payload field — useful for building the payload dynamically.
The response is always a structured JSON object:
metadata.status: SUCCESS when there are no business errors; ERROR when there are type E messages in the SAP RETURN table.metadata.errors: list of error messages returned by SAP.exporting: the function's output parameters.changing: input parameters returned with any changes.tables: the function's output tables.When a function returns no data (for example, a query with no results), the call still succeeds: metadata.status is SUCCESS and the corresponding table is an empty array ([]).
The examples below use standard SAP test functions and were validated against an SAP system.
Function Name: STFC_CONNECTION
The response echoes the text in exporting.ECHOTEXT and returns server data in exporting.RESPTEXT.
Function Name: RFC_READ_TABLE
QUERY_TABLE: the SAP table to read.DELIMITER: the character used to separate the columns in each returned row.ROWCOUNT: maximum number of rows to return.FIELDS: the columns to read.The response returns the field metadata (LENGTH, OFFSET, TYPE) in tables.FIELDS and the rows in tables.DATA, where each WA field holds the row content delimited by DELIMITER. To receive the output already structured into named fields, use automatic parsing (autoParse).
NOTEBy default, each row of the
DATAtable is limited to 512 characters. For records longer than that, see Extended records (USE_ET_DATA_4_RETURN).
To filter the rows read from a table, add the OPTIONS table with a TEXT clause:
Function Name: BAPI_USER_GETLIST
Returns the matching users in tables.USERLIST and the total in exporting.ROWS.
Function Name: BAPI_USER_GET_DETAIL
Returns nested structures (such as ADDRESS and LOGONDATA) in exporting.
When Commit is enabled (commit=true), after the main function runs successfully the connector automatically executes BAPI_TRANSACTION_COMMIT in the same session, persisting the changes.
commit=true for functions that write to SAP (e.g., a BAPI that updates a record).commit=false for read-only functions (e.g., RFC_READ_TABLE).WARNINGWith commit enabled, if a failure occurs after the main call but before the commit, the component ensures that no changes are persisted in SAP.
NOTERunning a commit on a read-only function does not change the returned data. There is no automatic rollback; transactional behavior depends on the SAP function being called.
The autoParse parameter makes it easier to consume RFC_READ_TABLE responses. Without it, SAP returns the table records in the WA field in fixed-width positional format — requiring you to manually interpret the offsets and lengths of each column.
With autoParse=true, the connector uses the metadata in tables.FIELDS to automatically slice the WA field and produce JSON objects with named, typed fields.
NOTE
autoParseis applied only when the executed RFC isRFC_READ_TABLEand the response contains theFIELDSandDATAtables. For other RFCs, the response remains in the default format.
Without autoParse, each record looks like this:
With autoParse=true, the output is:
The FIELDS table is removed from the response after parsing.
SAP type | Input example | JSON output |
|---|---|---|
Date (D) | 20260415 | "2026-04-15" |
Time (T) | 101530 | "10:15:30" |
Flag (C, length 1) | X / blank | true / false |
| Integer | 042 | 42 |
Decimal (P, BCD, DECF16, DECF34) | 001234 with DECIMALS=2 | 12.34 |
Textual numeric (N) | 0000123456 | "0000123456" |
| Text | ALICE␣␣␣␣␣ | "ALICE" |
NOTEFields of type
N(textual numeric) are kept as strings to preserve leading zeros in identifiers such as customer, material, and document codes in SAP.
SAP tables have a 512-character limit per row in the DATA field. For wider records, SAP provides the extended ET_DATA table. To use it, include the USE_ET_DATA_4_RETURN parameter with the value "X" in the input payload, and also set the DELIMITER:
IMPORTANTFor
ET_DATAparsing to work, you must enableautoParse=truein the step and setDELIMITERin the payload. Without the delimiter, theET_DATAcontent is not transformed and the response remains in raw format.
In ET_DATA mode, the connector uses the DELIMITER to separate the fields of each row instead of positional offsets. Type conversions follow the same rules as the standard autoParse. The final output assembles the objects in exporting.ET_DATA with named fields.
The ET_DATA flow is activated only when all of the following conditions are true:
autoParse=true in the step;RFC_READ_TABLE;importing.USE_ET_DATA_4_RETURN = "X" in the payload;importing.DELIMITER set in the payload;exporting.ET_DATA and tables.FIELDS.SAP returns errors in the RETURN table, classified by type:
E (Error) — a business error (e.g., a nonexistent table or invalid data). The flow continues, metadata.status becomes ERROR, and the message is added to metadata.errors.A (Abort) — a critical error. The connector raises an exception and interrupts the flow.When a flow with the SAP RFC connector runs, the following tags are automatically added to the execution span in Sensedia Analytics:
Tag | Description |
|---|---|
sap.rfc.datasource | Name of the data source used |
sap.rfc.ashost | Application Server (host configured in the data source) |
sap.rfc.function | Name of the executed RFC/BAPI |
Use these tags to filter executions in the Trace Detail and diagnose connectivity or performance issues in high-volume environments.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more