String
SAP Connector 5.2 Reference - Mule 4
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-premises instance of SAP S/4HANA. |
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 |
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. |
||
IDoc Render Options |
IDoc rendering options |
|||
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 |
|
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 |
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 |
|
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 |
A retry strategy in case of connectivity errors. |
|||
Response |
Binary |
#[payload] |
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. |
||
IDoc Parsing Options |
IDoc parsing options |
|||
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 |
|
Configures how Mule processes streams. Repeatable streams are the default behavior. |
||
Target Variable |
String |
Name of the variable in which to store the operation’s output |
||
Target Value |
String |
Expression that evaluates the operation’s output. The expression outcome is stored 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 |
|
Configures how Mule processes streams. Repeatable streams are the default behavior. |
||
Target Variable |
String |
Name of the variable in which to store the operation’s output |
||
Target Value |
String |
Expression that evaluates the operation’s output. The expression outcome is stored 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. |
||
IDoc Parsing Options |
||||
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 |
Name of the variable in which to store the operation’s output |
||
Target Value |
String |
Expression that evaluates the operation’s output. The expression outcome is stored 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 an SAP web application server and an 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 |
|
Configures how Mule processes streams. Repeatable streams are the default behavior. |
||
Target Variable |
String |
Name of the variable in which to store the operation’s output |
||
Target Value |
String |
Expression that evaluates the operation’s output. The expression outcome is stored in the target variable. |
#[payload] |
|
Reconnection Strategy |
A retry strategy in case of connectivity errors. |
Types
Message Server
A message server can be configured with multiple gateways and can be passed to the Document Listener source to distribute the load and improve performance.
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. |
Reconnect Forever
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Frequency |
Number |
How often in milliseconds to reconnect. |
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. |
IDoc Render Parameter Group
IDoc rendering options
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
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 |
false |
|
Render IDoc With CR |
Boolean |
Indicates whether to insert |
false |
|
Render IDoc With CRLF |
Boolean |
Indicates whether to insert |
false |
|
Render IDoc With LF |
Boolean |
Indicates whether to insert |
false |
|
Render IDoc With Tabs And CR |
Boolean |
Indicates whether to insert |
false |
|
Render IDoc With Tabs And CRLF |
Boolean |
Indicates whether to insert |
false |
|
Render IDoc With Tabs And LF |
Boolean |
Indicates whether to insert |
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 |
Repeatable In Memory Stream
When streaming in this mode, Mule never uses the disk to buffer the contents. If you exceed the buffer size, the message fails.
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
File store repeatable streams require buffering, and there are different buffering strategies. Mule keeps a portion of contents in memory. If the stream contents are larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.
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. |
IDoc Parse Parameter Group
IDoc parsing options
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
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.
|
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 |