The SAP connector in IBM® App Connect provides an RFC interface to directly connect to your on-premises SAP system. Alternatively, you can connect to SAP via OData; see SAP (via OData).
To use the SAP RFC connector in App Connect, you must configure an on-premises IBM App Connect Enterprise integration server as an App Connect Agent. This agent will run part of your App Connect flow when you use the SAP RFC connector.
This guide shows you how to set up connectivity to your on-premises SAP system via RFC.
If you can’t find what you want, or have comments about the “how to” information, please either add comments to the bottom of this page or send us comments by email.
What should I consider first?
- The App Connect Agent can run on Linux only.
- You can have just one App Connect Agent for each App Connect instance.
- You must use an independent integration server for your agent (for more information, see Integration servers and integration nodes in IBM Knowledge Center).
- Don’t use the integration server that you configure as an App Connect Agent for any other purpose. Don’t deploy your own flows to that integration server.
Connecting to SAP RFC
- Install IBM App Connect Enterprise version 184.108.40.206 or later.
- Set up an App Connect Enterprise command environment (for more information, see Setting up a command environment in IBM Knowledge Center).
- In App Connect Enterprise, create an integration server by using the
mqsicreateworkdircommand (for more information, see Creating an integration server in IBM Knowledge Center).
- In App Connect, download the agent configuration file:
- On the Catalog tab, click SAP, then click Connect.
- In the Private network connections (App Connect Agent) field, click Connect a new agent, then click Download the configuration.
- Copy the downloaded
agenta.jsonconfiguration file to the directory
work_directory/config/iibswitch/agenta, where work_directory is the work directory that you specified when you created the integration server.
- Go to the SAP Support Portal and download SAP Java Connector and the SAP Java IDoc Class Library, which together contain the following files:
- Open the integration server configuration file (
work_directory/server.config.yaml) and modify the following section to specify the directory where you downloaded the SAP
jarsURL: '/tmp/SAPJCo' # Set to the absolute path containing the .jar files.
nativeLibs: '/tmp/SAPJCo' # Set to the absolute path containing the .so file.
- In App Connect Enterprise, start your integration server (for more information, see Starting an integration server in IBM Knowledge Center). From this point your integration server is an App Connect Agent.
- In the messages that are shown when you start the App Connect Agent integration server, check for a message that says the agent is registered with the same App Connect Agent identifier as is shown in App Connect, in the Create an agent dialog box.
- In App Connect, close the Create an agent dialog box, complete the remaining connection settings for the SAP RFC application, then click Connect.
- SAP application server host name: The host name or IP address of the SAP system
- System number: The system number of the instance that you want to access in the SAP system, typically defined as a two-digit number ranging from 00 to 97
- Client: The three-digit number of the client that you want to access within the SAP instance; for example, 110
- Language: The ISO two-letter code (case-insensitive) that identifies the logon language of the SAP system; for example, en or EN
- Code page: The four-digit number that identifies the code page to use in the SAP system; for example, 1100
- User name: The user name to use for connecting to the SAP system
- Password: The password for the specified user name
- Private network connections (App Connect Agent): The name of the private network connection (App Connect Agent) that you configured earlier
You have 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. You can view your App Connect Agent connections in the Private network connections page (from the App Connect menu, click Manage > Private network connections). From the Private network connections page you can rename your agent and reopen the agent setup instructions.
If you later stop your App Connect Agent, before you restart it you need to ensure that it doesn’t have any flows deployed to it. These flows might interfere with the flows that will be deployed automatically when the SAP RFC application is used.
- Ensure that your App Connect Agent is stopped.
- Navigate to the work directory of your App Connect Agent and delete the contents of the ‘run’ directory. The work directory is the directory that you specified when you created the App Connect Agent.
- Restart the App Connect Agent.
When you use the SAP RFC application in App Connect, it runs partly in the cloud and partly on premises, so there are two places where you might need to look for log information to help diagnose any problems:
- For problems with the flow that is running in App Connect (which runs on IBM Cloud), view additional log information by opening the App Connect menu and selecting Manage > Logs.
- For problems with the App Connect Agent (which runs on premises), view the App Connect Enterprise user trace for the App Connect Agent to see log information. For more information about user trace, including how to start it, see: Using trace in IBM Knowledge Center. Start user trace for the integration server that you configured as an App Connect Agent, then repeat the action that caused the problem and check the user trace for errors.
Problems when starting your agent
When you start the App Connect Agent, you can see relevant logs in two places. These logs are about the on-premises part of the application. Check these for any messages that might indicate a problem:
- A subset of the logs is shown in the command console window for the App Connect Agent. This window is the one in which you entered the command to start your App Connect Agent.
- The full set of logs are visible in the App Connect Enterprise user trace for the App Connect Agent.
Problems when running the agent
When you are running the App Connect Agent, you can check the App Connect logs for error messages. If you see a message that says it’s not possible to connect to the App Connect Agent, try to reconnect by opening the Private network connections page (from the App Connect menu, click Manage > Private network connections) and refreshing the list. On the Lite plan, agents become idle after a period of inactivity, and refreshing the private network connections list restarts them.
Problems when running 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 Agent.