An InterSystems SAP Business Service to receive from a SAP System.
- InterSystems SAP Service
- sapco.jar 3.0.11 or higher
- intersystems-jdbc.jar
- intersystems-utils.jar
Note: The intersystems-jdbc.jar and intersystems-utils.jar are included in the InterSystems IRIS installation. You can find them in the
~/dev/java
folder.
- InterSystems IRIS 2022.1 or newer or InterSystems IRIS for Health 2022.1 or newer
- An interoperability enabled namespace
- Java JDK 1.8 or 11
- Download the intersystems-sap-service-*.jar file from the latest release
- Save the file to a folder visible to the InterSystems IRIS instance
- In the Management Portal navigate to System Administration > Configuration > Connectivity > External Language Servers
- Click on Create External Language Server or configure the standard %Java Server server by double-clicking on the server name
- Select Java as the Server Type
- Select the current intersystems-utils-x.x.x.jar in the classpath field. This file comes with your InterSystems IRIS installation. It can be found in
<irissys>/dev/java/lib/1.8/
. Seperate all additonal class paths with a Semi-colon (;) for Windows-Systems (e.g. /pathA/1.jar;/pathB/2.jar;/pathC/3.jar) and a colon (:) for UNIX-Systems (e.g. /pathA/1.jar:/pathB/2.jar:/pathC/3.jar). - Select the sapjco.jar in the Class Path field. The sapjco.dll must be in the same folder as the sapjco.jar file
- Select the intersystems-utils.jar intersystems-sap-service-*.jar in the Class Path field.
- Select the jdk folder in the Java Home Directory field
- Click on Save
- Click on Start next to the server you just created
Note: This step is namespace independent. You can use the same server in multiple namespaces.
- In the Management Portal navigate to System Explorer > Classes
- On the left side of the screen select the namespace where you want to use the service
- Click on Import
- Select Directory under Import from File or a Directory
- Select the cls folder from the downloaded repository
- Click on Import
- In the Management Portal navigate to Interoperability > Configure > Production
- Create a new production or open an existing one
- Click on the + button next to the Services
- In the field Service Class select the class com.intersystems.dach.ens.sap.PassthroughService
- Click on OK
- In the Management Portal navigate to Interoperability > Configure > Credentials
- Add an ID of your choice
- Select the User Name
- Select the Password
- Click on Save or New
- Select the just created service
- Select the Settings tab on the right side of the screen
- Under Remote Inbound Adapter Settings: External Language Server Name configure the name of the external language server you created in the Setup an external language server step
- Configure all SAP connection parameters
- Under Basic Settings: Target Config Names configure the name of the process or the operation you want to call
- Click on Apply
- Start the service
Tip: You can see if the service could be successfully started in the Log tab of the service.
You can use a lookup table to map the XML schema to the SAP function module. Navigate to Interoperability > Configure > Data Lookup Tables and create a new lookup table. The key is the name of the SAP function module and the value is the XML schema with the category, sperated by an double point e.g. My_Category:My_XML_Schema
.
You can use the FlattenTables
parameter to flatten the tables in the SAP response. The parameter is a boolean and if enabled, the service will flatten the tables in the SAP response. The default value is false
.
Name | Age | State |
---|---|---|
John | 42 | NY |
Mary | 32 | CA |
The XML for the above table would look like this with the FlattenTables
parameter set to false
:
...
<Person>
<item>
<Name>John</Name>
<Age>42</Age>
<State>NY</State>
</item>
<item>
<Name>Mary</Name>
<Age>32</Age>
<State>CA</State>
</item>
</Person>
...
And the corresponding schema would look like this:
...
<xs:element name="Person" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="item" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Age" type="xs:integer" minOccurs="0"/>
<xs:element name="State" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
...
The XML for the above table would look like this with the FlattenTables
parameter set to true
:
...
<Person>
<Name>John</Name>
<Age>42</Age>
<State>NY</State>
</Person>
<Person>
<Name>Mary</Name>
<Age>32</Age>
<State>CA</State>
</Person>
...
And the corresponding schema would look like this:
...
<xs:element name="Person" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Age" type="xs:integer" minOccurs="0"/>
<xs:element name="State" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
...
UseJSON
boolean - If enabled, the service will convert the SAP data to JSON. (default: false)ConfirmationTimeoutSec
integer, required - The time in seconds the service will wait for a confirmation for a message to be processed. (default: 10)EnableTesting
boolean - If enabled, the service will start with some test data and will log more to the log. (default: false)EnableTracing
boolean - If enabled the service will print all messages to the log. This is useful for debugging purposes. (default: false)QueueWarningThreshold
integer, required - The maximum number of messages that can be queued. (default: 100)
GatewayHost
string, required - The host address of the SAP GatewayGatewayService
string, required - The service name of the SAP Gateway. UsuallysapgwNN
whereas NN is the instance number.ProgrammID
string, required - The Program ID of this service to identify the connection.ConnectionCount
integer, required - The number of connections to the SAP Gateway.Repository
string, required - The name of the SAP Repository.
HostAddress
string, required - The host address of the SAP System.ClientID
string, required - The Client ID of your mandant.SystemNumber
string, required - The System Number of the SAP System.SAPLanguage
string, required - The language of the SAP System.SAPCredentials
string, required - The ID of the credentials to use for the SAP System you configured in the Configure InterSystems Credentials step.
ImportXMLSchemas
boolean - If enabled, the service will try to import the XML Schemas from the SAP System. (default: false)XMLSchemaPath
string - The path to the folder where the XML Schemas should be stored. If the folder does not exist, it will be created.LookUpTableName
string - The name of the table you configured in Lookup Table for XML Schemas. If left empty no lookup table will be used.FlattenTablesItems
boolean - If enabled, the service will flatten the tables in the XML. See Flatten Tables Items for more information (default: false)XMLNamespace
string - The namespace of the XML. If left empty no namespace will be used. You can use the placeholder{functionName}
to use the name of the function as namespace.
External Language Server Name
string, required - The name of the external language server to connect to.Gateway Extra CLASSPATH
string, required - The path to the intersystems-sap-service-*.jar file.
- no known bugs
v0.1 (2024-03-11)
- Adds compatibility to InterSystems IRIS version 2022.1 and newer
- Removes intersystems-utils and intersystems-jdbr java library from jar. Intersystems-utils must be added to class path manually.
- Use v0.0.6 for InterSystems IRIS versions older than 2022.1
v0.0.6 (2023-4-3)
- Initial release
by Andreas S. and Philipp B.