Loading

How to configure the SAP Connector in Anypoint Code Builder

Date de publication: Jan 8, 2026
Prérequis
To be able to follow the steps in this article you need first to have: 1. SAP instance details (host, credentials, etc). 2. The SAP libraries (available from SAP repositories): a. sapjco3.jar b. sapidoc3.jar c. libsapjco3 which depends on your OS: - libsapjco3.jnilib for "old" MacOS (used mainly in MacOS 10.10 and older versions). * - libsapjco3.dylib for newer MacOS. * - sapjco3.dll for Windows - sapjco3.so for Linux 3. A local Maven installation. 4. VS Code with Anypoint Code Builder. * Note that you need to ensure your MacOS library supports your MacOS processor (Intel "x86_64" or ARM "arm64").
Tâche

Your goal is to be able to configure the SAP Connector in Anypoint Code Builder.

Étapes

STEPS

1. Collect the three needed files and place them in any folder on your local drive.

2. Open a command line tool on that path and install the three libraries on your local Maven repository with these commands (version should be set accordingly on the three commands, depending on your libraries version):

sapidoc3.jar

mvn install:install-file \
  -Dfile=sapidoc3.jar \
  -DgroupId=com.sap.conn.idoc \
  -DartifactId=com.sap.conn.idoc.sapidoc3 \
  -Dversion=3.1.8 \
  -Dpackaging=jar

sapjco3.jar

mvn install:install-file \
  -Dfile=sapjco3.jar \
  -DgroupId=com.sap.conn.jco \
  -DartifactId=com.sap.conn.jco.sapjco3 \
  -Dversion=3.1.8 \
  -Dpackaging=jar

libsapjco3.dylib/jnlib/dll/so

mvn install:install-file \
  -Dfile=libsapjco3.[ext] \
  -DgroupId=com.sap.conn.jco \
  -DartifactId=libsapjco3 \
  -Dversion=3.1.8 \
  -Dpackaging=[ext]


In this third command please update the file and packaging with the correct file extension between dylib, jnlib, dll or so.


3. Add these dependencies to the project pom.xml file as below:

<dependency>
 <groupId>com.sap.conn.jco</groupId>
 <artifactId>com.sap.conn.jco.sapjco3</artifactId>
 <version>3.1.8</version>
</dependency>

<dependency>
 <groupId>com.sap.conn.idoc</groupId>
 <artifactId>com.sap.conn.idoc.sapidoc3</artifactId>
 <version>3.1.8</version>
</dependency>

<dependency>
 <groupId>com.sap.conn.jco</groupId>
 <artifactId>libsapjco3</artifactId>
 <version>3.1.8</version>
 <classifier>external-library</classifier>
 <type>dylib</type>
</dependency>
 

4. Add the sharedLibraries section to your Mule Maven Plugin configuration in the same pom.xml file and include the libraries there. The MMP configuration should look like similar to this (where you can include any other configuration needed):
<plugin>
 <groupId>org.mule.tools.maven</groupId>
 <artifactId>mule-maven-plugin</artifactId>
 <version>${mule.maven.plugin.version}</version>
 <extensions>true</extensions>
 <configuration>
  <sharedLibraries>
   <sharedLibrary>
    <groupId>com.sap.conn.jco</groupId>
    <artifactId>com.sap.conn.jco.sapjco3</artifactId>
   </sharedLibrary>
   <sharedLibrary>
    <groupId>com.sap.conn.idoc</groupId>
    <artifactId>com.sap.conn.idoc.sapidoc3</artifactId>
   </sharedLibrary>
   <sharedLibrary>
    <groupId>com.sap.conn.jco</groupId>
    <artifactId>libsapjco3</artifactId>
   </sharedLibrary>
  </sharedLibraries>
 </configuration>
</plugin>
 

5. Now you can set the connector configuration using your host, credentials, etc and should be able to test the connection and/or run the app in Anypoint Code Builder.
Numéro d’article de la base de connaissances

005239326

 
Chargement
Salesforce Help | Article