> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bondata.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SAP

> Connect BonData to SAP ERP for master data and transactional records

SAP is the enterprise resource planning (ERP) system that runs finance, logistics, procurement, and manufacturing for many of the world's largest organizations. With BonData, you can connect to your SAP account to read, enrich, and sync your ERP data within Agent workflows.

## SAP RFC Connection Setup

BonData connects to SAP over the RFC protocol and calls standard BAPI function modules to read master data and transactions. You will need SAP Application Server details and a service user with RFC access.

<Note>
  BonData uses the SAP NetWeaver RFC SDK. Direct application server and message server (load-balanced) connections are both supported.
</Note>

### Step 1: Gather Your Application Server Details

Ask your SAP Basis administrator for the connection parameters for the target system:

* **Application Server Host** - the hostname or IP of the SAP application server
* **System Number** - the two-digit instance number (e.g., `00`)
* **Client** - the SAP client number (e.g., `100`)

<Tip>
  For load-balanced systems, your Basis team can instead provide a Message Server host, message server service, and logon group.
</Tip>

### Step 2: Create a Service User

1. In SAP, use transaction **SU01** to create a dedicated user for the integration
2. Set the user type to **Communications** or **Dialog** as required
3. Assign a role that grants authorization for RFC execution (authorization object **S\_RFC**) and read access to the relevant BAPIs

### Step 3: Confirm RFC and BAPI Authorizations

1. Verify the user can execute the required function modules, such as `BAPI_CUSTOMER_GETLIST`, `BAPI_MATERIAL_GETLIST`, and `BAPI_SALESORDER_GETLIST`
2. Confirm the logon language (e.g., `EN`)

### Step 4: Enter Credentials in BonData

1. In BonData, navigate to **Integrations** and select **SAP**
2. Enter your **Application Server Host**, **System Number**, **Client**, **User**, and **Password**
3. Optionally set the **Language** and any SAP Router string
4. Click **Connect**

## Required Fields

| Field                   | Description                                             |
| ----------------------- | ------------------------------------------------------- |
| Application Server Host | Hostname or IP of the SAP application server (`ashost`) |
| System Number           | Two-digit instance number (`sysnr`)                     |
| Client                  | SAP client number (`client`)                            |
| User                    | RFC service user name (`user`)                          |
| Password                | Password for the RFC service user (`passwd`)            |
| Language                | Logon language, e.g. `EN` (`lang`)                      |

## Available Data

Once connected, BonData can sync the following SAP records:

* **Customers** - Customer master data (`BAPI_CUSTOMER_*`)
* **Materials** - Material master data (`BAPI_MATERIAL_*`)
* **Sales Orders** - Sales order headers and items (`BAPI_SALESORDER_*`)
* **Purchase Orders** - Purchase order details (`BAPI_PO_*`)
* **GL Accounts** - General ledger account master data (`BAPI_GL_ACC_GETLIST`)
