Contact Free trial Login

SAP Connector Studio Configuration - Mule 4

Install the 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 the SAP Connector in Anypoint Studio:

  1. Install the connector.

  2. Configure the connector.

  3. Configure an input source for the connector.

Install the SAP Connector Using Exchange

  1. In Studio, create a Mule project.

  2. Click the Exchange (X) icon in the upper left of the Studio task bar.

  3. In Exchange, click Login and supply your Anypoint Platform username and password.

  4. In Exchange, search for "SAP".

  5. Select the SAP Connector, click Add to project.

  6. Follow the prompts to install the SAP Connector.

Install the SAP Connector in Studio

  1. In Studio, create a Mule project.

  2. In the Mule Palette, click (X) Search in Exchange.

  3. In Add Modules to Project, type "SAP" in the search field.

  4. Click SAP Connector in Available modules.

  5. Click Add.

  6. Click Finish.

Select a Source Operation

In Anypoint Studio, click the Mule Palette and type "sap". Choose an operation. If you want your app to start when an object is sent from SAP, choose either the Document source or Function source operation and drag the operation to the Source area of the Studio canvas.

  • Document source listens for a change to an IDocument. When an IDocument changes, your app executes

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

See the SAP Connector Reference for field values.

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

If you chose the Document source or Function source operation, proceed to the next section to install the SAP libraries. If you chose HTTP Listener, or Scheduler, choose an SAP operation and drag it to the Studio canvas. Proceed to the next section to 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 must have an SAP ID to do this.

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

  • Windows: sapidoc3.jar, sapjco3.jar, sapjco3.dll

  • Mac OS: sapidoc3.jar, sapjco3.jar, libsapjco3.jnilib

  • Linux: sapidoc3.jar, sapjco3.jar, libsapjco3.so

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

You can use the three libraries in Anypoint Studio directly, without conversion.

Configure the Libraries in Anypoint Studio

After installing the SAP Connector in Studio and adding the connector to your Mule project, double click the connector in the flow, and click the plus (+) sign to the right of the Connector Configuration field.

This screen appears:

sap connector configuration 01

Install the IDOC Library

  1. Click Add Dependency.

  2. Click Install.

    sap connector configuration 02
  3. In the Install menu, click Browse to locate the library file.

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

    sap connector configuration 02 in

    When done, click Finish or, if you want to cancel, click Remove Dependency.

    sap connector configuration 02 finish

Install the JCO Library

  1. Click Add Dependency.

  2. Click Install.

    sap connector configuration 02
  3. In the Install menu, click Browse to locate the library file.

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

    sap connector configuration 03 in

    When done, click Finish or, if you want to cancel, click Remove Dependency.

    sap connector configuration 03 finish

Install the JCO Native Library

  1. Click Add Dependency.

  2. Click Install.

    sap connector configuration 02
  3. In the Install menu, click Browse to locate the library file.

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

    sap connector configuration 04 in

    When done, click Finish or, if you want to cancel, click Remove Dependency.

    sap connector configuration 04 finish

When Done Installing Libraries

When done, the configuration screen appears as follows with green check marks for each successfully installed library:

sap connector libraries installed
  1. If you have not done so already, sign into your SAP login to get information you need to configure the remaining Global Element Properties fields as described in Configure in Studio.

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

Configure the Connector

If needed, you can create a global SAP element if you need more than one SAP connector instance in your Mule project.

The SAP connector object holds the configuration properties that allow you to connect to the SAP server.

To create a configuration for an 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 allows you to define connection properties as well as to add the required SAP dependencies to your project.

For ease of use, the SAP Connector only shows the most common properties as connector parameters. To configure a property that is not listed in the Properties panel, see the Define Extended Properties topic.

The minimum required attributes to define are:

Field Description

Application Server Host

SAP endpoint.

Username

Username of an authorized SAP user.

Password

Password credential of an authorized SAP user.

System Number

System number used to connect to the SAP system.

Client

The SAP client ID (usually a number) used to connect to the SAP system.

Login Language

The language to use for the SAP connection. For example, EN for English.

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.

Next

After configuring this connector in Studio, see the Additional Configuration Information topic for more configuration topics.

See Also

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.