---
schema_version: "1"
id: 18f41a9126b2164b5a71d42d1cecf4a5df7de3e3622297fb5d57f33b159a6061
title: SAP Connector 5.9 Studio Configuration
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/sap-connector/latest/sap-connector-studio.md
canonical_url: https://docs.mulesoft.com/sap-connector/latest/sap-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f040607b2d2821f5eb1a1055c322b73822b8034deb35a6515c9265deaa47285c
description: MuleSoft Documentation Site
release: "5.9"
latest: true
---
---
product: SAP Connector
version: 5.9
is-latest-version: true
---

# SAP Connector 5.9 Studio Configuration

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Install SAP Connector and configure the connector in Anypoint Studio. First install the SAP Java
Connector (JCo) libraries that you obtain from SAP and then you can create an app containing one or
more SAP Connector operations. Studio enables you to create an app and access the app from a
browser.

To configure SAP Connector in Anypoint Studio:

1.  Add the connector to your Mule project.

2.  Configure the SAP connector.

3.  Configure an input source for the connector.

## Add the Connector to Your Mule Project

Add SAP Connector to your Mule project to automatically populate the XML code with the connector’s
namespace and schema location and to add the required dependencies to the project’s `pom.xml` file:

1.  In the **Mule Palette** view, click **(X) Search in Exchange**.

2.  In the **Add Dependencies to Project** window, type `sap` in the search field.

3.  Click **SP Connector** in **Available modules**.

4.  Click **Add**.

5.  Click **Finish**.

Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.

## Select a Source Operation

1.  In Anypoint Studio, click the **Mule Palette** and type `sap`.

2.  Choose an operation.  
    If you want your app to start when an object is sent from SAP, choose either of the following
    operations and drag the operation to the **Source** area of the Studio canvas.

    - **Document source** listens for a change to an IDoc. When an IDoc changes, your app executes

    - **Function source** listens for a change to an SAP function module. When the targeted function
      module changes, your app executes.

      See the [SAP Connector Reference](https://docs.mulesoft.com/sap-connector/latest/sap-connector-reference) for field values. If you chose the
      **Document source** or **Function source** operation, proceed to the next section to install
      the SAP libraries.

3.  Alternatively, you can configure an input source for this connector such as an **HTTP
    Listener**, or **Scheduler**, and drag the operation to the Studio canvas.  
    An HTTP Listener enables you to start your app from a browser. A Scheduler starts your app at a
    specific time.

4.  Install the SAP libraries.

## Install SAP Libraries

To use SAP libraries in your Mule project, you must first download the libraries to your computer.
You can use the three libraries in Anypoint Studio directly, without conversion. You must have an
SAP ID to download the libraries.

The file types for each library depend on your operating system:

<table><colgroup><col> <col></colgroup><thead><tr><th>OS</th><th>File Types</th></tr></thead><tbody><tr><td><p>Windows</p></td><td><div><div><ul><li><p>sapidoc3.jar</p></li><li><p>sapjco3.jar</p></li><li><p>sapjco3.dll</p></li></ul></div></div></td></tr><tr><td><p>Mac OS</p></td><td><div><div><ul><li><p>sapidoc3.jar</p></li><li><p>sapjco3.jar</p></li><li><p>libsapjco3.jnilib</p></li></ul></div></div></td></tr><tr><td><p>Linux</p></td><td><div><div><ul><li><p>sapidoc3.jar</p></li><li><p>sapjco3.jar</p></li><li><p>libsapjco3.so</p></li></ul></div></div></td></tr></tbody></table>

> [!NOTE] SAP Connector supports SAP JCo libraries versions 3.0.x and 3.1.x.

After you install the libraries, you can customize the global element properties and test the
connection.

## Configure the Libraries in Anypoint Studio

After installing the SAP Connector in Studio and adding the connector to your Mule project,
configure the libraries.

1.  Double-click the connector in the flow.

2.  Click the plus sign (**+**) on the right of the **Connector Configuration** field.  
    This screen appears:

    ![SAP Connector global element properties window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-01.png)

### Install the IDOC Library

1.  Click **Add Dependency**.

2.  Click **Install**.

    ![Install button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02.png)

3.  In the **Install** menu, click **Browse** to locate the library file.

4.  Specify a unique group ID, artifact ID, and version.

    ![Install file into local repository window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02-in.png)

5.  Click **Finish** or, if you want to cancel, click **Remove Dependency**.

    ![Finish button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02-finish.png)

### Install the JCO Library

1.  Click **Add Dependency**.

2.  Click **Install**.

    ![Install button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02.png)

3.  In the **Install** menu, click **Browse** to locate the library file.

4.  Specify a unique group ID, artifact ID, and version.

    ![Install file into local repository window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-03-in.png)

5.  Click **Finish** or, if you want to cancel, click **Remove Dependency**.

    ![Finish button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-03-finish.png)

### Install the JCO Native Library

1.  Click **Add Dependency**.

2.  Click **Install**.

    ![Install button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02.png)

3.  In the **Install** menu, click **Browse** to locate the library file.

    On MacOS, starting with JCO version 3.1.2, the native library extension was changed from
    `jnilib` to `dylib`.

    1.  After installing the library from the local machine:

    2.  Navigate to the bottom of the **Shared Folder** window.

    3.  Select **Any**, and then select the `dylib` native library.

    4.  In the **Install file into local repository** window, enter values for the following fields:

        - **Group ID**

        - **Artifact ID**

        - **Version**

4.  Specify a unique group ID, artifact ID, and version.

    ![Install file into local repository window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-04-in.png)

5.  Click **Finish** or, if you want to cancel, click **Remove Dependency**.

    ![Finish button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-04-finish.png)

When you are finished installing the libraries, the configuration screen appears as follows with
green check marks for each successfully installed library:

![Global element properties window with required libraries installed](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-libraries-installed.png)

## Test the Connection

1.  Sign into your SAP login to get the information you need to configure the remaining **Global
    Element Properties** fields as described in [Configure in Studio](#gepparms).

2.  Click **Test Connection** to ensure that you have the correct login information.

## Configure the Connector

If you need more than one SAP Connector instance in your Mule project, you can create a global SAP
element. The SAP Connector object holds the configuration properties that allow you to connect to
the SAP server.

To create a configuration for SAP Connector, complete the following steps:

1.  Go to **Global Elements** section and click **Create**.

2.  Select either **SAP Inbound** or **SAP Outbound** in the **Connector Configuration** section.

3.  In the **General** tab pane, enter the required parameters for defining an SAP connection, which
    your SAP system administrator can supply.

The SAP global element properties allow you to define connection properties as well as to add the
required SAP dependencies to your project.

For ease of use, SAP Connector shows only the most common properties as connector parameters. To
configure a property that is not listed in the **Properties** panel, see the
[Define Extended Properties](https://docs.mulesoft.com/sap-connector/latest/sap-connector-config-topics) topic.

The minimum required attributes to define are:

<table id="gepparms"><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Application Server Host</strong></p></td><td><div><div><p>SAP endpoint</p></div></div></td></tr><tr><td><p><strong>Username</strong></p></td><td><div><div><p>Username of an authorized SAP user</p></div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>Password credential of an authorized SAP user</p></div></div></td></tr><tr><td><p><strong>System Number</strong></p></td><td><div><div><p>System number used to connect to the SAP system</p></div></div></td></tr><tr><td><p><strong>Client</strong></p></td><td><div><div><p>The SAP client ID (usually a number) used to connect to the SAP system</p></div></div></td></tr><tr><td><p><strong>Login Language</strong></p></td><td><div><div><p>The language to use for the SAP connection. For example, <code>EN</code> for English.</p></div></div></td></tr></tbody></table>

As a best practice, use property placeholder syntax to load the credentials in a more simple and
reusable way.

Click **Test Connection** to verify that the connection to the SAP instance is correct. If the
credentials are correct you should see the `Test Connection Successful` message.

## View the App Log

To check for problems, you can view the app log as follows:

- If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio
  console window.

- If you’re running the app using Mule from the command line, the app log is visible in your OS
  console.

Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/<app-name>.log`.

## Next

After configuring this connector in Studio, see the
[Additional Configuration Information](https://docs.mulesoft.com/sap-connector/latest/sap-connector-config-topics) topic for more configuration
topics.

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Salesforce Help](https://help.salesforce.com)
