How to use IBM App Connect with SAP (via RFC)

SAP is enterprise resource planning (ERP) software. Integrate App Connect with an on-premises SAP system by establishing a connection through the SAP Remote Function Call (RFC) communications interface.

To use the SAP RFC connector in App Connect, you must configure an on-premises IBM® App Connect Enterprise integration server as a secure agent. This agent runs part of your App Connect flow when you use the SAP RFC connector.

Note: Instead of using the SAP RFC connector, you can connect to SAP by using the Open Data Protocol (OData). For more information, see How to use IBM App Connect with SAP (via OData).
The following information describes how to use IBM App Connect to connect SAP (via RFC) to your other applications.

Supported product and API versions

To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.

Before you start

Before you use App Connect Designer with SAP (via RFC), take note of the following considerations:

  • Use an independent integration server for your secure agent.

    For more information, see Integration servers and integration nodes.

  • Don't use the integration server that you configure as an App Connect secure agent for any other purpose. Don't deploy your own flows to that integration server.
  • (General consideration) You can see lists of the trigger events and actions that are available on the Applications and APIs page of the App Connect Designer.

    For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Connecting to SAP (via RFC)

  1. Install IBM App Connect Enterprise version 12.0.9.0 or later.
  2. Set up an App Connect Enterprise command environment.

    For more information, see Setting up a command environment.

  3. In App Connect Enterprise, create an integration server by using the mqsicreateworkdir command.

    For more information, see Creating an integration server.

  4. In App Connect, download the switchclient.json file.

    For more information, see Connecting to a private networkConnecting to a private network from App Connect Designer (for IBM App Connect in containers version).

  5. Copy the downloaded switchclient.json configuration file to the directory work_directory/config/switch/switchclient.json, where work_directory is the work directory that you specified when you created the integration server.
  6. Go to the SAP Support Portal and download the SAP Java™ Connector and the SAP Java IDoc Class Library, which together contain the following files:
    • sapjco3.jar
    • libsapjco3.so
    • sapidoc3.jar
  7. Open the configuration file for the integration server (server.config.yaml) and modify the following section to specify the directory where you downloaded the SAP .jar and .so files:
    ConnectorProviders:
    SAPConnectorProvider:
    jarsURL: '/tmp/SAPJCo' # Set to the absolute path containing the .jar files.
    nativeLibs: '/tmp/SAPJCo' # Set to the absolute path containing the .so file.
  8. In App Connect Enterprise, start your integration server.

    For more information, see Starting an integration server. From this point, your integration server is configured as an App Connect secure agent.

  9. When you start the secure agent integration server, check for a notification that the agent is registered with the same App Connect secure agent identifier.
  10. In App Connect, complete the remaining connection settings for the SAP RFC application, then click Connect.
    Connection field Description
    SAP application server hostname Specify the hostname or IP address of the SAP system.
    System number Specify the two-digit system number of the instance that you want to access in the SAP system; for example, 00.
    Client Specify the three-digit number of the client that you want to access within the SAP instance; for example, 110.
    Language Specify the ISO two-letter case-insensitive code that identifies the language setting of the SAP system; for example, en or EN.
    Code page Specify the code page to use in the SAP system; for example, 1100.
    Username Specify the username to use when you connect to the SAP system.
    Password Specify the password associated with the username.
    Private network connection Select the name of a private network agent that App Connect uses to connect to your private network. This list is populated with the names of private network agents that are created on the Private networks page. For more information, see Connecting to a private network.
    Tip:

    Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.

You configured a connection to your on-premises SAP system, and you can now create a flow in App Connect that uses the SAP RFC application.

Events and actions

SAP (via RFC) events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

SAP (via RFC) actions

Your flow completes these actions on this application.

Available items are listed after you connect App Connect to SAP (via RFC).

Troubleshooting

When you use the SAP RFC application in App Connect, it runs partly in the cloud and partly on premises. Therefore, to diagnose problems, you need to look at log information in two places:

  • For problems with the flow that is running in App Connect, view log information in the Logs view Logs icon.
  • For problems with the App Connect secure agent that runs on premises, look for log information in the App Connect Enterprise user trace for the App Connect secure agent. For more information, see Using trace. Start a user trace for the integration server that you configured as an App Connect secure agent, then repeat the action that caused the problem and check the user trace for errors.

Troubleshooting problems when you start your agent

When you start the App Connect secure agent, you can see relevant logs in two places. These logs are about the on-premises part of the application. Check these logs for any messages that might indicate a problem.

  • A subset of the logs is shown in the command console window for the App Connect secure agent. This window is the one in which you entered the command to start your App Connect secure agent.
  • The full set of logs are visible in the App Connect Enterprise user trace for the App Connect secure agent.

Troubleshooting problems when you run the agent

When you are running the App Connect secure agent, you can check the App Connect logs for error messages. If a message indicates that it's not possible to connect to the App Connect secure agent, go to the Private network connections page Logs icon and refresh the list of connections.

Troubleshooting problems when you run the SAP RFC application

If you encounter problems when you run your SAP RFC application, errors can be seen in App Connect logs, or in the App Connect Enterprise user trace for your App Connect secure agent.