Using the SAP Java Connector
This topic describes how to add the required components to your production so that it can send requests to SAP. Also see Setup Tasks.
Basics
Add the following business hosts to your production.
-
The business service EnsLib.JavaGateway.ServiceOpens in a new tab. Configure this business host as described later in this topic.
-
The business operation EnsLib.SAP.OperationOpens in a new tab.
Configure this business host as described in the later in this topic.
-
One or more business hosts that send SAP request messages to EnsLib.SAP.OperationOpens in a new tab, as needed.
Use the message classes that you generated. Your business hosts should create instances of these classes, set properties as applicable, and send the messages to the instance of EnsLib.SAP.OperationOpens in a new tab.
When the SAP business operation first connects to SAP, it creates a file that the Java Gateway (and SAP Java driver) later need access to. Starting at release 2024.2, this file is written to the install-dir/mgr directory (rather than the working directory for the namespace). Consequently it is necessary to make sure that the Java Gateway has access to the file; to do this, configure the Java External Language Server so that the JVM argument settings include information for finding the file. For example:
-Djco.destinations.dir=c:\InterSystems\mgr\MYNAMESPACE
Settings for EnsLib.JavaGateway.Service
Configure the settings for EnsLib.JavaGateway.ServiceOpens in a new tab so that it can find the Java Gateway. These settings are:
The value of this setting should be an external language server name as described in Managing External Server Connections.
Determines if an attempt will be made to stop the specified named server when this business host stops. The default is off.
Settings for EnsLib.SAP.Operation
EnsLib.SAP.OperationOpens in a new tab sends requests to SAP JCo, via the Java Gateway. For this business host, specify the following settings:
SAP Client e.g 000.
This is the name of the set of production credentials to use when accessing the SAP server. See Defining Production Credentials.
Host name or IP address of the SAP server.
SAP SystemNumber e.g 00.
Specifies whether to execute the BAPI "BAPI_TRANSACTION_COMMIT" after a successful BAPI/RFC-call.
Configuration item in this production that should receive the SAP response.
Name of the (required) configuration item that hosts the Java Gateway.
For settings not listed here, see Settings in All Productions.