# mulesoft SAP Connector - Full Documentation --- product: SAP Connector version: 5.9 is-latest-version: true --- # Configuring an SAP Secure Network Communication Connection with Certificate > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Configure an SAP Secure Network Communication (SNC) with certificate to take advantage of security features such as secure data communication between the SAP system client and server, application-level end-to-end security, and the ability to change security products without impacting your SAP business applications. Enabling SNC with certificate requires you to configure the client environment, the SAP server, and Anypoint Connector for SAP (SAP Connector). ## Before You Begin To configure an SAP SNC with certificate, you must have access to: - The SAP GUI application. To install this client, Java must already be installed on your machine. Then, download the installer for your OS from SAP. - The SAPCAR utility and SAP Cryptographic Library, which you can download from the SAP Support Portal, if you are an S-user - An SAP ECC instance that can use SNC system variables - The following transactions: - `STRUST` (Trust Manager) - `SM30` (Table Maintenance) ## Configure the Client Environment Configure the system variables that depend on the operating system you are using, and generate the personal security environment (PSE): 1. Open the Windows command line or Mac Terminal app. 2. Use the `SAPCAR` utility to unpack the SAP Cryptographic Library to the specified folder: `SAPCAR -xvf ` 3. Configure the following environment variables: - SNC\_LIB: `\sapcrypto.dll` - SECUDIR: `` - LD\_LIBRARY\_PATH: `\sapcrypto.dll` - SSF\_LIBRARY\_PATH: `\sapcrypto.dll` For Windows, the `sapcrypto.dll` 64-bit version must be in a different path and added to a new variable called `SNC_LIB_64`: ![Windows variable SNC\_LIB\_64](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-windows-variable.png) 4. Use the `sapgenpse` tool to create the PSE: `sapgenpse gen_pse -v -p RFC.pse` When you run this command, you must enter a PIN to use later and a distinguished name, which must be unique. For example, you can enter a distinguished name like this: `CN=RFC, C=AR, O=YourCompany, OU=IT` You can use STRUST to see names that are already in use. 5. Use the `sapgenpse` tool to create the `cred_v2` file, which stores the credentials for accessing the PSE: `sapgenpse seclogin -p RFC -O ` 6. Use the `sapgenpse` tool to export the client’s certificate from the PSE: `sapgenpse -v -p RFC -o RFC_MULE.crt` ## Configure the Client Environment When Deploying in CloudHub 2.0 or Runtime Fabric In SAP Connector 5.9.5 and later, an application that uses the Certificate connection type can be deployed in CloudHub 2.0 or Runtime Fabric. SAP Connector has an embedded installer that sets up the Personal Security Environment (PSE). You must first create your application: 1. Open Anypoint Studio. 2. Navigate to the `src/main/resources` folder of your application. 3. In the `src/main/resources` folder, create a folder named `sec`. ![SAP resources sec folder structure](/mulesoft/current/en-us/sap-connector/latest/_images/sap-resources-sec.png) 4. Add the following files to the `sec` folder: - `libsapcrypto.so` Linux version of the SAP CommonCryptoLib - `sapgenpse` Linux version of the SAP command line tool that manages PSE files - `RFC.pse` File that you created in the [previous step](#configure-the-client-environment) 5. Because CloudHub 2.0 runs on Linux machines, ensure that any dependency of the application is compiled for Linux, including `com.sap.conn.jco:libsapjco3`. 6. Save the application and export the `jar` file used for CloudHub 2.0 deployment. You must then import the created application in CloudHub 2.0 or Runtime Fabric: 1. Log in to your Anypoint Platform account and navigate to Runtime Manager. 2. Click **Deploy Application**. 3. In **Application Name**, enter a name for the application, for example, `cert-ch2`. 4. In **Deployment Target**, select `CloudHub 2.0` or `Runtime Fabric` if it is not selected already. 5. Click **Choose File** and upload your `jar` file. 6. In the **Properties** tab, add the following:
PropertyExample ValueDescription

secFilesCopy

true

If true, triggers the embedded installer.

sourceSecFolder

/opt/mule/apps/my-app-name/sec/

Location of the resources/sec folder in CloudHub 2.0 or Runtime Fabric. Replace the name of the application to match your scenario.

targetSecFolder

/tmp/sec/

Leave this value hardcoded.

pseFile

RFC

Name of the PSE file, without an extension.

psePassword

Your PSE file password

PSE file password. Click the Protect button next to this property to hide its content.

osUsername

app

Default CloudHub 2.0 username that is used to create the cred_v2 file. You can omit this property, in which case the connector automatically figures it out.

> [!NOTE] When using the embedded installer, you must reference the CommonCryptoLib library in > the SAP Connector Config properties with the proper path.
PropertyExample ValueDescription

jco.client.snc_lib

${app.home}/sec/libsapcrypto.so

Location of the SAP CommonCryptoLib. The library configured through this property is used by the connector operations. Depending on the operating system you may have to use other libraries, for example, the CloudHub 2.0 operating system is Linux based.

jco.server.snc_lib

${app.home}/sec/libsapcrypto.so

Location of the SAP CommonCryptoLib. The library configured through this property is used by the connector sources. Depending on the operating system you may have to use other libraries, for example, the CloudHub 2.0 operating system is Linux based.

7. Click **Start** to run the application. ## Configure the SAP Server Configure the certificates and tables that authorize you to use SNC with your distinguished name. To configure the SAP server: 1. View the SAP distinguished name and certificates. 2. Link the SAP certificate to your certificate. 3. Authorize the SNC client in SAP. ### View the SAP Distinguished Name and Certificates View the SAP distinguished name and list of certificates: 1. Log in to the SAP GUI and enter the `strust` transaction. 2. Select the **SNC SAPCryptolib** folder in the left pane. The SAP distinguished name and certificate list are displayed. ### Link the SAP Certificate to Your Certificate Download the SAP instance certificate and link it to your certificate: 1. Click the glasses icon (first icon on the left of the screen) to enable the edition mode, and then double click `CN=SL-ABAP-IDP`. 2. Click the download button at the bottom of the screen and enter the target path for the download. 3. Click the import icon and enter the target path to upload your certificate. 4. Click **Add to Certificate List** and then click the save icon. 5. Open a command-line interface or terminal window and use the `sapgenpse` tool to link your certificate to your PSE: `sapgenpse maintain_pk -v -a -p ` The following example links a certificate named `IDE.crt` to a PSE named `RFC.pse`: ![Terminal window for linking IDE.crt to RFC.pse](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-import-certificate.png) ### Authorize the SNC Client in SAP Add a new entry to the `VSNCSYSACL` view to enable your distinguished name to use SNC: 1. In the SAP GUI, navigate to the **SM30** transaction and enter `VSNCSYSACL` as the view name. 2. Click **Maintain**. 3. Select **E** as the work area. 4. In the **System ID** field, enter the SAP ID. 5. In the **SNC name** field, enter your distinguished name: `p:` 6. Select all of the checkboxes to activate the entries. 7. Click the save icon. - If the server accepts the SNC name, it displays a `Canonical Name Determined` message in the SNC data box. - If the server does not accept the SNC name, check that the name used on the PSE file is the same as the name used on the Mule app and the name listed on STRUST. 8. Enable the SAP user for the Mule app so the app can use the SNC connection type: 1. Navigate to the **SM30** transaction, specify the `VUSREXTID` view, and click **Maintain**. 2. In the **External ID type** field, select `DN` as the work area. 3. In the **External ID** field, enter the distinguished name. 4. In the **User** field, enter the SAP username. 5. Select **Activated**. 6. Click the save icon. ## Configure SAP Connector Configure SAP Connector to enable SNC with certificate: 1. Access Anypoint Studio. 2. Select **SAP** in the Studio canvas. 3. Click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 4. Configure the X.509 certificate connection: 1. In the **Connection** field, select `Certificate`. 2. On the **General** tab, configure these fields: - **X.509 Certificate** (PEM, for example .pem or .crt) - **Sap client ID** - **Application server host** 3. On the **Advanced** tab, configure the extended properties. ### SAP Server-Side Extended Properties Example: The following table shows example values for the server-side extended properties:
PropertyExample Value

jco.server.snc_mode

1

jco.server.snc_partnername

p:CN=SL-ABAP-IDP

jco.server.snc_qop

8

jco.server.snc_myname

p:CN=MVIDP, C=AR, O=MuleSoft, OU=IT

jco.server.snc_lib

C:/SNC/64bit/sapcrypto.dll

### SAP Client Side Extended Properties Example The following table shows example values for the client side extended properties:
PropertyExample Value

jco.client.snc_mode

1

jco.client.snc_partnername

p:CN=SL-ABAP-IDP

jco.client.snc_qop

8

jco.client.snc_myname

p:CN=MVIDP, C=AR, O=MuleSoft, OU=IT

jco.client.snc_lib

C:/SNC/64bit/sapcrypto.dll

jco.client.x509cert

ABCD12EFG

## See also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # Configuring an SAP Secure Network Communication Connection with Kerberos > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Configure an SAP Secure Network Communication (SNC) with Kerberos to take advantage of security features such as secure data communication between the SAP system client and server, application-level end-to-end security, and the ability to change security products without impacting your SAP business applications. To enable SNC with Kerberos, configure the client environment, the SAP server, and Anypoint Connector for SAP (SAP Connector). > [!NOTE] SAP does not provide support for third-party solutions. ## Before You Begin To configure an SAP SNC with Kerberos, you must have access to: - The SAP GUI application To install this client, Java must already be installed on your machine. Then, download the installer for your operating system from SAP. - An SAP ECC instance that can use SNC system variables - The following transactions: - `STRUST` (Trust Manager) - `SM30` (Table Maintenance) - `SNC1` (Generate SNC name for user) - `SU01` (User Maintenance) - `SM59` (RFC Destinations) ## Configure Active Directory To configure Active Directory, create a new Service Principal Name (SPN) according to the operating system you are using and export the keytab. If you are using Windows, follow these steps: 1. Create a service user `sidadm` in Active Directory. 2. Select **Password never expires** and deselect **Use DES encryption types for this account**. 3. Create a Service Principal Name (SPN) `SAPService/sapdev@SSODOMAIN.LAB` for the `sidadm` user in Active Directory. `setspn -A SAPService/sapdev@SSODOMAIN.LAB DOMAIN_SHORT\sidadm` 4. Run the following command to export the keytab for this SPN from Active Directory. The password is the password to set for the keytab and the SID is the file name of the keytab. `ktpass -princ SAPService/sapdev@SSODOMAIN.LAB -mapuser DOMAIN_SHORT\sidadm -crypto AES256-SHA1 -ptype KRB5_NT_PRINCIPAL -mapop set -pass <*password*> -out aes.keytab` ## Configure the SAP Server To configure the SAP server, change the domain and the KDC in the operating system of the SAP server to set up Kerberos and add the parameters and the library that authorize you to use SNC: 1. Configure the `krb5.conf` file using the KDC address and the realm information (SSODOMAIN.LAB). The `krb5.conf` file is created by default in the `etc` directory. \[libdefaults\] # "dns\_canonicalize\_hostname" and "rdns" are better set to false for improved security. # If set to true, the canonicalization mechanism performed by Kerberos client may # allow service impersonification, the consequence is similar to conducting TLS certificate # verification without checking host name. # If left unspecified, the two parameters will have default value true, which is less secure. dns\_canonicalize\_hostname = false rdns = false # default\_realm = EXAMPLE.COM default\_realm = SSODOMAIN.LAB \[realms\] # EXAMPLE.COM = { # kdc = kerberos.example.com # admin\_server = kerberos.example.com # } SSODOMAIN.LAB = { kdc = DC.SSODOMAIN.LAB admin\_server = dc.SSODOMAIN.LAB } \[domain\_realm\] .ssodomain.lab = SSODOMAIN.LAB ssodomain.lab = SSODOMAIN.LAB \[logging\] kdc = FILE:/var/log/krb5/krb5kdc.log admin\_server = FILE:/var/log/krb5/kadmind.log default = SYSLOG:NOTICE:DAEMON \[libdefaults\] default\_ccache\_name = FILE:/tmp/krb5cc\_%{uid} 2. Run the following commands to import the key to the `etc` directory: `ktutil` `wkt /etc/krb5.keytab` `q` 3. Obtain a Kerberos Ticket Granting Ticket (TGT): `kinit -V SAPService/sapdev@SSODOMAIN.LAB` 4. Run the following commands to change the permissions for the keytab: `chgrp sapsys /etc/krb5.keytab` `chmod 640 /etc/krb5.keytab` 5. Set up automatic renewal for the Kerberos TGT: `crontab -e 01 0,6,12,18 * * * /usr/bin/kinit -R SAPService/sapdev@SSODOMAIN.LAB` 6. Locate the GSS-API library on the SAP server (in this example, it is under the `/usr/lib64/libgssapi_krb5.so.2` path), configure the parameters for SNC with Kerberos in the default profile, and then restart SAP. - `snc/permit_insecure_start = 1` - `snc/data_protection/use = 3` - `snc/data_protection/max = 3` - `snc/data_protection/min = 1` - `snc/accept_insecure_r3int_rfc = 1` - `snc/accept_insecure_rfc = 1` - `snc/accept_insecure_cpic = 1` - `snc/accept_insecure_gui = 1` - `snc/gssapi_lib = /usr/lib64/libgssapi_krb5.so.2` - `snc/enable = 1` - `snc/identity/as = p:SAPService/sapdev@SSODOMAIN.LAB` - `login/password_change_for_SSO = 0` 7. Create `sidadm` as a user in SAP and set the SNC name using the transaction `SU01`. 8. For the RFC destination, use the transaction `SM59`. On the **Logon and Security** tab, enable the SNC option and add the SPN name as a partner. ## Configure SAP Connector To configure SAP Connector, enable SNC with Kerberos: 1. Access Anypoint Studio. 2. Select **SAP** in the Studio canvas. 3. Click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 4. Configure the Kerberos connection: 1. In the **Connection** field, select `Kerberos`. 2. On the **General** tab, configure these fields: - **SAP system number** - **SAP client ID** - **Application server host** - **Kerberos Config File Path** Path to the `krb5.conf` file using the KDC address and the realm information (SSODOMAIN.LAB) - **Keytab File Path** Path to the keytab for the SPN from Active Directory. The keytab must contain only the entry for the **Principal** (`sidadm`). If you use an existing keytab, you must remove the existing entry first. To remove the existing entry, run the following command: `ktutil -k .keytab remove -p @` To create a new keytab, run the following command: `ktutil --keytab=.keytab add -p @ -w -e aes256-cts-hmac-sha1-96 -V ` - **GSS Library Path** Static value `/usr/lib64/libgssapi_krb5.so.2.2` for CloudHub and CloudHub 2.0 or Runtime Fabric when using images published after July 2025. Static value `/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2` for CloudHub 2.0 or Runtime Fabric when using images published before July 2025. - **Principal** Service user name from Active Directory, in this example `sidadm` - **Client SNC Partner Name** SPN name from Active Directory, in this example `p:SAPService/sapdev@SSODOMAIN.LAB` - **Client SNC My Name** SNC name that identifies the client in secure network communications, in this example `p:sidadm` 3. On the **Advanced** tab, you do not need to change the extended properties because the Kerberos configuration already sets them. ### SAP Extended Properties for Kerberos The following tables show the default values for the SAP extended properties for Kerberos. The connector sets the following common extended properties:
PropertyDefault Value

jco.server.snc_mode

1

jco.server.snc_qop

3

The connector sets the following extended properties for operations:
PropertyDefault Value

jco.client.user

The Principal set under Kerberos Parameters for Operations in the General tab

jco.client.snc_lib

The path from GSS Library Path set under Kerberos Common Parameters in the General tab

jco.client.snc_myname

The Client SNC My Name set under Kerberos Parameters for Operations in the General tab

jco.client.snc_partnername

The Client SNC Partner Name set under Kerberos Parameters for Operations in the General tab

The connector sets the following extended properties for sources:
PropertyDefault Value

jco.server.snc_lib

The path from GSS Library Path set under Kerberos Common Parameters in the General tab

jco.server.snc_myname

The Server SNC My Name set under Kerberos Parameters for Sources in the General tab

jco.server.snc_partnername

The Server SNC Partner Name set under Kerberos Parameters for Sources in the General tab

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for SAP (SAP Connector) enables integration of data between external systems and SAP systems based on SAP NetWeaver. This connector requires a separate license. Contact MuleSoft to evaluate or use this connector in production. Mule runtime engine (Mule) supports SAP integration through Anypoint Connector for SAP, which leverages the SAP Java Connector (JCo) libraries. SAP JCo facilitates communication between an SAP backend system and a Java application. It allows Java programs to connect to SAP systems and invoke Remote Function Modules. It also allows the parsing of IDocs (SAP Intermediate Documents), among other object types. The SAP configuration supports both inbound and outbound communications. The SAP JCo libraries enable Mule apps to: - Execute BAPI functions over the following types of RFC protocols: - Synchronous Remote Function Call RFC (sRFC) - Asynchronous Remote Function Call RFC (aRFC) - Act as a JCo server to be called as a BAPI over sRFC and aRFC - Send IDocs over tRFC and qRFC - Receive IDocs over tRFC and qRFC - Transform SAP objects (JCo function for BAPI and IDocs) to and from XML See [SAP Terminology](https://docs.mulesoft.com/sap-connector/latest/sap-connector-terminology) to understand SAP acronyms. ## Before You Begin To use this connector, you must be familiar with: - SAP Connector’s API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - Creating a Mule app using Anypoint Studio or Anypoint Code Builder Before creating an app, you must have: - Credentials to access the SAP target resource - SAP libraries for IDoc, JCO, and JCO Native To download these libraries, go to the SAP website. Studio 7 can use the library formats directly without conversion. To see which libraries are compatible with the connector, see the [SAP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-connector-release-notes-mule-4). - A service user with the roles or profiles that allow you to use the required RFCs, BAPIs, and IDocs - A working knowledge of the SAP business context and, in particular, the SAP R/3 Business Suite - A basic understanding of the SAP NetWeaver Platform from an administration point of view - Knowledge of the ABAP language - An SAP ID to download the required SAP libraries - Use of the RFC protocol to connect to NetWeaver Application Servers (NWAS) [ECC](https://www.cipherbsc.com/sap-erp-central-component-erp-ecc/) and [CRM](https://help.sap.com/docs/r/p/SAP_CUSTOMER_RELATIONSHIP_MANAGEMENT) run on top of NWAS, as other SAP solutions do, so any customer using the connector can access those systems. - Knowledge of how to create a Mule app using Anypoint Studio ## Common Use Cases for the Connector Common use cases for SAP Connector include: - **Unified View of Enterprise Resources** Enable real-time integration of digital information across your business from financial accounting, materials management, sales and distribution, and customer service to make data-driven decisions that optimize core business processes. - **Data Synchronization** Sync SAP data with your business applications, such as Salesforce, Workday, and Marketo. For example, you can migrate a large set of accounts from SAP to Salesforce or broadcast changes in organizations from SAP to Workday in real-time. - **Sales Order Automation** Automate sales order processing between SAP ERP and a CRM, such as Salesforce. - **BAPI Support** Discover BAPIs, query BAPI/RFM enabled function modules, or execute BAPI functions. - **IDoc Integration** Send and receive IDocs from SAP, import IDocs, or transform SAP objects to and from XML. For examples of these use cases, refer to [SAP Connector Examples](https://docs.mulesoft.com/sap-connector/latest/sap-connector-examples). ## Authentication Types SAP Connector connections use the following authentication types: - Certificate Connection provider that relies on an X509 certificate to authenticate the user - Kerberos Connection provider that implements the Kerberos protocol to authenticate and authorize the user - Simple Connection Provider Connection provider that connects using a username and password ## Exchange Templates and Examples [Anypoint Exchange](https://www.mulesoft.com/exchange/) provides templates that you can use as starting points for your apps and examples that illustrate a complete solution: - **General:** [Account System API - SAP Implementation Template](https://www.mulesoft.com/exchange/org.mule.templates/template-apiled-system-account-sap/), [Salesforce to Salesforce, Workday, SAP, and Database Account Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sfdc.wday.sap.db-account-broadcast/) - **Salesforce and SAP:** [Account Aggregation](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-account-aggregation/), [Account Customer Bidirectional Sync](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-customer-bidirectional-sync/), [Opportunity Aggregation](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-opportunity-aggregation/), [Product Aggregation](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-product-aggregation/), [Product Bidirectional Sync](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-product-bidirectional-sync/) - **Salesforce to SAP:** [Account Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-account-broadcast/), [Account Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-account-migration/), [Opportunity Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-opportunity-broadcast/), [Opportunity Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-opportunity-migration/), [Product Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sfdc2sap-product-broadcast/) - **SAP to Salesforce:** [Contact Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-contact-broadcast/), [Contact Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-contact-migration/), [Customer Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-customer-broadcast/), [Customer Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-customer-migration/), [Product Material Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-product-broadcast/), [Product Material Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2sfdc-material-migration/) - **SAP to Workday:** [Employee Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2wday-employee-migration/), [Organization Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2wday-organization-broadcast/), [Organization Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-sap2wday-organization-migration/) - **Workday and SAP:** [Organization Aggregation](https://www.mulesoft.com/exchange/org.mule.templates/template-wday2sap-organization-aggregation/), [Worker (Employee) Aggregation](https://www.mulesoft.com/exchange/org.mule.templates/template-wday2sap-worker-aggregation/) - **Workday to SAP:** [Worker (Employee) Migration](https://www.mulesoft.com/exchange/org.mule.templates/template-wday2sap-worker2employee-migration/), [Worker Broadcast](https://www.mulesoft.com/exchange/org.mule.templates/template-wday2sap-worker-broadcast/) ## Next After you complete the prerequisites and experimented with templates and examples, you are ready to create an app with [Anypoint Studio](https://docs.mulesoft.com/sap-connector/latest/sap-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [SAP Connector in Anypoint Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-sap-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 Additional Configuration > For the full documentation index, see: https://docs.mulesoft.com/llms.txt After you complete basic SAP Connector configuration, you can perform additional configuration tasks, such as changing advanced settings and defining extended properties. ## Configure General Settings 1. At the bottom of the canvas, click **Global Elements**. 2. Click **Create**. 3. Expand **Connector Configuration**, select either **SAP Inbound** or **SAP Outbound**, and click **OK**. 4. Click the **Advanced tab** at the top of the **Global Element Properties** screen: ![Advanced tab selected in Global element properties window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-config-adv.png) 5. In the **General** section, to set the **Max Idle time** parameter: 1. Select **Expiration policy**. 2. Enter a value in the **Max Idle time**, and then add the **Time Unit**. 3. Click **OK**
FieldTypeDescriptionDefault Value

Expiration Policy

ExpirationPolicy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before the runtime considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. The runtime purges the instances when appropriate.

Max Idle time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.

Time unit

Enumeration one of:

  • DAYS

  • HOURS

  • MICROSECONDS

  • MILLISECONDS

  • MINUTES

  • NANOSECONDS SECONDS

## Configure Advanced Settings ![Fields in Advanced tab of global element properties window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-advanced.png) You can set encoding, version, flag, format, and timeout parameters in Advanced settings. To change these field values, click the **Advanced tab** at the top of the **Global Element Properties** screen:
FieldXML AttributeDescriptionDefault Value

Display Name

name

Set a reference name for the endpoint used internally by the Mule configuration.

Encoding

encoding

Set a canonical name for an encoding. See Oracle’s supported encodings.

Default IDocument Version

defaultIdocumentVersion

Set the version when sending an intermediate document (IDoc). Values for the IDoc version correspond to IDOC_VERSION_xxxx constants in com.sap.conn.idoc.IDocFactory.

Disable Function template cache flag

disableFunctionTemplateCacheFlag

Set to disable the function template cache.

false

Evaluate response flag

evaluateResponseFlag

Set if an error response should throw an exception or let the user handle it with another result.

false

Log trace flag

logTraceFlag

Set if the trace should be logged on the Mule server.

false

Use SAP format

useSAPFormat

Set to use the SAP default format when working with business application programming interface (BAPI) functions using a synchronous remote function call (sRFC).

false

## Define Extended Properties Extended properties enable you to tune SAP outbound configuration parameters. To define extended properties for the SAP connector global element: 1. Navigate to the **Advanced** tab on the **General** pane: ![Advanced tab selected in the General tab](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-advanced-tab.png) 2. Locate the **Extended Properties** section at the top of the window. 3. Select the **Edit inline** option. 4. Click **+** to add a new extended property. Use the same property name that SAP uses: 1. [Pooling Config](https://help.sap.com/docs/r/b865ed651e414196b39f8922db2122c7/Cloud/en-US/8278bed44893498f95d5d6d5f0a47f35.html) 2. [Target System configuration](https://help.sap.com/docs/r/b865ed651e414196b39f8922db2122c7/Cloud/en-US/f8fac995b0144a0b8ec0801b8f7bab3e.html) ### Configure the Client Environment Configure the system variables that depend on the operating system you are using, and generate the PSE (personal security environment): 1. Use the following command to open your cmd or terminal and unpack the SAPCAR and SAP Cryptographic Library: \`SAPCAR -xvf This extracts files from the folder **(which folder?)** 2. Configure the following environment variables: **(Do the variables vary by OS or are they the same and just configured differently?)** \* For this example, the path to the library is “C:\\Users\\Administrator\\Desktop\\SNC”:\* - SNC\_LIB - SECUDIR = `` - LD\_LIBRARY\_PATH = `\sapcrypto.dll` - SSF\_LIBRARY\_PATH = `\sapcrypto.dll` For Windows, the `sapcrypto.dll` 64bit version must be in another path and added to a new variable called SNC\_LIB\_64. In your cmd or terminal, use the following command to create the PSE: `sapgenpse gen_pse -v -p RFC.pse` When you run this command, you must enter a password or PIN to use later and a distinguished name, which must be unique. You can check for names that are already used at STRUST. 3. Add the credentials that your session user needs to access the PSE which will create the file cred\_v2 with this command: sapgenpse seclogin -p RFC -O you\_user. ## Next Now that you have completed configuration, you can experiment with the SAP [Examples](https://docs.mulesoft.com/sap-connector/latest/sap-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following examples show several Mule flows for SAP Connector: - [Send an IDoc to SAP](#send-an-idoc-to-sap) - [Receive an Incoming IDoc Request](#receive-an-incoming-idoc-request) - [Receive an SAP Function](#receive-an-sap-function) - [Manage Transactions](#manage-transactions) - [Configure Multiple Gateways](#configure-multiple-gateways) ## Send an IDoc to SAP This example shows you how to create a Mule app that sends an IDoc to SAP. The following screenshot shows the Studio flow for this example: ![Studio flow for sending an IDoc to SAP](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-example-send-idoc.png) ### Configure HTTP Listener Configure HTTP Listener to initiate a Mule flow when a call is made to the `/sendIDoc` path on localhost port `8081`: 1. In Anypoint Studio, create a new Mule project. 2. From the **Mule Palette** view, drag the **HTTP > Listener** source to the canvas. 3. Configure the global element using the default values. 4. In the **Listener** properties tab, set the path to `/sendIDoc`. ### Add the Transform Message Component Configure the **Transform Message** component to convert the IDoc input to XML: 1. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to the **Listener** source. 2. After the metadata is retrieved, overlay the text in the **Output** section of the **Transform Message** component with the following text: ```dataweave %dw 2.0 output application/xml EDI_DC40 800 0000000003519646 740 30 1 2 MATMAS01 MATMAS SAPIDE LS T90CLNT090 MULE01_TP LS MULE01_LS 20180606 133420 20180606133420 005 000000000000000088 19970527 MORLEY 20030122 I021066 KVB X FERT M 02004 PCE 000 0.200 0.200 KGM 0.000 0001 09 0.000 0.000 0.000 0.000 0.000 0.000 0.0 0.0 0 0 0 0 0 KVB 00000000 00000000 00 0.0 0.0 000000000 005 1 AS-100 T-shirt ZH 005 4 AS-100 T-shirt RO 005 5 AS-100 T-shirt SL 005 6 AS-100 T-shirt HR 005 E AS-100 T-shirt EN 005 F AS-100 T-shirt FR 005 G AS-100 T-shirt EL 005 J AS-100 T ??? JA 005 W AS-100 T-shirt BG 005 d AS-100 T-shirt SH 005 1000 V X 0 0 M 0.00 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0 00000000 0.00 0.00 0.00 0.000 0 0 0.0 0.0 0 0.00 0.000 0.0 00000000 01 0.00 0.000 0.00 0.000 000 000 000 0.000 0.00 0 00000000 0.00 00000000 00000000 0 00 00000000 0 0.000 0.000 0.000 0.000 00 0.000 005 2300 VB X 0 0 M 0.00 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0 00000000 0.00 0.00 0.00 0.000 0 0 0.0 0.0 0 0.00 0.000 0001 0.0 00000000 01 0.00 0.000 0.00 0.000 000 000 000 0.000 0.00 0 00000000 0.00 00000000 00000000 00000000 0 00 00000000 0 0.000 0.000 0.000 0.000 00 0.000 005 PCE 1 1 0.000 0.000 0.000 0.000 0.200 KGM 0 0 0.000 005 2300 X S 0 0.3 1 7920 S 0 0.3 1 7920 S 0 0.3 1998 09 0 00000000 0 0 0 0 0.000 0.000 0 0 0 0 0 00000000 00000000 00000000 0 0 00 B 000100014878 000100014879 00 00 00 000 000 000 0000 0000 0000 0 7920 1 X 0 005 ES MWST 0 ',"application/xml") ``` ### Add the Send IDoc Operation The **Send IDoc** operation sends an IDoc to SAP over a remote function call (RFC): 1. From the **Mule Palette** view, select **SAP** and drag the **Send IDoc** operation next to the **Transform Message** component. 2. Create a global element named `SAP_Outbound` and specify the connection information. 3. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. - If the connection is successful, save the configuration. - Otherwise, review and correct any invalid parameters, and test again. 4. Configure the **Send IDoc** properties with the following values:
FieldValue

IDoc Name

MATMAS01

Content

#[payload]

### Add the Logger Component The **Logger** component displays the connector payload in the Studio console. 1. From the **Mule Palette** view, select **Core** and drag **Logger** next to the **Send IDoc** operation. 2. Click **File** > **Save** to save the app. ### Run the App To run the Mule app: 1. Click **Run** > **Run as** > **Mule Application**. 2. From a web browser, test the application by entering an employee’s internal ID, first name, and last name as query parameters for the following URL: `http://localhost:8081/sendIDoc` Mule sends the IDoc to SAP. ### XML for Sending an IDoc to SAP Paste this code into a new Mule app in Studio to quickly load the flow for the sending an IDoc example. Change the values to reflect your environment. ```xml EDI_DC40 800 0000000003519646 740 30 1 2 MATMAS01 MATMAS SAPIDE LS T90CLNT090 MULE01_TP LS MULE01_LS 20180606 133420 20180606133420 ',"application/xml") ]]> ``` ## Receive an Incoming IDoc Request This example shows you how to create a Mule app that waits for incoming IDoc requests from an external SAP system. In this example, the app acts like an RFC server and registers itself as an SAP gateway. When the app receives an IDoc request, it uses a remote function (RFC) call to ask SAP to create the IDoc. Then it logs the IDoc contents to the Studio console. The following screenshot shows the Studio flows for this example: ![Studio flow for retrieving an IDoc](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-example-receive-idoc-flow.png) ### Configure the First Flow The first flow uses a BAPI function to send IDoc requests to an external SAP system. To configure this flow: 1. In Anypoint Studio, create a new Mule project. 2. From the **Mule Palette** view, select **HTTP** and drag the **Listener** source to the canvas. 3. Configure the global element using the default values. 4. In the **Listener** properties tab, set the path to `/trigger`. 5. Drag a **Transform Message** component next to **Listener**. The content of this message is the payload of the BAPI function that receives the IDoc requests. 6. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: ```dataweave %dw 2.0 output application/xml --- { ZMMFM_TRIGGER_IDOC_MATMAS: { "import": { IV_MTYP: "MATMAS" , IV_OBJ: "23" , IV_SYS: "MULE11_LS" } , export: { EV_RET: "0" },export: { EV_OBJ: "0000000003526552" },export: null,changing: null, tables: { T_MSG: null }, } } ``` 7. From the **Mule Palette** view, select **SAP** and Drag the **Synchronous Remote Function Call** operation next to the **Transform Message** component. 8. Create a global element named `SAP_Config` and specify the connection information. 9. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. ### Configure the Second Flow The second flow logs the contents of each new IDoc request to the Studio console. To configure this flow: 1. From the **Mule Palette** view, select **SAP** and drag the **Document listener** source to the canvas. 2. Create a new global element for the source and specify the required information. Configure the **Document listener** properties with the following values:
FieldValue

Gateway host

Host running the gateway server

Gateway service

3200

Program id

MULE01_PID

Connection count

1

Idoc type filter regex

MATMAS01

> [!NOTE] The **Gateway host**, **Gateway service**, and **Program id** must be retrieved from > the customer’s SAP team. > > Anything that relates to the SAP instance, such as configurations or credentials, must be > retrieved from the customer’s SAP team. 3. From the **Mule Palette** view, select **Core** and drag a **Logger** component next to **Document listener** on the canvas. 4. Click **File** > **Save** to save the app. ### Run the App To run the Mule app: 1. Click **Run** > **Run as** > **Mule Application**. 2. From a web browser, test the application by entering the following URL: `http://localhost:8081/trigger` ### XML for Receiving an IDoc Request Paste this code into a new Mule app in Studio to quickly load the flow for the receiving an IDoc request example. Change the values to reflect your environment. ```dataweave %dw 2.0 output application/xml --- ``` Example response on the Studio console: ```dataweave EDI_DC40 800 0000000003572826 740 30 1 2 MATMAS01 MATMAS SAPIDE LS T90CLNT090 MULE11_TP LS MULE11_LS 20191004 050305 20191004050305 ... ``` ## Receive an SAP Function This example shows you how to create a Mule app that receives an SAP function. This example displays a result when a function is triggered from either another Mule flow or from the SAP GUI. The following screenshot shows the Studio flow for this example: ![Studio flow for establishing an SAP connection](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-example-establish-connection.png) To create the flow: 1. From the Mule Palette view, select **SAP** and drag the **Function listener** source to the canvas. 2. Create a global element named `SAP_Inbound` and specify the connection information. 3. Configure the required fields in the properties tab. 4. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component to the right of **Function listener**. 5. Specify the details based on the metadata. For example: ![Sample metadata for the SAP\_Inbound global element](/mulesoft/current/en-us/sap-connector/latest/_images/sap-function-return-response.png) 6. Click **File > Save** to save the app. 7. Click **Run** > **Run as** > **Mule Application**. ### XML for Receiving an SAP Function Paste this code into a new Mule app in Studio to quickly load the flow for the receiving a function example. Change the values to reflect your environment. ```dataweave %dw 2.0 output application/xml --- ``` ## Manage Transactions This example performs two calls on standard BAPIs that handle bank records and manages those transactions. The following screenshots show the Studio flows for this example: ![Studio flow for the first flow of Managing Transactions](/mulesoft/current/en-us/sap-connector/latest/_images/managetransactions-flow1.png) ![Studio flow for the second flow of Managing Transactions](/mulesoft/current/en-us/sap-connector/latest/_images/managetransactions-flow2.png) ![Studio flow for the third flow of Managing Transactions](/mulesoft/current/en-us/sap-connector/latest/_images/managetransactions-flow3.png) ### Configure the First Flow The first flow retrieves a list of available banks in the United States, filters the first result, and fetches information about the bank. Transactions are not necessary for queries to SAP. To configure this flow: 1. In Anypoint Studio, create a new Mule project. 2. From the **Mule Palette** view, select **HTTP** and drag the **Listener** source to the canvas. 3. Configure the global element using the default values. 4. In the **Listener** properties tab, set the path to `/sync-rfc`. 5. Drag a **Transform Message** component next to **Listener**. The content of this message filters the banks by country. 6. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/xml --- { BAPI\_BANK\_GETLIST: { "import": { BANK\_CTRY: "US", MAX\_ROWS: 0 } } } 7. From the **Mule Palette** view, select **SAP** and drag the **Synchronous Remote Function Call** operation next to the **Transform Message** component. 8. Create a global element named `SAP_Config` and specify the connection information. 9. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. 10. Enter `BAPI_BANK_GETLIST` for the **Function Name** and `payload` for the **Content**. 11. Drag another **Transform Message** component next to **Synchronous Remote Function Call**. The content of this message filters the first result. 12. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/xml --- { BAPI\_BANK\_GETDETAIL: { "import" : { BANKCOUNTRY: payload.BAPI\_BANK\_GETLIST.tables.BANK\_LIST.\*row\[0\].BANK\_CTRY, BANKKEY: payload.BAPI\_BANK\_GETLIST.tables.BANK\_LIST.\*row\[0\].BANK\_KEY } } } 13. From the **Mule Palette** view, select **SAP** and drag another **Synchronous Remote Function Call** operation next to the **Transform Message** component. 14. Create a global element named `SAP_Config` and specify the connection information. 15. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. 16. Enter `"BAPI_BANK_GETDETAIL"` for the **Function Name** and `payload` for the **Content**. 17. From the **Mule Palette** view, select **Core** and drag a **Logger** component next to **Synchronous Remote Function Call**. ### Configure the Second Flow The second flow creates a sales order from the data. You must add `try` to the BAPI call to create a transaction, otherwise the change does not impact SAP. To configure this flow: 1. From the **Mule Palette** view, select **HTTP** and drag the **Listener** source to the canvas. 2. Configure the global element using the default values. 3. In the **Listener** properties tab, set the path to `/sync-mule-transaction`. 4. Drag a **Transform Message** component next to **Listener**. The content of this message creates a sales order from the data. 5. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/xml --- { BAPI\_SALESORDER\_CREATEFROMDAT2: { "import": { ORDER\_HEADER\_IN: { DOC\_TYPE: "TA", SALES\_ORG: "3000", DISTR\_CHAN: "10", DIVISION: "00" }, ORDER\_HEADER\_INX: { DOC\_TYPE: "X", SALES\_ORG: "X", DISTR\_CHAN: "X", DIVISION: "X" } }, tables: { ORDER\_ITEMS\_IN: { row: { ITM\_NUMBER: "000010", MATERIAL: "000000000050066128" as Number as String {format: "000000000000000000"}, PLANT: "3000", TARGET\_QTY: "1" } }, ORDER\_ITEMS\_INX: { row: { ITM\_NUMBER: "000010", MATERIAL: "X", PLANT: "X", TARGET\_QTY: "X" } }, ORDER\_PARTNERS: { row: { PARTN\_ROLE: "WE", PARTN\_NUMB: "0000000448" } }, ORDER\_SCHEDULES\_IN: { row: { ITM\_NUMBER: "000010", SCHED\_LINE: "0001", REQ\_QTY: "1" } }, ORDER\_SCHEDULES\_INX: { row: { ITM\_NUMBER: "000010", SCHED\_LINE: "0001", REQ\_QTY: "X" } } } } } 6. From the **Mule Palette** view, select **SAP** and drag the **Synchronous Remote Function Call** operation next to the **Transform Message** component. 7. Create a global element named `SAP_Config` and specify the connection information. 8. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. 9. Enter `BAPI_SALESORDER_CREATEFROMDAT2` for the **Function Name** and `payload` for the **Content**. 10. From the **Mule Palette** view, select **Core** and drag **On Error Continue** under **Synchronous Remote Function Call**. 11. From the **Mule Palette** view, select **Core** and drag a **Logger** component into **On Error Continue**. 12. From the **Mule Palette** view, select **Core** and drag another **Logger** component next to **Synchronous Remote Function Call**. 13. Enter `payload.BAPI_SALESORDER_CREATEFROMDAT2.export.SALESDOCUMENT` for the **Message**. ### Configure the Third Flow The third flow creates a transaction ID and gets a list. Asynchronous calls do not expect a response and require a different way of managing the transaction. Use specific operations to manage transactions of asynchronous calls. To configure this flow: 1. From the **Mule Palette** view, select **HTTP** and drag the **Listener** source to the canvas. 2. Configure the global element using the default values. 3. In the **Listener** properties tab, set the path to `/async-rfc`. 4. From the **Mule Palette** view, select **SAP** and drag the **Start SAP transaction** operation next to **Listener**. 5. Create a global element named `SAP_Config` and specify the connection information. 6. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. 7. From the **Mule Palette** view, select **Core** and drag a **Set Variable** transformer next to **Start SAP transaction**. 8. Enter `createdTransactionId` for the **Name** and `payload` for the **Value**. 9. Drag a **Transform Message** component next to **Set Variable**. The content of this message gets a list of banks. 10. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/xml --- %dw 2.0 output application/xml --- { BAPI\_BANK\_GETLIST: { "import": { BANK\_CTRY: "US", MAX\_ROWS: 0 } } } 11. From the **Mule Palette** view, select **SAP** and drag the **Asynchronous Remote Function Call** operation next to **Transform Message**. 12. Create a global element named `SAP_Config` and specify the connection information. 13. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. 14. Enter `"BAPI_BANK_GETLIST"` for the **Function Name** and `payload` for the **Content**. 15. From the **Mule Palette** view, select **SAP** and drag the **Confirm transaction** operation next to **Asynchronous Remote Function Call**. 16. Create a global element named `SAP_Config` and specify the connection information. 17. Click **Test Connection** to confirm that Mule runtime engine can connect with the SAP instance. 18. Enter `vars.createdTransactionId` for the **Transaction ID (TID)**. ### Run the App To run the Mule app: 1. Click **Run** > **Run as** > **Mule Application**. 2. From a web browser, test the first flow by entering the following URL: `http://localhost:8081/sync-rfc` You should see the XML output of the request, similar to the following: ```dataweave US 021000089 Citibank NY Park Avenue New York CITIUSXX 021000089 Manhattan 2005-03-11 C5031845 0 0 0 000 000000 0 ``` 3. From a web browser, test the second flow by entering the following URL: `http://localhost:8081/sync-mule-transaction` You should see the XML output of the request, similar to the following: ```dataweave TA 3000 10 00 .................... S V1 311 Standard Order 23669 has been saved 000000 Standard Order 23669 SALES_HEADER_IN 0 T90CLNT090 ``` 4. From a web browser, test the third flow by entering the following URL: `http://localhost:8081/async-rfc` You should see the XML output of the request, similar to the following: ```dataweave US 0 ``` ### XML for Managing Transactions Paste this code into a new Mule app in Studio to quickly load the flow for the managing transactions example. Change the values to reflect your environment. ```xml ``` ## Configure Multiple Gateways This example shows you how to create a Mule app that configures a message server with multiple gateway connections to distribute the load and improve performance, instead of a single gateway connection. The message server configuration can be used for all SAP Connector operations, including **Document Listener**, **Function Listener**, and operations such as **Synchronous Remote Function Call** and **Send IDoc**. The following screenshot shows the Studio flows for this example: ![Studio flows for configuring a message server with multiple gateways](/mulesoft/current/en-us/sap-connector/latest/_images/sap-multiple-gateways.png) ### Configure the First Flow The first flow uses the message server configuration with the **Document listener** source. To configure this flow: 1. In Anypoint Studio, create a new Mule project. 2. From the **Mule Palette** view, select **SAP** and drag the **Document listener** source to the canvas. 3. Configure the SAP Connector configuration for the **Document listener** source: 1. In the connection configuration, select either **Certificate**, **Kerberos**, or **Simple Connection Provider** as the connection type. 2. Fill in the required fields such as **SAP client ID**, **Username** and **Password** (for Simple Connection Provider), or the appropriate authentication fields for your connection type. 3. Configure the **Message server configuration** section with the following fields: 1. **Host**: The host of the message server (for example, `54.160.77.19`) 2. **System Id**: The system ID of the SAP system 3. **Port**: The port with which the connector logs into the message server 4. **Group**: The group of SAP application servers 4. Note: When using **Message server configuration**, the **SAP system number** field is not required. When using **Application server host**, the **SAP system number** field is required. 4. In the **Document listener** properties tab, configure the following fields:
FieldValue

Gateway host

54.160.77.19

Gateway service

3300

Program id

MULE11_IDOC_PID

Connection count

1

5. From the **Mule Palette** view, select **Core** and drag a **Logger** component next to **Document listener** on the canvas. ### Configure the Second Flow The second flow triggers the first individual gateway. To configure this flow: 1. From the **Mule Palette** view, drag the **HTTP > Listener** source to the canvas. 2. Configure the global element using the default values. 3. In the **Listener** properties tab, set the path to `/c`. 4. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to the **Listener** source. 5. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/xml --- { ZMMFM\_TRIGGER\_IDOC\_MATMAS: { "import": { IV\_MTYP: "MATMAS" , IV\_OBJ: "23" , IV\_SYS: "MULE11\_LS" } , export: { EV\_RET: "0" },export: { EV\_OBJ: "0000000003526552" },export: null,changing: null, tables: { T\_MSG: null }, } } 6. From the **Mule Palette** view, select **SAP** and drag the **Synchronous Remote Function Call** operation to the canvas. 7. Configure the global element for the **Synchronous Remote Function Call** operation and fill in the required fields. 8. In the **Synchronous Remote Function Call** properties tab, configure the following fields:
FieldValue

Function Name

"ZMMFM_TRIGGER_IDOC_MATMAS"

Content

payload

9. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to the **Synchronous Remote Function Call** operation. 10. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/json --- payload ### Configure the Third Flow The third flow triggers the second individual gateway. To configure this flow: 1. From the **Mule Palette** view, drag the **HTTP > Listener** source to the canvas. 2. Configure the global element using the default values. 3. In the **Listener** properties tab, set the path to `/d`. 4. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to the **Listener** source. 5. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/xml --- { ZMMFM\_TRIGGER\_IDOC\_MATMAS: { "import": { IV\_MTYP: "MATMAS" , IV\_OBJ: "23" , IV\_SYS: "MULE11\_LS" } , export: { EV\_RET: "0" },export: { EV\_OBJ: "0000000003526552" },export: null,changing: null, tables: { T\_MSG: null }, } } 6. From the **Mule Palette** view, select **SAP** and drag the **Synchronous Remote Function Call** operation to the canvas. 7. Configure the global element for the **Synchronous Remote Function Call** operation and fill in the required fields. 8. In the **Synchronous Remote Function Call** properties tab, configure the following fields:
FieldValue

Function Name

"ZMMFM_TRIGGER_IDOC_MATMAS"

Content

payload

9. From the **Mule Palette** view, select **Core** and drag the **Transform Message** component next to the **Synchronous Remote Function Call** operation. 10. In the **Output** section of the **Transform Message** component, overlay the brackets with this text: %dw 2.0 output application/json --- payload ### Run the App To run the Mule app: 1. Click **Run** > **Run as** > **Mule Application**. ### XML for Configuring Multiple Gateways Paste this code into a new Mule app in Studio to quickly load the flow for the configuring multiple gateways example. Change the values to reflect your environment. ```dataweave ``` ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for SAP (SAP Connector) enables the integration of data to and from external systems based on SAP NetWeaver. > [!NOTE] Starting with version 5.0, SAP Connector also supports connecting to an on-premises > instance of SAP S/4HANA. ## Limitations - For SAP Connector versions 5.4.0 and earlier, multiple servers deployed on the same Mule runtime engine with the same PROGRAM\_ID, GATEWAY\_SERVICE, and GATEWAY\_HOST cannot be created by the JCo library. If you attempt to create two servers with the same PROGRAM\_ID, GATEWAY\_SERVICE, and GATEWAY\_HOST, only one server is created. To work around this, you can use two different Mule runtime engines or use the same PROGRAM\_ID with two different GATEWAY\_HOSTs. - SAP Connector does not support Bitronix Transaction Manager. - The **Document Listener** and **Function Listener** sources do not support Mule transactions. Although the **Transactional action** and **Transaction type** parameters (on the **Advanced tab**) are available for both sources, the transactional feature is not implemented. - The reconnection strategy on SAP Listeners (**Document Listener** and **Function Listener**) relies exclusively on the JCo library, which means that the Mule reconnection mechanism has no impact on reconnections. - The JCO Server that runs in the background manages the reconnection when there is a connection issue. The JCo RFC provider recognizes a communication error between the Java server and the ABAP gateway and attempts to reconnect. If the first reconnection fails, the next reconnection attempt occurs after waiting for one second. If the reconnection fails again, the reconnection wait time doubles from one second to two seconds, until eventually it reaches the default maximum waiting period of 3600 seconds, or one hour. Set the maximum reconnection timeout using the `-Djco.server.max_startup_delay=` JMV parameter. - The `XSTRING` data format in SAP is a binary blop format. To submit values in an `XSTRING` field, you must use the [toHex](https://docs.mulesoft.com/dataweave/latest/dw-numbers-functions-tohex) function to base-32 encode the binary within the XML submitted to the RFC step. ## Configuration Default Configuration for SAP Connector.
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

Connection types for this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Default Idocument Version

String

Default IDoc version.

0

Disable Jco Internal Cache

Boolean

Flag that indicates whether to use the JCo internal cache. Set this flag to true to disable the SAP JCo internal cache. By default, JCo stores the metadata after the first call and populates that template in the following calls. This flag applies to both functions and sources.

false

Evaluate Response Flag

Boolean

Flag that indicates if an error response throws an exception or enables the user to handle it as another result. This flag is an exception or logging mechanism used to specify whether a message throws an exception (E) or is treated as a result with a warning (W).

If you set the flag to true and an exception (E) message is returned, an exception is thrown with that message.

If you set the flag to true and a warning (W) message is returned, a warning message is logged.

false

Log Trace Flag

Boolean

Flag that indicates whether to log the trace on the Mule server. Set this flag to true to log a trace.

false

Use SAP Format

Boolean

Determines whether to support the legacy format for returning SAP values. Used in the JCoToBusinessObjectParser class when parsing a JCoField. Use the SAP default format only when working with BAPIFunctions over sRFC.

  • true

    Values are returned as strings with the original SAP format.

  • false

    Original values are converted to the corresponding Java objects, serialized, and returned.

false

Use SAP Format On Function Listener

Boolean

Determines whether to support the legacy format for returning SAP values. Used to parse a JCoField. Use the SAP default format only when working with the BAPI function listener.

  • true

    Values are returned as strings with the original SAP format.

  • false

    Original values are converted to the corresponding Java objects, serialized, and returned.

false

### Certificate Connection Type Relies on an X509 certificate to authenticate the user.
NameTypeDescriptionDefault ValueRequired

SAP system number

String

Two-digit system number (sysnr) of the SAP system. Required when using Application server host. Not required when using Message server configuration.

SAP client ID

String

Three-digit client number. Leading zeros are preserved if they appear in the number.

x

Destination Name

String

Identifier of the destination generated by this connector. If none is set, a random value is created.

Login language

String

Language code used by the connector. The language determines the code page used for communicating between the SAP adapter and the application server.

EN

Extended Properties

Object

Used to pass in all the database server-specific connection parameters.

X.509 Certificate

String

Path to the X.509 certificate. This is required when the connector is working as a client.

Application server host

String

Host of the SAP application server.

Message server configuration

Configuration for message server usage.

Enable RFC tracing on server

Boolean

Enables or disables RFC trace on the server.

false

Enable CPIC tracing on server

Enumeration, one of:

  • INHERIT

  • NO_TRACING

  • LEVEL_1

  • LEVEL_2

  • LEVEL_3

Enables or disables CPIC trace on the server.

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

### Kerberos Connection Type Implements the Kerberos protocol to authenticate and authorize the user.
NameTypeDescriptionDefault ValueRequired

SAP system number

String

Two-digit system number (sysnr) of the SAP system. Required when using Application server host. Not required when using Message server configuration.

SAP client ID

String

Three-digit client number. Leading zeros are preserved if they appear in the number.

x

Destination Name

String

Identifier of the destination generated by this connector. If none is set, a random value is created.

Login language

String

Language code used by the connector. The language determines the code page used for communicating between the SAP adapter and the application server.

EN

Extended Properties

Object

Used to pass in all the database server-specific connection parameters.

Application server host

String

Host of the SAP application server.

Message server configuration

Configuration for message server usage.

Enable RFC tracing on server

Boolean

Enables or disables RFC trace on the server.

false

Enable CPIC tracing on server

Enumeration, one of:

  • INHERIT

  • NO_TRACING

  • LEVEL_1

  • LEVEL_2

  • LEVEL_3

Enables or disables CPIC trace on the server.

Kerberos Config File Path

String

Path to the krb5.conf file.

x

Keytab File Path

String

Path to the keytab file.

x

GSS Library Path

String

Path to the gss library.

x

Principal

String

Principal that the connector uses to log in to SAP.

x

Client SNC Partner Name

String

The jco.client.snc_partnername property.

x

Client SNC My Name

String

The jco.client.snc_myname property.

x

Server SNC Partner Name

String

The jco.server.snc_partnername property.

Server SNC My Name

String

The jco.server.snc_myname property.

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

### Simple Connection Provider Connection Type Connects using a username and password.
NameTypeDescriptionDefault ValueRequired

SAP system number

String

Two-digit system number (sysnr) of the SAP system. Required when using Application server host. Not required when using Message server configuration.

SAP client ID

String

Three-digit client number. Leading zeros are preserved if they appear in the number.

x

Destination Name

String

Identifier of the destination generated by this connector. If none is set, a random value is created.

Login language

String

Language code used by the connector. The language determines the code page used for communicating between the SAP adapter and the application server.

EN

Extended Properties

Object

Used to pass in all the database server-specific connection parameters.

Username

String

Username the connector uses to log in to SAP.

x

Password

String

Password associated with the login username.

x

Application server host

String

Host of the SAP application server.

Message server configuration

Configuration for message server usage.

Enable RFC tracing on server

Boolean

Enables or disables RFC trace on the server.

false

Enable CPIC tracing on server

Enumeration, one of:

  • INHERIT

  • NO_TRACING

  • LEVEL_1

  • LEVEL_2

  • LEVEL_3

Enables or disables CPIC trace on the server.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

## Sources - [Document Listener](#document-listener) - [Function Listener](#function-listener) ### Document Listener `` Listens for incoming IDocs.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Gateway Host

String

Name of the host running the gateway server. This is the name of the host running the gateway handler. SAP Gateway is a development framework used to connect non-SAP applications to SAP applications. You can configure the SAP Gateway host to be the trusted system using an RFC destination.

x

Gateway Service

String

Service port for the gateway service of the SAP system. To use the name instead of the port, you must map the gateway service name to the gateway service port.

x

Program ID

String

SAP system program ID that is registered on the gateway. Must be unique for the given gateway.

x

Connection Count

Number

Number of connections to register on the gateway. If there is more than one connection, handler requests are processed in parallel. For example, if two connections are set, this creates two handler workers or threads that handle requests in parallel, almost like having two sources start together.

1

Idoc Type Filter Regex

String

Expression to filter all incoming IDocs by type.

Idoc Type Extension Filter Regex

String

Expression to filter all incoming IDocs by type extension.

Message server host

String

Host of the message server.

Message server port

String

Message server name or port number.

System ID

String

System ID of the system the message server belongs to.

Group

String

Logon group defined in ABAP that identifies a set of application servers.

Update interval

String

How often the message server fetches the list of application servers.

IDoc Render Options

IDoc rendering options.

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_BEGIN

  • NONE

Type of beginning action that sources take regarding transactions.

NONE

Transaction Type

Enumeration, one of:

  • LOCAL

  • XA

Type of transaction to create. Availability depends on Mule version.

LOCAL

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

Attributes Type

#### Associated Configurations - [Configuration](#sap) ### Function Listener `` Listens for incoming BAPI functions.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Gateway Host

String

Name of the host running the gateway server. This is the name of the host running the gateway handler. SAP Gateway is a development framework used to connect non-SAP applications to SAP applications. You can configure the SAP Gateway host to be the trusted system using an RFC destination.

x

Gateway Service

String

Service port for the gateway service of the SAP system. To use the name instead of the port, you must map the gateway service name to the gateway service port.

x

Program ID

String

SAP system program ID that is registered on the gateway. Must be unique for the given gateway.

x

Connection Count

Number

Number of connections to register on the gateway. If there is more than one connection, handler requests are processed in parallel. For example, if two connections are set, this creates two handler workers or threads that handle requests in parallel, almost like having two sources start together.

1

Targeted Function

String

Name of the function to receive. Filters the incoming BAPI functions by their names.

Message server host

String

Host of the message server.

Message server port

String

Message server name or port number.

System ID

String

System ID of the system the message server belongs to.

Group

String

Logon group defined in ABAP that identifies a set of application servers.

Update interval

String

How often the message server fetches the list of application servers.

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_BEGIN

  • NONE

Type of beginning action that sources take regarding transactions.

NONE

Transaction Type

Enumeration, one of:

  • LOCAL

  • XA

Type of transaction to create. Availability depends on Mule version.

LOCAL

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Response

Binary

Source response.

SAP 5.6 and later supports updating a specific row in a table when a response is sent back to SAP after Function Listener is triggered. To update a specific row, add the INDEX_ROW_UPDATE parameter to the payload with the index of the row you want to update.

#[payload]

#### Output

Type

Binary

Attributes Type

#### Associated Configurations - [Configuration](#sap) ## Operations - [Asynchronous Remote Function Call (Deprecated)](#asyncRfc) - [Asynchronous Remote Function Call](#asynchronousRemoteFunctionCall) - [Confirm Transaction](#confirmTransactionId) - [Get Function](#getFunction) - [Retrieve IDoc](#retrieveIdoc) - [Send IDoc](#send) - [Start SAP Transaction](#startsaptransaction) - [Synchronous Remote Function Call (Deprecated)](#syncRfc) - [Synchronous Remote Function Call](#synchronousRemoteFunctionCall) ### Asynchronous Remote Function Call (Deprecated) `` This operation is deprecated. Use the [**Asynchronous Remote Function Call**](#asynchronousRemoteFunctionCall) operation instead. This operation works only with JCo 3.0.x. Executes a BAPIFunction over a queued Remote Function Call (qRFC). A qRFC is an extension of a transactional RFC (tRFC) that ensures that individual steps are processed in sequence. This guarantees that multiple logical unit of work (LUW) transactions are processed in the order specified by the application. tRFC can be serialized using inbound and outbound queues, hence the name queued RFC. qRFC is best used as an extension of tRFC to define a processing sequence. Use qRFC to guarantee that several transactions are processed in a predefined order.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Function Name

String

Name of the function to execute.

x

Content

Binary

BAPIFunction to execute.

#[payload]

Transaction Id

String

ID that identifies an RFC so that the RFC runs only once.

x

Queue Name

String

Name of the queue on which the RFC executes. This applies for qRFC since each tRFC call that is processed is given a queue name by the application. A queue name and version are required for each qRFC transaction.

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Asynchronous Remote Function Call `` This operation works only with JCo 3.1.x and expects valid XML content in the response. Executes a BAPIFunction over a queued Remote Function Call (qRFC) and throws an `SAP:INVALID_INPUT` error when the provided payload is invalid according to JCo library checks. A qRFC is an extension of a transactional RFC (tRFC) that ensures that individual steps are processed in sequence. This guarantees that multiple logical unit of work (LUW) transactions are processed in the order specified by the application. tRFC can be serialized using inbound and outbound queues, hence the name queued RFC. qRFC is best used as an extension of tRFC to define a processing sequence. Use qRFC to guarantee that several transactions are processed in a predefined order.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Function Name

String

Name of the function to execute.

x

Content

Binary

BAPIFunction to execute.

#[payload]

Transaction Id

String

ID that identifies an RFC so that the RFC runs only once.

x

Queue Name

String

Name of the queue on which the RFC executes. This applies for qRFC since each tRFC call that is processed is given a queue name by the application. A queue name and version are required for each qRFC transaction.

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Confirm Transaction `` Confirms to the server that a transaction is successful.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Transaction ID (TID)

String

ID of the transaction to confirm.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:RETRY\_EXHAUSTED ### Get Function `` Retrieves a BAPIFunction based on its name.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Function Name

String

Name of the function to retrieve.

x

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Retrieve IDoc `` Retrieves an IDoc structure based on its key.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

IDoc Name

String

Key that contains the required information to retrieve the IDoc.

x

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Send IDoc `` Sends an IDoc to SAP over an RFC. An RFC can be one of two types for IDocs: - Transactional (tRFC) A special form of asynchronous Remote Function Call (aRFC). tRFC ensures transaction-like handling of processing steps that were originally handled autonomously. tRFC is an asynchronous communication method that executes the called function module in the RFC server only once, even if the data is sent multiple times due to a network issue. The remote system does not need to be available at the time the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, along with the corresponding data, in the SAP database under a unique transaction ID (TID). tRFC is similar to aRFC since it does not wait at the target system (similar to a registered post). If the system is not available, the data is written into aRFC tables with a transaction ID (SM58) that is chosen by the scheduler RSARFCSE and runs every 60 seconds. tRFC is best used as an extension of asynchronous RFC secure communication between systems. - Queued (qRFC) An extension of tRFC. qRFC ensures that individual steps are processed in sequence. Use qRFC to guarantee that multiple LUWs (Logical Unit of Work transactions) are processed in the order specified by the application. tRFC can be serialized using inbound and outbound queues, hence the name queued RFC (qRFC). qRFC is best used as an extension of tRFC to define a processing sequence. Implement qRFC if you want to guarantee that several transactions are processed in a predefined order. Both tRFC and qRFC have a TID handler.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

IDoc Name

String

Name of the IDoc to execute.

x

Content

Binary

IDoc to execute.

#[payload]

Version

String

Version on the IDoc.

Transaction Id

String

ID that identifies an RFC so that the RFC runs only once.

Queue Name

String

Name of the queue on which the RFC executes. This applies for qRFC since each tRFC call that is processed is given a queue name by the application. A queue name and version are required for each qRFC transaction.

IDoc Parsing Options

IDoc parsing options.

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Start SAP Transaction `` Creates a transaction ID to use as part of future calls.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

String

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Synchronous Remote Function Call (Deprecated) `` This operation is deprecated. Use the [**Synchronous Remote Function Call**](#synchronousRemoteFunctionCall) operation instead. This operation works only with JCo 3.0.x. Executes a BAPIFunction over a synchronous Remote Function Call (sRFC). sRFC requires both the systems (client and server) to be available at the time of communication or data transfer. sRFC is the most common type and is used when a result is required immediately after the execution of sRFC. sRFC is a means of communication between systems where acknowledgments are required. The resources of the source system wait at the target system and ensure that they deliver the message or data with ACKD. The data is consistent and reliable for communication. If the target system is not available, the source system resources wait until the target system is available. This can lead to the processes of the source system going into Sleep/RFC/CPIC mode at the target systems, which blocks these resources. Use sRFC for communication between systems, and communication between an SAP web application server and an SAP GUI.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Function Name

String

Name of the function to execute.

x

Content

Binary

BAPIFunction to execute.

#[payload]

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ### Synchronous Remote Function Call `` This operation works only with JCo 3.1.x and expects valid XML content in the response. If the function being called must impact changes in SAP, you must add a `try` block because you need an open transaction. Executes a BAPIFunction over a synchronous Remote Function Call (sRFC) and throws an `SAP:INVALID_INPUT` error when the provided payload is invalid according to JCo library checks. sRFC requires both the systems (client and server) to be available at the time of communication or data transfer. sRFC is the most common type and is used when a result is required immediately after the execution of sRFC. sRFC is a means of communication between systems where acknowledgments are required. The resources of the source system wait at the target system and ensure that they deliver the message or data with ACKD. The data is consistent and reliable for communication. If the target system is not available, the source system resources wait until the target system is available. This can lead to the processes of the source system going into Sleep/RFC/CPIC mode at the target systems, which blocks these resources. Use sRFC for communication between systems, and communication between an SAP web application server and an SAP GUI. > [!NOTE] The **Synchronous Remote Function Call** operation requires authorization for the > `RFC_METADATA_GET` function module. If authorization is not granted, you may encounter this error: > > `com.sap.conn.rfc.exceptions.RfcGetException: No RFC authorization for function module RFC_METADATA_GET`.
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Function Name

String

Name of the function to execute.

x

Content

Binary

BAPIFunction to execute.

#[payload]

Encoding

String

Canonical name of the encoding. Refer to Oracle’s supported encodings.

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

Type of joining action that operations take regarding transactions.

JOIN_IF_POSSIBLE

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

#### Output

Type

Binary

#### Associated Configurations - [Configuration](#sap) #### Throws - SAP:CONNECTIVITY - SAP:INVALID\_CACHE - SAP:INVALID\_INPUT - SAP:METADATA\_UNAVAILABLE - SAP:NOT\_FOUND - SAP:NOT\_SUPPORTED - SAP:PARSING - SAP:RETRY\_EXHAUSTED - SAP:SYSTEM\_BUSY - SAP:TIMEOUT ## Object Types - [Expiration Policy](#ExpirationPolicy) - [IDoc Parse Parameter Group](#IDocParseParameterGroup) - [IDoc Render Parameter Group](#IDocRenderParameterGroup) - [Message Server](#MessageServer) - [Reconnect](#reconnect) - [Reconnect Forever](#reconnect-forever) - [Reconnection](#Reconnection) - [Redelivery Policy](#RedeliveryPolicy) - [Repeatable File Store Stream](#repeatable-file-store-stream) - [Repeatable In Memory Stream](#repeatable-in-memory-stream) - [SAP Attributes](#SapAttributes) ### Expiration Policy Configures an expiration policy strategy.
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

### IDoc Parse Parameter Group IDoc parsing options.
FieldTypeDescriptionDefault ValueRequired

Parse With Field Value Checking

Boolean

Indicates whether to enable the field value checking mechanism in accordance with the respective IDoc field metadata when parsing.

false

Parse Ignore Unknown Fields

Boolean

Indicates whether to ignore unknown fields when parsing, for example, when parsing with older IDoc metadata.

false

Parse Ignore Invalid Char Errors

Boolean

Indicates whether to ignore character range check errors in accordance with the declared XML specification version when parsing. When using this option, invalid characters within field values are accepted, although the XML document to parse might contain characters that are not in the valid character range.

false

Parse Without Field Data Type Checking

Boolean

Indicates whether to disable the field data type checking mechanism in accordance with the respective IDoc field metadata when parsing.

Use this option with care.

Sending IDocs with illegal field contents that violate the field’s defined datatype can cause ABAP system dumps and result in unrecognized partial loss of data when processed in an AS ABAP system.

false

Parse Refuse Unknown XML Version

Boolean

Indicates whether to refuse XML documents that declare an unknown XML specification version, for example, a potential future XML specification version 1.2 or 2.0.

false

Parse Refuse XML Version10

Boolean

Indicates whether to refuse XML documents that don’t use XML specification version 1.0 or that don’t contain an XML declaration header.

false

Parse Refuse XML Version11

Boolean

Indicates whether to refuse XML documents that use XML specification version 1.1.

false

Parse Accept Only Xml Version10

Boolean

Indicates whether to accept only XML documents that use XML specification version 1.0 or that don’t contain an XML declaration header.

false

Parse Accept Only Xml Version11

Boolean

Indicates whether to accept only XML documents that use XML specification version 1.1 or that don’t contain an XML declaration header.

false

Parse Accept Only Xml Version10 To11

Boolean

Indicates whether to accept only XML documents that use XML specification version 1.0 or 1.1 or that don’t contain an XML declaration header.

false

### IDoc Render Parameter Group IDoc rendering options.
FieldTypeDescriptionDefault ValueRequired

Render IDoc Empty Tags

Boolean

Indicates whether to include all empty tags in the resulting XML document.

false

Render IDoc Ignore Invalid Char Errors

Boolean

Indicates whether to ignore character range check errors in accordance with the used XML specification version.

false

Render IDoc Ignore Tag Escape Errors

Boolean

Indicates whether to ignore escape character errors within XML tags in accordance with the used IDocXML format

false

Render IDoc Omit Xml Declaration

Boolean

Indicates whether to omit the XML declaration section in the resulting XML document.

false

Render IDoc Optional Encoding Decl

Boolean

Indicates whether to write an optional XML encoding declaration attribute into the resulting XML document.

false

Render IDoc Substitute Invalid Chars

Boolean

Indicates whether to substitute invalid characters within IDoc field values with the number sign # (U+0023).

false

Render IDoc With CR

Boolean

Indicates whether to insert CR (Carriage Return) characters into the resulting XML document.

false

Render IDoc With CRLF

Boolean

Indicates whether to insert CR+LF (Carriage Return and Line Feed) characters into the resulting XML document.

false

Render IDoc With LF

Boolean

Indicates whether to insert LF (Line Feed) characters into the resulting XML document.

false

Render IDoc With Tabs And CR

Boolean

Indicates whether to insert TAB and CR (Tab and Carriage Return) characters into the resulting XML document.

false

Render IDoc With Tabs And CRLF

Boolean

Indicates whether to insert TAB and CR+LF (Tab, Carriage Return and Line Feed) characters into the resulting XML document.

false

Render IDoc With Tabs And LF

Boolean

Indicates whether to insert TAB and LF (Tab and Line Feed) characters into the resulting XML document.

false

Render IDoc Xml10

Boolean

Indicates whether to create an XML document compliant with XML specification version 1.0.

false

Render IDoc Xml11

Boolean

Indicates whether to create an XML document compliant with XML specification version 1.1.

false

### Message Server You can configure a message server with multiple gateways to distribute the load and improve performance. The message server configuration is used for all SAP Connector operations (**Document Listener**, **Function Listener**, and all other operations such as **Synchronous Remote Function Call** and **Send IDoc**). For more information, refer to [Configure Multiple Gateways](https://docs.mulesoft.com/sap-connector/latest/sap-connector-examples#configure-multiple-gateways).
FieldTypeDescriptionDefault ValueRequired

Host

String

Host of the message server.

x

System Id

String

System ID of the SAP system.

x

Port

Number

Port with which the connector logs into the message server.

Group

String

Group of SAP application servers.

Router

String

SAP router string to use for a system protected by a firewall.

### Reconnect Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Count

Number

How many reconnection attempts the Mule app can make.

### Reconnect Forever Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true

    Allow the deployment to fail.

  • false

    Ignore the results of the connectivity test.

Reconnection Strategy

Reconnection strategy to use.

### Redelivery Policy Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned.

Id Expression

String

One or more expressions that determine when a message was redelivered. This property can be set only if the Use Secure Hash field is false.

Object Store

Object Store

Configures the object store that stores the redelivery counter for each message.

### Repeatable File Store Stream Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.
FieldTypeDescriptionDefault ValueRequired

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

### Repeatable In Memory Stream Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX buffer size. Always run performance tests to find the optimal buffer size for your specific use case.
FieldTypeDescriptionDefault ValueRequired

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value.

Buffer Size Increment

Number

Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand.

Max Buffer Size

Number

The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields.

### SAP Attributes Attributes for SAP payload.
FieldTypeDescriptionDefault ValueRequired

Transaction Id

String

Transaction ID value.

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 Studio Configuration > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Install SAP Connector and configure the connector in Anypoint Studio. First install the SAP Java Connector (JCo) libraries that you obtain from SAP and then you can create an app containing one or more SAP Connector operations. Studio enables you to create an app and access the app from a browser. To configure SAP Connector in Anypoint Studio: 1. Add the connector to your Mule project. 2. Configure the SAP connector. 3. Configure an input source for the connector. ## Add the Connector to Your Mule Project Add SAP Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and to add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In the **Add Dependencies to Project** window, type `sap` in the search field. 3. Click **SP Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Select a Source Operation 1. In Anypoint Studio, click the **Mule Palette** and type `sap`. 2. Choose an operation. If you want your app to start when an object is sent from SAP, choose either of the following operations and drag the operation to the **Source** area of the Studio canvas. - **Document source** listens for a change to an IDoc. When an IDoc changes, your app executes - **Function source** listens for a change to an SAP function module. When the targeted function module changes, your app executes. See the [SAP Connector Reference](https://docs.mulesoft.com/sap-connector/latest/sap-connector-reference) for field values. If you chose the **Document source** or **Function source** operation, proceed to the next section to install the SAP libraries. 3. Alternatively, you can configure an input source for this connector such as an **HTTP Listener**, or **Scheduler**, and drag the operation to the Studio canvas. An HTTP Listener enables you to start your app from a browser. A Scheduler starts your app at a specific time. 4. Install the SAP libraries. ## Install SAP Libraries To use SAP libraries in your Mule project, you must first download the libraries to your computer. You can use the three libraries in Anypoint Studio directly, without conversion. You must have an SAP ID to download the libraries. The file types for each library depend on your operating system:
OSFile Types

Windows

  • sapidoc3.jar

  • sapjco3.jar

  • sapjco3.dll

Mac OS

  • sapidoc3.jar

  • sapjco3.jar

  • libsapjco3.jnilib

Linux

  • sapidoc3.jar

  • sapjco3.jar

  • libsapjco3.so

> [!NOTE] SAP Connector supports SAP JCo libraries versions 3.0.x and 3.1.x. After you install the libraries, you can customize the global element properties and test the connection. ## Configure the Libraries in Anypoint Studio After installing the SAP Connector in Studio and adding the connector to your Mule project, configure the libraries. 1. Double-click the connector in the flow. 2. Click the plus sign (**+**) on the right of the **Connector Configuration** field. This screen appears: ![SAP Connector global element properties window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-01.png) ### Install the IDOC Library 1. Click **Add Dependency**. 2. Click **Install**. ![Install button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02.png) 3. In the **Install** menu, click **Browse** to locate the library file. 4. Specify a unique group ID, artifact ID, and version. ![Install file into local repository window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02-in.png) 5. Click **Finish** or, if you want to cancel, click **Remove Dependency**. ![Finish button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02-finish.png) ### Install the JCO Library 1. Click **Add Dependency**. 2. Click **Install**. ![Install button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02.png) 3. In the **Install** menu, click **Browse** to locate the library file. 4. Specify a unique group ID, artifact ID, and version. ![Install file into local repository window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-03-in.png) 5. Click **Finish** or, if you want to cancel, click **Remove Dependency**. ![Finish button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-03-finish.png) ### Install the JCO Native Library 1. Click **Add Dependency**. 2. Click **Install**. ![Install button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-02.png) 3. In the **Install** menu, click **Browse** to locate the library file. On MacOS, starting with JCO version 3.1.2, the native library extension was changed from `jnilib` to `dylib`. 1. After installing the library from the local machine: 2. Navigate to the bottom of the **Shared Folder** window. 3. Select **Any**, and then select the `dylib` native library. 4. In the **Install file into local repository** window, enter values for the following fields: - **Group ID** - **Artifact ID** - **Version** 4. Specify a unique group ID, artifact ID, and version. ![Install file into local repository window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-04-in.png) 5. Click **Finish** or, if you want to cancel, click **Remove Dependency**. ![Finish button in Maven dependency window](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-configuration-04-finish.png) When you are finished installing the libraries, the configuration screen appears as follows with green check marks for each successfully installed library: ![Global element properties window with required libraries installed](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-libraries-installed.png) ## Test the Connection 1. Sign into your SAP login to get the information you need to configure the remaining **Global Element Properties** fields as described in [Configure in Studio](#gepparms). 2. Click **Test Connection** to ensure that you have the correct login information. ## Configure the Connector If you need more than one SAP Connector instance in your Mule project, you can create a global SAP element. The SAP Connector object holds the configuration properties that allow you to connect to the SAP server. To create a configuration for SAP Connector, complete the following steps: 1. Go to **Global Elements** section and click **Create**. 2. Select either **SAP Inbound** or **SAP Outbound** in the **Connector Configuration** section. 3. In the **General** tab pane, enter the required parameters for defining an SAP connection, which your SAP system administrator can supply. The SAP global element properties allow you to define connection properties as well as to add the required SAP dependencies to your project. For ease of use, SAP Connector shows only the most common properties as connector parameters. To configure a property that is not listed in the **Properties** panel, see the [Define Extended Properties](https://docs.mulesoft.com/sap-connector/latest/sap-connector-config-topics) topic. The minimum required attributes to define are:
FieldDescription

Application Server Host

SAP endpoint

Username

Username of an authorized SAP user

Password

Password credential of an authorized SAP user

System Number

System number used to connect to the SAP system

Client

The SAP client ID (usually a number) used to connect to the SAP system

Login Language

The language to use for the SAP connection. For example, EN for English.

As a best practice, use property placeholder syntax to load the credentials in a more simple and reusable way. Click **Test Connection** to verify that the connection to the SAP instance is correct. If the credentials are correct you should see the `Test Connection Successful` message. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. ## Next After configuring this connector in Studio, see the [Additional Configuration Information](https://docs.mulesoft.com/sap-connector/latest/sap-connector-config-topics) topic for more configuration topics. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 Terminology > For the full documentation index, see: https://docs.mulesoft.com/llms.txt > [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality. > We maintained certain terms to avoid any effect on customer implementations. The following are commonly used SAP system acronyms: ABAP (Advanced Business Application Programming) SAP proprietary programming language and part of the NetWeaver platform for building business applications. ALE (Application Link Enabling) Sets up distributed applications and integrated installation of SAP systems. This involves business-driven message exchange using consistent data across loosely linked SAP apps. Apps are integrated through synchronous and asynchronous communication, rather than by use of a central database. BAPI (Business Application Programming Interface) The function module that fulfills design criteria and provides the ability to: - Implement a method of an SAP business object - Maintain a static interface through different versions of the SAP system - Enable remotely - Run to completion with or without user interaction - Handle errors FM (function module) Procedures defined in the ABAP language of SAP that allow the encapsulation and reuse of global functions in SAP. IDoc (intermediate document) Standard SAP format for electronic data interchange between SAP systems. Different message types (such as delivery notes or purchase orders) generally correspond to different special formats, known as IDoc types. Multiple message types with related content can, however, be assigned to a single IDoc type. Java API Handles dynamic metadata lookup and caching. The Java API implements the `JCO.Function` container used for parameters and tables for the SAP BAPI function module in Java. Java apps are built on top of the Java API. JNI (Java Native Interface) JNI is a layer in the SAP Connector library. JCo wraps the C libraries in Java to provide platform-native access to the SAP system. RFC middleware uses the RFC library through the JNI layer. RFC (remote function call) Communication with the SAP system is performed over the RFC protocol. A remote function call calls BAPI or triggers IDoc processing that runs in another system as a calling program. The RFC interface enables function calls either between two SAP systems or between the SAP and external system. RFC layer SAP component that processes remote function calls. RFC library Libraries of C language-based functions to access the SAP system. The RFC library is addressed by JNI. SAP Java IDoc class library Provides structured, high-level interpretation and navigation of SAP IDocs in Java that consists of the following add-on packages: - SAP Java base IDoc class library: A middleware-independent library that provides a set of general base classes and interfaces for middleware-dependent Java IDoc class library implementations. - SAP Java connector IDoc class library: A middleware-independent library for creating, sending, and receiving IDocs. SAP NetWeaver One of the main technologies and application platforms used by SAP solutions. The main component of NetWeaver is SAP Web Application Server (WebAS), which provides the runtime environment for SAP applications like ERP, CRM, SCM, PLM, SRM, and BI. Other components include the enterprise portal, exchange infrastructure, master data management, and mobile infrastructure. SAP NetWeaver is an umbrella term for these technical components. SAP NetWeaver runs on both the Java and ABAP stacks. SNC (Secure Network Communications) Integrates with SAP NetWeaver single sign-on or an external security product that works with SAP systems. SNC provides security functions that are not directly available with SAP systems. ## See Also - [Anypoint Connectors Overview](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # SAP Connector 5.9 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/sap http://www.mulesoft.org/schema/mule/sap/current/mule-sap.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ="http://www.mulesoft.org/schema/mule/" xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/sap http://www.mulesoft.org/schema/mule/sap/current/mule-sap.xsd"> ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-sap-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. For JCo library support, add these dependencies: ```xml org.mule.tools.maven mule-maven-plugin ${mule.maven.plugin.version} true com.sap.conn.jco com.sap.conn.jco.sapjco3 com.sap.conn.idoc com.sap.conn.idoc.sapidoc3 com.sap.conn.jco com.sap.conn.jco.libsapjco3 ``` To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `sap`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next After completing your namespace and `pom.xml` file, you can try the SAP [Examples](https://docs.mulesoft.com/sap-connector/latest/sap-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: SAP Connector version: 5.9 is-latest-version: true --- # Troubleshooting SAP Connector 5.9 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To troubleshoot Anypoint Connector for SAP (SAP Connector), become familiar with the information about performing general troubleshooting, addressing specific common errors, and interpreting commonly thrown exception messages. ## Enable Verbose Exception Logging Enable verbose exception logs to show a complete stack trace of the error instead of the default truncated output: 1. In Studio, right-click on the project and select **Run > Run Configurations**. 2. Go to the **Arguments** tab and append the arguments in the **VM arguments** section to add the `mule.verbose.exceptions` property. For example: `-XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true` ## Enable Verbose Logging To get a better understanding of why an application’s interaction with SAP Connector is failing, temporarily enable verbose logging for the connector. Remember to always disable enhanced verbosity after troubleshooting, because it can affect your Mule application’s performance. To enable verbose logging in the configuration file: 1. Access Anypoint Studio and navigate to the **Package Explorer** view. 2. Open your application’s project name. 3. Open the `src/main/resources` folder. 4. Open the `log4j2.xml` file inside the folder. 5. Add an `` tag inside the `` tag: ```xml ... ... ``` 6. Save your application changes. 7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule Application**. ## Perform General Troubleshooting Here is a list of general troubleshooting guidelines for SAP Connector: - [Check Log Files](#check-log-files) - [Enable JCo Trace](#enable-jco-trace) ### Check Log Files Mule stores log files (on a per-application basis) in the `$MULE_HOME\logs` directory: - `mule.log` Default Mule log file - `mule-app-YOUR_APP_NAME.log` Per-application log file ### Enable JCo Trace You can enable JCo trace externally from Mule. JCo trace accepts the following Java startup environment properties: - `-Djco.trace_level=N` Where `0` <= `N` <= `10`, and `10` is the most detailed trace - `-Djco.trace_path=` Optional JCo supports trace levels from `0` (default) through `10`. The amount of traced data increases with higher trace levels. Each trace level also contains all the trace data from the lower trace levels. If you are using a high JCo trace level with many JCo calls and transferred content, ensure that enough disk space is available. To enable traces at the connector level: 1. Set the attribute `jcoTrace` to `true` or provide the extended JCo property `jco.client.trace` or `jco.server.trace` with the value `1`. 2. Provide a value for `-Djco.trace_level=N` at Mule startup:
Trace LevelAS Java Severity LevelJCo 3 Trace Content

0

NONE

No trace

1

ERROR

JCo version and runtime environment information and JCo internal errors and exceptions without application errors

2

WARNING

JCo warning messages, for example, non-ABAP system exceptions

3

INFO

JCo information messages, for example, ABAP exceptions

4

PATH

RFC calls and important public API calls

5

DEBUG

Important internal middleware calls
Codepage information

6

DEBUG

Connection attributes
ASCII content data (the first 1000 chars of structures or the first 5 rows of tables)

7

DEBUG

RFC metadata, which includes: name, type, offset, length, import and export options, and additional hexadecimal values for content data

8

DEBUG

Full content data dump (no character or row limits)
Caller stack trace information, for example, getClient() identifies the application

9

DEBUG

No additional information (reserved for future use)

10

DEBUG

No additional information (reserved for future use)

3. Optionally, provide a value for `-Djco.trace_path=`. This is usually the complete path to an existing directory in which the trace files are stored, but you can apply other special values: - `stdout` JCo trace information is sent to standard the **output** stream - `stderr` JCo trace information is sent to standard the **error** stream If `-Djco.trace_path` is not set, then trace files are stored in the working directory. For Mule standalone instances, this is usually the `$MULE_HOME/bin` folder. ## Troubleshoot Common Errors Here is a list of the common SAP Connector errors and how to resolve them: - [Missing JCo Libraries](#missing-jco-libraries) - [JCo Classloader Conflicts](#jco-classloader-conflicts) - [JCo Version Conflicts](#jco-version-conflicts) - [JCo Renaming Conflicts](#jco-renaming-conflicts) - [Message Not an SAP Object](#message-not-an-sap-object) - [IDoc Metadata Unavailable](#idoc-metadata-unavailable) - [Missing TID Handler](#missing-tid-handler) - [Parameter Not Supported](#parameter-not-supported) - [Multiple JCo Servers Running](#multiple-jco-servers-running) ### Missing JCo Libraries These errors typically occur when you test the connection or try to deploy the Mule application without loading one or more of the required SAP JCo dependencies: - Missing JCo native library ```text java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path ``` - Missing JCo JAR java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoTraceListener - Missing IDoc JAR java.lang.NoClassDefFoundError: com/sap/conn/idoc/IDocMetaDataUnavailableException ![Global element properties window with missing libraries](/mulesoft/current/en-us/sap-connector/latest/_images/sap-connector-missing-libraries.png) To resolve this error: 1. Click **Configure** next to the dependency with the red exclamation mark icon in the **Required Libraries** section. 2. Browse through the dependencies and select the appropriate file. The missing dependencies are automatically added to the project’s classpath. > [!TIP] In **Package Explorer**, right-click the project and navigate to **Build Path > Configure > Build Path** to view the libraries in the project’s build path. ### JCo Classloader Conflicts When you load the native library from the global configuration, a copy of the file is placed in `$YOUR_APP/src/main/app/lib`, but the source file is not removed; hence, you get the following error if the native library shares the same directory as the JCo JAR files when testing the connection or deploying your app: ```text java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: Native Library /home/mule/sap-errors/lib/jco/libsapjco3.so already loaded in another classloader ``` ![SAP Error JCo classloader folder structure](/mulesoft/current/en-us/sap-connector/latest/_images/sap-error-jco-classloader-folder.png) To resolve this error: Choose either of the following solutions. The first is the simplest, but the second is the best practice approach. - Remove the _duplicate_ native library file from the directory in which your JCo JAR files reside: ![SAP Error JCo classloader fixed folder structure](/mulesoft/current/en-us/sap-connector/latest/_images/sap-error-jco-classloader-fix.png) - Configure the environment variable `LD_LIBRARY_PATH` to hold the dynamic link library and share it across multiple applications deployed within the same Mule runtime server. ### JCo Version Conflicts The most frequent cause of the following error is that different versions of the native library and JCo JAR files are being used: ```text java.lang.ExceptionInInitializerError: Native library sapjco3 is too old. Found library System-defined path to libsapjco3.so has version "720.612", but required is at least version "720.713". ``` To resolve this error, ensure that the following requirements are met: - 64-bit JCo is required on a JVM that runs in 64-bit mode, and 32-bit JCo is required on a JVM that runs in 32-bit mode. - On Microsoft Windows, JCo requires the Microsoft Visual Studio 2005 C/C++ runtime libraries. - Both the `sapjco.jar`, and one of `sapjco3.dll` or `sapjco3.so` or `sapjco3.jnilib` must be from the **same JCo package**. To verify the versions of the JCo libraries that you are using, do one of the following: - On Windows (in the UI): 1. Navigate to the directory in which the `sapjco3.jar` file is located. 2. Right-click the `sapjco3.jar` file. 3. Select **Open With** from the context menu. 4. Click the **Java 2 Platform Standard Edition** binary. 5. Verify the information shown in the JCo dialog that displays. - On Mac: 1. Open a terminal window. 2. Navigate to the directory in which the `sapjco3.jar` file is located. 3. Execute the command `java -jar sapjco3.jar -version`. 4. Verify the information shown in the JCo dialog that displays. ### JCo Renaming Conflicts You cannot rename any of the SAP JCo library files in JCo 3.0.11 or later as they won’t be recognized by JCo, and you receive the following error: ```text java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-3.0.11.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar" ``` This is also true for the IDoc library and you might receive this error: ```text java.lang.ExceptionInInitializerError: Illegal IDoc library archive "sapidoc3-3.1.4.jar". It is not allowed to rename or repackage the original archive "sapidoc3.jar". ``` To resolve this error, add this `maven-shade-plugin` to your application’s `pom.xml` file: ```xml org.apache.maven.plugins maven-shade-plugin 3.5.1 package shade false sapjco3-group-id:sapjco3-artifact-id sapidoc3-group-id:sapidco3-artifact-id ``` > [!NOTE] To prevent build issues, ensure the versions of `maven-shade-plugin` and > `munit-maven-plugin` are compatible: > > - `maven-shade-plugin` 3.5.x and later requires `munit-maven-plugin` 2.3.x and later. > > - `maven-shade-plugin` 3.4.x and earlier requires `munit-maven-plugin` 2.2.x and earlier. To determine the correct `groupId` and `artifactId` values, refer to your existing dependencies. An example configuration is shown below (these might vary depending on your setup): ```xml com.sap.conn.jco com.sap.conn.jco.sapjco3 3.1.12 com.sap.conn.idoc com.sap.conn.idoc.sapidoc3 3.1.4 ``` In this example, the full artifact coordinates are `com.sap.conn.jco:com.sap.conn.jco.sapjco3` and `com.sap.conn.idoc:com.sap.conn.idoc.sapidoc3`. > [!NOTE] Shading might increase the application size by nearly 2 MB. ### Message Not an SAP Object The endpoint expects an SAP object with the input parameters that are necessary to execute a BAPI or an IDoc. If you receive the following message, either: - The necessary input parameters are not provided. - The input parameters are provided but the SAP object is malformed. ```text org.mule.api.transport.DispatchException: Message is not a SAP object, it is of type "byte[]". Check the transformer for this Connector "SapConnector". Failed to route event via endpoint: SapOutboundEndpoint{endpointUri=sap://function, connector=SapConnector { name=SapConnector lifecycle=start this=4571cebe numberOfConcurrentTransactedReceivers=4 createMultipleTransactedReceivers=true connected=true supportedProtocols=[sap] serviceOverrides= } , name='endpoint.sap.function', mep=ONE_WAY, properties={evaluateFunctionResponse=false, bapiTransaction=false, functionName=BAPI_MATERIAL_AVAILABILITY, rfcType=srfc, outputXml=true}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: byte[] ``` To resolve this error: Create an SAP object that represents the call to the BAPI or IDoc by performing one of the following two actions: - Create XML that contains an SAP object with the BAPI call. - Provide an XML definition that includes input to create the actual SAP call. ### IDoc Metadata Unavailable When you receive the following error, it means that the RFC destination does not support Unicode: ```text RfcException: [mc-vmware|a_rfc] message: (3) IDOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "??????????????????????????å å" with extension " ORDSAPB6L B60CL ???" is unavailable. Return code: RFC_FAILURE(1) error group: 104 key: RFC_ERROR_SYSTEM_FAILURE ``` To resolve this error: Use transaction **SM59** to configure Unicode support in your SAP instance. ### Missing TID Handler Because no TID handler is defined, you receive the following error: ```text RfcException: [mule.local|MULESOFT_IDOC_SEND_TEST] message: check TID fault: No transaction handler is installed. Unable to process tRFC/qRFC requests. Return code: RFC_FAILURE(1) error group: 104 key: RFC_ERROR_SYSTEM_FAILURE Exception raised by myhost.com.ar|MULESOFT_IDOC_SEND_TEST at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.playbackTRfc(MiddlewareJavaRfc.java:2625) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.handletRfcRequest(MiddlewareJavaRfc.java:2546) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:2367) at com.sap.conn.jco.rt.DefaultServerWorker.dispatch(DefaultServerWorker.java:284) at com.sap.conn.jco.rt.DefaultServerWorker.loop(DefaultServerWorker.java:369) at com.sap.conn.jco.rt.DefaultServerWorker.run(DefaultServerWorker.java:245) at java.lang.Thread.run(Thread.java:680) ``` To resolve this error: Set `rfcType` to `trfc` or `qrfc` in ``. ### Parameter Not Supported Because SAP extended properties must have valid names, if you provide an invalid property name, you receive an error message similar to this one: ```text Root Exception stack trace: RfcException: [null] message: Parameter 'type' not supported: 'f' Return code: RFC_INVALID_PARAMETER(19) error group: 101 key: RFC_ERROR_PROGRAM at com.sap.conn.rfc.api.RfcOptions.checkParameters(RfcOptions.java:182) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1328) at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:731) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ``` In this example, JCo libraries are reporting that the parameter with name `type` is not valid. To resolve this error: Provide a valid property name from JCo extended properties. ### Multiple JCo Servers Running Two or more JCo servers cannot have the same set of configuration parameters, even if they have different configuration names, so you receive the following error: ```text ERROR 2012-07-05 10:11:30,525 [WrapperListener_start_runner] com.mulesoft.mule.transport.sap.SapMessageReceiver: Error connecting to server com.sap.conn.jco.JCoException: (101) JCO_ERROR_CONFIGURATION: Server configuration for sapavalara-1.0-SNAPSHOT-gettax is already used for a running server at com.sap.conn.jco.rt.StandaloneServerFactory.update(StandaloneServerFactory.java:358) at com.sap.conn.jco.rt.StandaloneServerFactory.getServerInstance(StandaloneServerFactory.java:176) at com.sap.conn.jco.server.JCoServerFactory.getServer(JCoServerFactory.java:74) at com.mulesoft.mule.transport.sap.jco3.SapJcoRfcServer.initialise(SapJcoRfcServer.java:46) at com.mulesoft.mule.transport.sap.jco3.SapJcoServerFactory.create(SapJcoServerFactory.java:60) at com.mulesoft.mule.transport.sap.SapMessageReceiver.doConnect(SapMessageReceiver.java:56) at org.mule.transport.AbstractTransportMessageHandler.connect(AbstractTransportMessageHandler.java:218) at org.mule.transport.AbstractConnector.registerListener(AbstractConnector.java:1254) ``` > [!NOTE] This applies only to Mule applications running on the same Mule server. Nodes on a Mule > server group do not have this limitation. To resolve this error: Use the following attributes to create the server group key (which determines the uniqueness of a JCo server connection): - `jco.server.gwhost` - `jco.server.gwserv` - `jco.server.progid` You can start two servers in the same Mule instance (JCo keeps this information in a Singleton class) only if they have different values for `gwhost`, `gwserv`, and `progid`. ## Understand Commonly Thrown Exceptions Here is a list of commonly thrown exception messages and how to interpret them: - SAP:CONNECTIVITY A connection cannot be established. - SAP:INVALID\_CACHE The cache used internally by the JCo library is corrupted or can’t be read. - SAP:INVALID\_INPUT User input cannot be parsed or is incorrect. - SAP:METADATA\_UNAVAILABLE The metadata for an IDoc segment is unavailable. - SAP:NOT\_FOUND A function or IDoc template cannot be found or retrieved. - SAP:NOT\_SUPPORTED An action occurs that is not supported by any JCo handler. - SAP:PARSING The JCo library has a parsing issue or the connector cannot convert XML to a BAPI function or an IDoc. - SAP:RETRY\_EXHAUSTED Execution block retries are exhausted. - SAP:SYSTEM\_BUSY The remote ABAP system is too busy to handle a request. - SAP:TIMEOUT A timeout exception happens inside the JCo library. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [SAP Connector Reference](https://docs.mulesoft.com/sap-connector/latest/sap-connector-reference) - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: SAP Connector version: 5.9 is-latest-version: true --- # Upgrading and Migrating to SAP Connector 5.x > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for SAP version 5.x has enhancements and changes. Some of the main changes introduced in SAP Connector 5.x are: - The `Create` operation is renamed to `Retrieve IDoc`. - The execute BAPI functions over qRFC, tRFC, and sRFC operations are merged into Synchronous Remote Function Call (sRFC) and Asynchronous Remote Function Call (aRFC) operations. - The `Disable function template cache` flag is renamed to `Disable JCo internal cache`, and applies to both functions and sources. The default value is `false`. - The sources now have `-listener` in their aliases instead of `source`. For example, the XML is changed from `sap:document-source` to `sap:document-listener`. - The SAP configuration has the following changes: - The SAP Inbound and SAP Outbound configurations are merged into the new SAP configuration. - The **Message Server** field is now in the **General** tab. The new configuration makes understanding what configuration to use in the connector more intuitive. These new features and enhancements may cause backward compatibility issues. ## Upgrade Steps Follow these steps to perform the upgrade: 1. In Anypoint Studio, create a Mule project. 2. In the **Mule Palette** view, click **Search in Exchange**. 3. In **Add Dependencies to Project**, enter `sap` in the search field. 4. In **Available modules**, select **SAP Connector - Mule 4** and click **Add**. 5. Click **Finish**. 6. Verify that the SAP Connector dependency version is 5.x.x in the `pom.xml` file in the Mule project, where `x.x` is the minor release and patch version number. For example, if you are upgrading to v5.2, the dependency version in the pom.xml file should be 5.2.0. Studio upgrades the connector automatically. ### Verify the Upgrade After you install the latest version of the connector, follow these steps to verify the upgrade: 1. In Studio, verify that there are no errors in the **Problems** or **Console** views. 2. Verify that there are no problems in the project `pom.xml` file. 3. Test the connection to verify that the operations work. ### Revert the Upgrade If it is necessary to revert to the previous version of SAP Connector, change the `sap-connector` dependency version in the project’s `pom.xml` file to the previous version. You must update the project’s `pom.xml` file in Anypoint Studio. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com)