String
SAP Connector Reference - Mule 4
SAP Connector Version 5.1
Anypoint Connector for SAP (SAP Connector) enables the integration of data to and from external systems based on SAP NetWeaver.
Starting with version 5.0, SAP Connector also supports connecting to an on-premise instance of SAP S/4HANA. |
Release Notes: SAP Connector Release Notes
Limitations
-
SNC is not supported for use in Mule apps that deploy SAP Connector in CloudHub and Anypoint Runtime Fabric.
-
Multiple applications with the same PROGRAM_ID, GATEWAY_SERVICE, and GATEWAY_HOST deployed on the same Mule runtime engine does not work because the JCoLibrary does not allow the creation of two servers connecting to instances that have the same PROGRAM_ID, GATEWAY_SERVICE, and GATEWAY_HOST. If you attempt to create two servers with the same PROGRAM_ID, GATEWAY_SERVICE, and GATEWAY_HOST, only one server is created.
Workarounds:-
Use two different Mule runtime engines.
-
Use the same PROGRAM_ID but with two different GATEWAY_HOSTs.
-
-
SAP Connector was not tested using a message server configuration connected to more than one application server. Therefore, this feature is not currently supported.
Configurations
Default Configuration
Default configuration for SAP extension outbound elements.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name |
The name for this configuration. Connectors reference the configuration with this name. |
x |
||
Connection |
The connection types to provide to 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. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate. |
|||
Encoding |
String |
Canonical name of the encoding. See Oracle’s supported encodings at |
||
Default Idocument Version |
String |
Default IDoc version. |
0 |
|
Disable Jco Internal Cache |
Boolean |
Flag that indicates whether to use the JCo internal cache. |
|
|
Evaluate Response Flag |
Boolean |
Flag that indicates if an error response should throw an exception or let the user handle it as another result. |
|
|
Log Trace Flag |
Boolean |
Flag that indicates whether to log the trace on the Mule server. |
|
|
Use SAP Format |
Boolean |
This parameter was added to support the Mule 3 format for returning SAP values. Used in the JCoToBusinessObjectParser class when parsing a JCoField.
|
|
Connection Types
Certificate
Connection provider that relies on an X509 certificate to authenticate the user.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
SAP system number |
String |
The two-digit system number (sysnr) of the SAP system. |
x |
|
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, then a random value is created. |
||
Login language |
String |
The 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 |
Use 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 |
The host of the SAP application server. |
||
Message server configuration |
The configuration for message server usage. |
|||
Enable RFC tracing on server |
Boolean |
Enable or disable RFC trace on the server. |
|
|
Enable CPIC tracing on server |
Enumeration, one of:
|
Enable/disable RFC trace on the server. |
||
Reconnection |
When an application is deployed, a connectivity test is performed on all connectors. If set to |
Simple Connection Provider
Connection provider that connects using a username and password.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
SAP system number |
String |
The two-digit system number (sysnr) of the SAP system. |
x |
|
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, then a random value is created. |
||
Login language |
String |
The 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 |
Use to pass in all the database server-specific connection parameters. |
||
Username |
String |
The username the connector uses to log in to SAP. |
x |
|
Password |
String |
The password associated with the login username. |
x |
|
Application server host |
String |
The host of the SAP application server. |
||
Message server configuration |
The configuration for message server usage. |
|||
Enable RFC tracing on server |
Boolean |
Enable or disable RFC trace on the server. |
|
|
Enable CPIC tracing on server |
Enumeration, one of:
|
Enable or disable RFC trace on the server. |
||
Reconnection |
When the application is deployed, a connectivity test is performed on all connectors. If set to |
Operations
Asynchronous Remote Function Call
<sap:async-rfc>
Executes a BAPIFunction over a queued Remote Function Call (qRFC). A queued RFC is an extension of a transactional RFC (tRFC) that ensures that individual steps are processed in sequence.
To guarantee that multiple Logical Unit of Work (LUWs) 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. Use qRFC to guarantee that several transactions are processed in a predefined order.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Function Name |
String |
The name of the function to execute |
x |
|
Content |
Binary |
The BAPIFunction to execute |
#[payload] |
|
Transaction Id |
String |
The ID that identifies an RFC so it 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. |
||
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Confirm Transaction
<sap:confirm-transaction-id>
Confirms a determined transaction.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Transaction ID (TID) |
String |
The ID of the transaction to confirm. |
x |
|
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Get Function
<sap:get-function>
Retrieves a BAPIFunction based on its name.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Function Name |
String |
The name of the function to retrieve |
x |
|
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Streaming Strategy |
|
Configure if repeatable streams should be used. |
||
Target Variable |
String |
The name of a variable to store the operation’s output. |
||
Target Value |
String |
An expression to evaluate against the operation’s output and store the expression outcome in the target variable. |
#[payload] |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Retrieve IDoc
<sap:retrieve-idoc>
Retrieves an IDoc structure based on its key.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
IDoc Name |
String |
The key that contains the required information to retrieve the IDocument. |
x |
|
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Streaming Strategy |
|
Configure if repeatable streams should be used. |
||
Target Variable |
String |
The name of a variable to store the operation’s output. |
||
Target Value |
String |
An expression to evaluate against the operation’s output and store the expression outcome in the target variable. |
#[payload] |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Send IDoc
<sap:send>
Sends an IDocument to SAP over an RFC. An RFC can be one of two types for IDocuments:
-
Transactional (tRFC): A tRFC is a special form of asynchronous Remote Function Call (aRFC). Transactional RFC 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 some network issue. The remote system need not be available at the time the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, together with the corresponding data, in the SAP database under a unique transaction ID (TID). tRFC is similar to aRFC in that 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 run every 60 seconds. tRFC is best used as an extension of asynchronous RFC secure communication between systems.
-
Queued (qRFC): A queued RFC is an extension of tRFC. It also 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.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
IDoc Name |
String |
The name of the iDocument to execute. |
x |
|
Content |
Binary |
The IDocument to execute. |
#[payload] |
|
Version |
String |
The version on the IDoc. |
||
Transaction Id |
String |
The ID that identifies an RFC so it 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. |
||
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Start SAP Transaction
<sap:create-transaction-id>
Creates a transaction ID to use as part of future calls.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Target Variable |
String |
The name of a variable to store the operation’s output. |
||
Target Value |
String |
An expression to evaluate against the operation’s output and store the expression outcome in the target variable. |
#[payload] |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Synchronous Remote Function Call
<sap:sync-rfc>
Executes a BAPIFunction over a synchronous remote function call (sRFC). A synchronous RFC 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 a SAP web application server and a SAP GUI.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Function Name |
String |
The name of the function to execute. |
x |
|
Content |
Binary |
The BAPIFunction to execute. |
#[payload] |
|
Transactional Action |
Enumeration, one of:
|
The type of joining action that operations can take regarding transactions. |
JOIN_IF_POSSIBLE |
|
Streaming Strategy |
|
Configure if repeatable streams should be used. |
||
Target Variable |
String |
The name of a variable to store the operation’s output. |
||
Target Value |
String |
An expression to evaluate against the operation’s output and store the expression outcome in the target variable. |
#[payload] |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Sources
Document Listener
<sap:document-listener>
Source that listens for incoming IDocs.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Gateway Host |
String |
Name of the host running the gateway server. |
x |
|
Gateway Service |
String |
Either the name or service port for the gateway service of the SAP system. |
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 |
The number of connections to register on the gateway. |
1 |
|
Idoc Type Filter Regex |
String |
Expression to filter by type, all incoming IDocs. |
||
Transactional Action |
Enumeration, one of:
|
The type of beginning action that sources can take regarding transactions. |
NONE |
|
Transaction Type |
Enumeration, one of:
|
The type of transaction to create. Availability depends on Mule version. |
LOCAL |
|
Primary Node Only |
Boolean |
Whether this source should only be executed on the primary node when running in a cluster. |
||
Streaming Strategy |
|
Configure if repeatable streams should be used. |
||
Redelivery Policy |
Defines a policy for processing the redelivery of the same message |
|||
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Function Listener
<sap:function-listener>
Source that listens for incoming BAPI functions.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Gateway Host |
String |
Name of the host running the gateway server. |
x |
|
Gateway Service |
String |
Either the name or service port for the gateway service of the SAP system. |
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 |
The number of connections to register on the gateway. |
1 |
|
Targeted Function |
String |
Filters the incoming BAPI functions by their name. The name of the function you want to receive. |
||
Transactional Action |
Enumeration, one of:
|
The type of beginning action that sources can take regarding transactions. |
NONE |
|
Transaction Type |
Enumeration, one of:
|
The type of transaction to create. Availability depends on Mule version. |
LOCAL |
|
Primary Node Only |
Boolean |
Whether this source should only be executed on the primary node when running in a cluster. |
||
Streaming Strategy |
|
Configure if repeatable streams should be used. |
||
Redelivery Policy |
Defines a policy for processing the redelivery of the same message. |
|||
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
|||
Response |
Binary |
#[payload] |
Types
Message Server
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Host |
String |
The host of the message server. |
x |
|
System Id |
String |
System ID of the SAP system. |
x |
|
Port |
Number |
The port with which the connector will log 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. |
Reconnection
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Fails Deployment |
Boolean |
When the application is deployed, a connectivity test is performed on all connectors. If set to |
||
Reconnection Strategy |
The reconnection strategy to use. |
Reconnect
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Frequency |
Number |
How often to reconnect (in milliseconds). |
||
Count |
Number |
The number of reconnection attempts to make. |
||
blocking |
Boolean |
If |
|
Reconnect Forever
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Frequency |
Number |
How often in milliseconds to reconnect. |
||
blocking |
Boolean |
If |
|
Expiration Policy
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
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:
|
A time unit that qualifies the maxIdleTime attribute. |
SAP Attributes
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Transaction Id |
String |
Transaction ID value. |
Repeatable In Memory Stream
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Initial Buffer Size |
Number |
The amount of memory to allocate to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to Buffer Size Increment, with an upper limit of Max Buffer Size. |
||
Buffer Size Increment |
Number |
This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. |
||
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:
|
The unit in which all these attributes are expressed. |
Repeatable File Store Stream
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
In Memory Size |
Number |
Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed content on the disk is buffered. |
||
Buffer Unit |
Enumeration, one of:
|
The unit in which maxInMemorySize is expressed. |
Redelivery Policy
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Max Redelivery Count |
Number |
The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message. |
||
Use Secure Hash |
Boolean |
Whether to use a secure hash algorithm to identify a redelivered message. |
||
Message Digest Algorithm |
String |
The secure hashing algorithm to use. If not set, the default is SHA-256. |
||
Id Expression |
String |
Defines one or more expressions to use to determine when a message has been redelivered. This property may only be set if useSecureHash is |
||
Object Store |
Object Store |
The object store where the redelivery counter for each message is stored. |