![sap-ecc icon](/docs/img/components/icons/60/c2FwLWVjYw==.png)

# SAP ECC Connector

key: sap-ecc[Source](https://github.com/prismatic-io/components/tree/main/components/sap-ecc)[Connector Changelog](#changelog)

## Description[​](#description "Direct link to Description")

[SAP ECC](https://www.sap.com/products/erp.html) is an enterprise resource planning (ERP) system from SAP for managing core business processes. This component allows sending SOAP requests, call BAPIs via RFC, send and track IDocs, and receive change notifications from SAP ECC systems.

#### API Documentation[​](#api-documentation "Direct link to API Documentation")

This component was built using the [SAP ECC SOAP/RFC Interface](https://help.sap.com/docs/SAP_ERP)

## Connections[​](#connections "Direct link to Connections")

### On-Premise Connection[​](#sapecc "Direct link to On-Premise Connection")

**key: sapEcc**

Connects to an on-premises SAP ECC server through an on-prem agent using basic authentication. Create a connection of type **On-Premise Connection** to get started.

#### Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* An SAP ECC system accessible from the on-prem agent
* An on-prem agent deployed and configured within the network that has access to the SAP server
* SAP user credentials with appropriate permissions for the required operations

#### Setup Steps[​](#setup-steps "Direct link to Setup Steps")

1. Deploy and configure an on-prem agent within the network that has access to the SAP ECC server.
2. The **Host** and **Port** fields are controlled by the on-prem agent configuration and are set on the agent side.
3. In the connection configuration, enter the **SAP Client**, **Username**, and **Password** values.

#### Configure the Connection[​](#configure-the-connection "Direct link to Configure the Connection")

* **Host**: The hostname or IP address of the SAP ECC server (e.g., `sap-ecc.internal`). Controlled by the on-prem agent.
* **Port**: The HTTPS port of the SAP ECC server (default: `44300`). Controlled by the on-prem agent.
* **SAP Client**: The SAP client number to connect to (e.g., `100`). This value is sent as the `sap-client` query parameter.
* **Username**: The SAP username for authentication.
* **Password**: The SAP password for authentication.

**On-prem enabled**: this connection can be configured to connect to an on-prem resource on a private network. [Learn more](https://prismatic.io/docs/integrations/connections/on-prem-agent.md).

| Input      | Notes                                                                                            | Example          |
| ---------- | ------------------------------------------------------------------------------------------------ | ---------------- |
| Host       | The hostname or IP address of the SAP ECC server (e.g., sap-ecc.internal).                       | sap-ecc.internal |
| Password   | The SAP password for authentication.                                                             |                  |
| Port       | The HTTPS port of the SAP ECC server.                                                            | 44300            |
| SAP Client | The SAP client number to connect to (e.g., 100). This is sent as the sap-client query parameter. | 100              |
| Username   | The SAP username for authentication.                                                             |                  |

## Triggers[​](#triggers "Direct link to Triggers")

### New IDocs[​](#pollidoctrigger "Direct link to New IDocs")

Checks for new IDocs in the SAP EDIDC table on a configured schedule, using the DOCNUM field as a cursor. | **key: pollIdocTrigger**

| Input           | Notes                                                                                                                                                                                                                         | Example          |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| Connection      | The SAP ECC connection to use.                                                                                                                                                                                                |                  |
| Direction       | Optional IDoc direction filter (DIRECT).                                                                                                                                                                                      |                  |
| Endpoint        | The SAP SOAP endpoint path.                                                                                                                                                                                                   | /sap/bc/soap/rfc |
| Message Type    | Optional IDoc message type filter (MESTYP). Only IDocs matching this type will be returned.                                                                                                                                   | ORDERS           |
| Row Count       | Maximum number of IDocs to return per poll cycle.                                                                                                                                                                             | 50               |
| Starting DOCNUM | Used only on the very first poll when no cursor state exists yet. Once polling begins and state is saved, this value is ignored. Set this to the last known DOCNUM in your SAP system to avoid processing historical records. | 0000000000012345 |

Checks for new IDocs in the SAP EDIDC table on a configured schedule using the DOCNUM field as a high-water-mark cursor. Unlike date-based polling, it relies solely on document number ordering to detect new IDocs since the last poll. Only new IDocs are detected — updates to existing IDocs are not captured.

#### How It Works[​](#how-it-works "Direct link to How It Works")

1. The trigger runs on the configured schedule.
2. On the first execution it reads the **Starting DOCNUM** input (or defaults to `0000000000000000`) to seed the cursor.
3. It calls `RFC_READ_TABLE` via SOAP/RFC, querying EDIDC for rows where `DOCNUM > lastDocnum`, applying any optional **Message Type** or **Direction** filters.
4. The highest DOCNUM in the result set becomes the new cursor, which is persisted in polling state.
5. Subsequent executions repeat from step 3 using the stored cursor, ignoring the **Starting DOCNUM** input.

Configuration (6 inputs)

| Input               | Required | Default            | Description                                                                                                                                                                      |
| ------------------- | -------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Connection**      | Yes      | —                  | The SAP ECC connection to use.                                                                                                                                                   |
| **Endpoint**        | Yes      | `/sap/bc/soap/rfc` | The SAP SOAP endpoint path.                                                                                                                                                      |
| **Row Count**       | No       | `50`               | Maximum number of IDocs to return per poll cycle.                                                                                                                                |
| **Message Type**    | No       | —                  | Optional IDoc message type filter (MESTYP). Only IDocs matching this type are returned (e.g., `ORDERS`).                                                                         |
| **Direction**       | No       | —                  | Optional IDoc direction filter (DIRECT). `1` = Outbound, `2` = Inbound.                                                                                                          |
| **Starting DOCNUM** | No       | `0000000000000000` | Cursor seed for the very first poll when no state exists yet. Set this to the last known DOCNUM to avoid processing historical records. Ignored after the first successful poll. |

#### Returned Data[​](#returned-data "Direct link to Returned Data")

The trigger returns an object containing the matched IDoc records, a count, and the updated cursor value.

Example Payload

```json
{
  "records": [
    {
      "idocNumber": "0000000000000025",
      "status": "53",
      "messageType": "ORDERS",
      "idocType": "ORDERS05",
      "createdDate": "20260311",
      "createdTime": "104530",
      "direction": "2"
    },
    {
      "idocNumber": "0000000000000026",
      "status": "53",
      "messageType": "ORDERS",
      "idocType": "ORDERS05",
      "createdDate": "20260311",
      "createdTime": "104535",
      "direction": "2"
    }
  ],
  "recordCount": 2,
  "lastDocnum": "0000000000000026"
}

```

| Field         | Description                                                    |
| ------------- | -------------------------------------------------------------- |
| `records`     | Array of IDoc records matching the query filters.              |
| `recordCount` | Number of records returned in this poll cycle.                 |
| `lastDocnum`  | The highest DOCNUM seen, used as the cursor for the next poll. |

#### State Management[​](#state-management "Direct link to State Management")

* The highest DOCNUM from each poll cycle is persisted as the cursor for the next execution.
* On the first execution, the **Starting DOCNUM** input seeds the cursor. After the first successful poll, the persisted cursor is used and **Starting DOCNUM** is ignored.
* If a SOAP call fails, the error is logged and the cursor is preserved so the next poll retries from the same position.
* When no new IDocs are found, the trigger signals `polledNoChanges` so the platform can skip downstream processing.
* The **Row Count** input caps the number of rows returned per cycle. In high-volume environments, consider lowering the poll interval or increasing this value to avoid falling behind.

Example Payload for <!-- -->New IDocs[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/triggers/pollIdocTrigger.json "Download example payload")

Loading…

***

## Data Sources[​](#data-sources "Direct link to Data Sources")

### Select BAPI[​](#selectbapi "Direct link to Select BAPI")

Search for available BAPIs/RFC function modules in SAP. Use a search pattern to filter results. | **key: selectBapi** | **type: picklist**

| Input          | Notes                                                                                          | Example          |
| -------------- | ---------------------------------------------------------------------------------------------- | ---------------- |
| Connection     | The SAP ECC connection to use.                                                                 |                  |
| Endpoint       | The SAP SOAP endpoint path.                                                                    | /sap/bc/soap/rfc |
| Search Pattern | ABAP LIKE pattern to filter function module names. Use '%' as wildcard. Defaults to all BAPIs. | BAPI\_CUSTOMER%  |

Example Payload for <!-- -->Select BAPI[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/data-sources/selectBapi.json "Download example payload")

Loading…

***

## Actions[​](#actions "Direct link to Actions")

### Call BAPI[​](#callbapi "Direct link to Call BAPI")

Call any SAP BAPI or RFC function module by name with XML parameters. | **key: callBapi**

| Input              | Notes                                                                                                                  | Example                    |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| BAPI Name          | The BAPI or RFC function module name to call.                                                                          | BAPI\_COMPANYCODE\_GETLIST |
| BAPI Parameters    | XML parameters to pass to the BAPI. These are placed inside the SOAP envelope body for the function call.              | See Example                |
| Commit Transaction | When true, automatically calls BAPI\_TRANSACTION\_COMMIT after the BAPI call succeeds, using the same HTTP session.    | false                      |
| Connection         | The SAP ECC connection to use.                                                                                         |                            |
| Endpoint           | The SAP SOAP endpoint path.                                                                                            | /sap/bc/soap/rfc           |
| Wait on Commit     | When true, passes WAIT='X' to BAPI\_TRANSACTION\_COMMIT, which waits for the update task to complete before returning. | false                      |

Example Payload for <!-- -->Call BAPI[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/actions/callBapi.json "Download example payload")

Loading…

***

### Get IDoc Status[​](#getidocstatus "Direct link to Get IDoc Status")

Retrieve the processing status of an IDoc by reading the EDIDS status table via RFC\_READ\_TABLE. | **key: getIdocStatus**

| Input       | Notes                                   | Example          |
| ----------- | --------------------------------------- | ---------------- |
| Connection  | The SAP ECC connection to use.          |                  |
| Endpoint    | The SAP SOAP endpoint path.             | /sap/bc/soap/rfc |
| IDoc Number | The IDoc number to retrieve status for. | 0000000001234567 |

Example Payload for <!-- -->Get IDoc Status[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/actions/getIdocStatus.json "Download example payload")

Loading…

***

### Read Table[​](#readtable "Direct link to Read Table")

Read data from any SAP table using RFC\_READ\_TABLE. Supports field selection, row limits, and WHERE clause filtering. | **key: readTable**

| Input        | Notes                                                                             | Example                 |
| ------------ | --------------------------------------------------------------------------------- | ----------------------- |
| Connection   | The SAP ECC connection to use.                                                    |                         |
| Endpoint     | The SAP SOAP endpoint path.                                                       | /sap/bc/soap/rfc        |
| Fields       | Comma-separated list of field names to return. If empty, all fields are returned. | MANDT,MTEXT,ORT01       |
| Row Count    | Maximum number of rows to return. Leave empty for all rows.                       | 100                     |
| Row Skips    | Number of rows to skip before returning results.                                  | 10                      |
| Table Name   | The SAP table name to read from.                                                  | T000                    |
| Where Clause | ABAP WHERE clause to filter rows. Each condition must fit within 72 characters.   | MATNR EQ '000000000001' |

Example Payload for <!-- -->Read Table[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/actions/readTable.json "Download example payload")

Loading…

***

### Send IDoc[​](#sendidoc "Direct link to Send IDoc")

Send an IDoc XML payload to SAP ECC for inbound processing via IDOC\_INBOUND\_ASYNCHRONOUS. | **key: sendIdoc**

| Input         | Notes                                     | Example                   |
| ------------- | ----------------------------------------- | ------------------------- |
| Connection    | The SAP ECC connection to use.            |                           |
| Endpoint      | The SAP IDoc inbound endpoint path.       | /sap/bc/idoc\_xml/inbound |
| IDoc XML Data | The full IDoc XML payload to send to SAP. | See Example               |

Example Payload for <!-- -->Send IDoc[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/actions/sendIdoc.json "Download example payload")

Loading…

***

### Send SOAP Request[​](#sendsoaprequest "Direct link to Send SOAP Request")

Send a SOAP XML request to an SAP ECC RFC endpoint and return the raw XML response. | **key: sendSoapRequest**

| Input              | Notes                                                                                                                  | Example                                                 |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Commit Transaction | When true, automatically calls BAPI\_TRANSACTION\_COMMIT after the SOAP request succeeds, using the same HTTP session. | false                                                   |
| Connection         | The SAP ECC connection to use.                                                                                         |                                                         |
| Endpoint           | The SAP SOAP endpoint path.                                                                                            | /sap/bc/soap/rfc                                        |
| Response as JSON   | When true, the XML response will be parsed and returned as JSON.                                                       | false                                                   |
| SOAP Action        | The SOAP Action header value, typically the RFC function module name.                                                  | urn:sap-com:document:sap:rfc:functions:STFC\_CONNECTION |
| SOAP Body          | The full SOAP XML envelope to send in the request body. Must be a valid SOAP 1.1 or 1.2 envelope.                      | See Example                                             |
| Wait on Commit     | When true, passes WAIT='X' to BAPI\_TRANSACTION\_COMMIT, which waits for the update task to complete before returning. | false                                                   |

Example Payload for <!-- -->Send SOAP Request[⤓](https://prismatic.io/docs/example-payloads/sap-ecc/actions/sendSoapRequest.json "Download example payload")

Loading…

***

## Changelog[​](#changelog "Direct link to Changelog")

### 2026-04-30[​](#2026-04-30 "Direct link to 2026-04-30")

Updated spectral version

### 2026-03-20[​](#2026-03-20 "Direct link to 2026-03-20")

Added initial SAP ECC component:

* **Send SOAP Request** action to send SOAP requests to SAP ECC
* **Call BAPI** action with session-aware transaction support
* **Commit Transaction** toggle on **Call BAPI** and **Send SOAP Request** actions, which calls `BAPI_TRANSACTION_COMMIT` on the same HTTP session after the primary request succeeds
* Improved connection labels, input descriptions, and placeholder text for clarity
