SAP RFC Listener

In this article

Overview

You can use the SAP RFC Listener Snap to facilitate Remote Function Calls (RFCs) between two SAP systems. This Snap simulates an RFC server: it listens to incoming RFC calls infinitely, and either generates output documents from the import parameters, or triggers a child Pipeline. The RFC mechanism enables business applications to communicate and exchange information (in predefined) formats with other systems.

Prerequisites

  • A function module in the SAP application.
  • A server registered on the SAP gateway service.
  • SAP gateway service with an entry to the service file.
  • A valid SAP JCo account with the required permissions.

Support for Ultra Pipelines

Works in Ultra Pipelines 

Limitations and Known Issues

None.

Snap Views

TypeFormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document



  • Min:0
  • Max:0
  • Mapper Snap
  • Copy Snap
Document containing key/value pairs.
Output

Document


  • Min:0
  • Max:1
  • File Writer Snap

Document with return parameter values.

ErrorIf the Snap fails during the operation, it sends an error document containing the error, reason, resolution, and stacktrace to the Error view. However, for this to happen, the error view must be enabled. Learn more about Configuring Error Views and Handling Errors with an Error Pipeline.

Snap Settings

Parameter NameData TypeDescriptionDefault ValueExample 
Label*String
Specify the name for the Snap. You can modify the default name to be more specific and meaningful, especially if you have more than one of the same Snaps in your Pipeline.
N/ARFC Listener
RFC Function Name*String/ExpressionSpecify the name of the remote function corresponding to the RFC function on the SAP application.N/AX_SNAP_REMOTE_CALL

Gateway Properties

Use this field set to specify the gateway properties. These fields define the gateway location from where the Snap is listening. SAP uses the gateway mechanism to register and manage RFC servers. This field set contains the following fields:

  • Gateway Host
  • Gateway Service
  • Program ID
  • Connection Count
  • Max startup delay
Gateway Host*String/ExpressionSpecify the host name of the SAP gateway service.N/Asap.cloud.com
Gateway Service*String/ExpressionSpecify the SAP gateway service in this format: sapgwNN, where NN represents integer values.N/Asapgw02
Program ID*String/ExpressionSpecify the program ID of the server that is configured at the RFC destination. This ID is used to identify the RFC server that the gateway uses to register the server.N/ASnaplogic
Connection Count*String/ExpressionSpecify the count of the registered connections that are managed by the server instance.24
Max startup delay*String/Expression

Specify the maximum number of seconds to wait between two successive server reconnect attempts.

If a timeout occurs while waiting for the status, the Snap displays a SnapExecutionException message.

2300
Datetime Parameter As TextCheckboxSelect this check box to import parameters with Date or Time data type, and to pass these parameters as a string.DeselectedSelected
Date conversion formatString/Expression

Specify the conversion format for the date data type.

If a field is a string and if the Business Application Programming Interface (BAPI) requires date or datetime data type, this Snap uses the yyyyMMdd format to convert the field value.

N/A20210309
Export Parameters

Use this field set to specify the values to be returned as export parameters to the RFC function. Click  to add a new row in this table for defining export parameters. This field set contains the following fields:

  • Export Parameter Name
  • Export Parameter Value
Export Parameter NameString/Expression/Suggestion

Specify the export parameter name. Alternatively, click the Suggestion  icon to fetch the list of parameters associated with the RFC function, and select a parameter. 

N/AResponse
Export Parameter ValueString/ExpressionSpecify the return value for the defined parameter. You can enter a static value or a dynamic value using an expression, or you can enter specific columns, such as $key from the output document.N/A

123

$key

Execution ModeDrop-down list

Select an option from this list to determine how this Snap should handle the SAP function module. The available options are:

  • Pass Through Parameters: The Snap passes the import parameters from the function request to the downstream Snap.
  • Trigger Child Pipeline: The Snap triggers the child Pipelines to handle the incoming function request.
Pass Through ParametersTrigger Child Pipeline
PipelineString/Expression/Suggestion

Activates when you select Trigger Child Pipeline in the Execution Mode field.

Specify the name of the Pipeline to be executed. Upon execution, this Snap uses the import parameters to trigger the Child Pipeline and passes the output to the SAP server.

N/ARFC Pipeline
Import Parameter Mapping

Activates when you specify or select a Pipeline in the Pipeline field.

Use this field set to define the mappings between the RFC import parameters and the Pipeline parameters that are defined in the child Pipeline. This field set contains the following fields:

  • Function Parameter Name
  • Pipeline Parameter Name
Function Parameter NameString/Expression/Suggestion

Specify the import parameter that is defined in the RFC function. Alternatively, click the Suggestion  icon to fetch the list of parameters associated with the RFC function, and select a parameter. 

N/AQuantity
Pipeline Parameter NameString/Expression/Suggestion

Specify the destination parameters for the Pipeline selected in the Pipeline field. Alternatively, click the Suggestion  icon to fetch the list of parameters associated with the child Pipeline, and select a parameter.

N/AExport_Date
Child Pipeline Properties

Use this field set to define the properties for the child Pipeline. The field set contains the following fields:

  • Execute On
  • Snaplex Path
  • Reuse executions to process documents
  • Pool Size
  • Timeout
  • Retry Limit
  • Retry Interval
Execute OnDrop-down list

Select the Snaplex location on which to execute the child Pipeline. The available options are:

  • SNAPLEX_WITH_PATH: Runs the child Pipeline on the specified Snaplex. 
  • LOCAL_NODE: Runs the child Pipeline on the same node as that of the parent Pipeline.
  • LOCAL_SNAPLEX: Runs the child Pipeline on one of the available nodes in the same Snaplex as that of the parent Pipeline.
SNAPLEX_WITH_PATHgroundplex4-West
Snaplex PathString/ExpressionSpecify the path to the Snaplex that should be used to execute the child Pipeline. Leave the field empty if you want to execute the child on the same node as that of the parent Pipeline.N/Auserplex-1
Reuse executions to process functionCheckbox

Select this check box to allow execution of a child Pipeline, and to pass multiple inputs to the Pipeline.

Reusable executions continue to run until all the incoming function requests in the Snap are fully processed. 

When you select this check box, you cannot change parameter values from one Pipeline invocation to the next Pipeline.

When you enable this option and the Pipeline parameters use expressions, the expressions are evaluated using the first function. The parameter value in the child Pipeline does not change across functions.

If you do not select this option, a new Pipeline execution is created for each incoming function.  

DeselectedSelected
Pool SizeInteger/Expression

Specify the number of child Pipelines that can exist in the pool at the same time.
Each child Pipeline is triggered by an RFC request. The number of concurrent RFC requests the Snap allows is specified in the Connection Count field. If the RFC requests come in a sequential manner, the child Pipelines would run one at a time irrespective of how large the Pool size is.

When you select Reuse executions to process documents, the Snap starts a new execution only if all executions are processing documents or binary data, or if the total number of executions is less than the Pool Size value.

14
TimeoutInteger/Expression

Specify the maximum number of seconds for which the Snap must wait for the child Pipeline to complete the runtime. 

If the child Pipeline does not complete the runtime before the timeout, the execution process stops and is marked as failed.

N/A10
Retry LimitInteger/Expression

Specify the maximum number of connection retry attempts in case of a connection failure in the child Pipeline execution.

A retry happens only when the previous attempt resulted in an error. If the retry attempts exceed the configured value, the Pipeline execution fails, and an error message is displayed.

N/A10
Retry IntervalInteger/ExpressionSpecify the number of seconds to wait before retrying after a failure in the execution of the child Pipeline.N/A10
Advanced JCo Server Properties

Use this field set to define JCo properties for SAP Secure Network Communications (SNC) authentication. Click   to define the JCo properties. You can specify only one JCo parameter in each row. The field set contains the following fields:

  • Property Name
  • Property Value

Property Name
String

Enter the name of the JCo Server property; the name should start with jco.server.

N/Ajco.pool.maxconn
Property ValueString

Enter the value for the JCo server property.

N/A15*
Snap ExecutionDrop-down list

Select one of the three modes in which the Snap executes:

  • Validate & Execute. Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only. Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all the Snaps that are downstream from it.

Validate & ExecuteExecute only

Examples


Example 1: Passing Input Parameters to Send Messages to the Pipeline

This simple example of a stand-alone SAP RFC Pipeline demonstrates how you can use the SAP RFC Listener Snap to pass input parameters and to listen to the input stream.

PrerequisiteYou must register the destination Snap on the RFC gateway server.

First, we configure the SAP RFC Listener Snap to pass the Export Parameters. 

Upon validation, the Z_SNAP_REMOTE_TBL_PARAM function is executed at the remote destination through the gateway service. You can pass this output document to the downstream Snaps to trigger more Pipelines.

Example 2: Calling a Child Pipeline through Nested Parameters

This example Pipeline demonstrates how to call a child Pipeline from the SAP RFC Listener Snap using Pipeline parameters.

Prerequisite:

You must create a function module Advanced Business Application Program (ABAP) in the SAP application.

In this example, we have used an ABAP program with two parameters, input and export. The input parameters are of String and Date data type. This function module acts as an interface between the SAP application and the SnapLogic platform.

Parent Pipeline

First, we configure the SAP RFC Listener Snap to perform the following tasks:

  • Listen to the snaplogic Program ID that is under SNAP1 destination.
  • Call the child Pipeline RFC Calee pipeline - nested data.
  • Extract the OUT_STRUCT key value from the output documents of the child Pipeline and pass this value as a response to the SAP application.

We configure the SAP RFC Listener Snap as shown below:

The output of the SAP RFC Listener Snap contains the key outstructure, which reflects the logical key of the business object in the ABAP object program.


Child Pipeline

Next, we configure the child Pipeline with two Mapper Snaps. In the first Mapper Snap, we configure the Mapping table with Date.now() expressions for Bill date and Load date to display the current dates in the output.

In the second Mapper Snap, we configure the Snap to transform in structure to out structure.

The output of this Pipeline is an OUT_STRUCT key that represents the customized structure.

Finally, we validate and execute the parent Pipeline, which triggers the child Pipeline using the nested parameters. During the execution process, the ABAP in the SAP application is called, and the RFC Listener Snap processes the document and passes the output to the SAP application.

Download this Pipeline

Downloads

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.


 Click to view/expand
Release Snap Pack VersionDateType  Updates
November 2024main29029 StableUpdated and certified against the current SnapLogic Platform release.
August 2024438patches28277 Latest

Fixed the SAP IDoc Listener and SAP IDoc Document Listener Snaps as below:

  • The Snaps now interrupt the Snap thread if the JCo server stops.

  • If you attempt to open and modify the Ultra pipeline with the SAP iDoc Listener Snaps in the Designer, the pipeline restarts (the existing Ultra pipeline stops).

August 2024438patches27908 Latest

Fixed an issue with SAP IDoc Listener and SAP IDoc Document Listener Snaps that displayed a Null Pointer Exception if you select the Route errors checkbox (which routes the error to the error view) in the Snaps.

August 2024main27765 Stable

Upgraded the following libraries for the SAP Snap Pack. Learn more about the library upgrade.

  • JCo from 3.1.4 to 3.1.10

  • IDoc from 3.1.1 to 3.1.3

Refer to the Known Issue caused by this upgrade and follow the steps from the workaround to mitigate any pipeline failures.

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024main25112 StableUpdated and certified against the current SnapLogic Platform release.
November 2023435patches24068 Latest
  • Enhanced the SAP IDoc Listener and SAP IDoc Document Listener Snaps with a new Halt on SAP error checkbox for better error-handling capability. Select this checkbox to enable the listener to interrupt and halt processing in case of an error from SAP.

  • Removed the unnecessary spring-core dependency from the SAP Snap Pack.

November 2023main23721 StableUpdated and certified against the current SnapLogic Platform release.
August 2023main22460 StableUpdated and certified against the current SnapLogic Platform release.
May 2023

433patches22386

 Latest

Fixed an issue with the SnapLogic SAP Accounts that caused issues when connection pools were exhausted. The minimum value allowed for the Connection pool capacity is now 0 so you can disable the connection pooling.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main19844 StableUpgraded with the latest SnapLogic Platform release.
November 2022431patches19026 Latest

The SAP IDoc Listener Snap now handles the data event from the SAP instance as expected.

November 2022main18944 StableUpgraded with the latest SnapLogic Platform release.
October 2022430patches18854 Latest

The SAP IDoc Read and SAP IDoc Write Snaps do not display the error messages when the IDoc Read BAPI Name field is empty or wrong as a default value IDOC_READ_COMPLETELY is now assigned to the empty field, otherwise, the Snap considers the specified name.

4.30 Patch430patches17344

 

Latest

The SAP Execute Snap is now equipped to send the actual content of the incoming byte arrays (in binary types like XString) instead of their transformed String values.

August 2022main17386 StableUpgraded with the latest SnapLogic Platform release.
4.29 Patch429patches16637 Latest
  • Fixed an issue with the SAP IDoc Write Snap where the Snap wrote the same TID, Document_number, and so on for the different output documents though the I_DOCNUM array contained all the document numbers that are returned from SAP table. Now, the Snap writes different TID, Document_number for different output documents along with the I_DOCNUM array that contains all the document numbers.
  • Fixed an issue with SAP Execute and SAP IDoc Write Snaps where the output preview did not include the original document.
4.29 Patch

429patches16113

 Latest

Fixed an issue with SAP Execute Snap where the Snap incorrectly handled connection exceptions for 104-JCO_ERROR_SYSTEM_FAILURE. Previously, the Snap captured only the output document without the error. Now, the Snap correctly captures both the output and error.

4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.28main14627 Stable
  • Upgraded the Java Native Library used by the SAP Java Connector (JCo) to version 3.1.

    Breaking change for Pipelines containing Snaps from the SAP Snap Pack with Java Native Library

    This upgrade may cause your existing Pipelines to break if they contain Snaps from the SAP Snap Pack. You must manually upgrade your SAP Java Connector (JCo) Native Library to version 3.1.4 for these Pipelines to run successfully. See SAP Configurations for more information.

4.27 Patch427patches13992 Latest
  • Enhanced the SAP Execute Snap to support nested tables or structure data in the import parameters.
  • Upgraded the Java Native Library used by the SAP Java Connector (JCo) to 3.1.4 version.

4.27 Patch427patches12999 Latest

Enhanced SAP RFC ListenerSAP IDoc Listener and SAP IDoc Document Listener Snaps with a new field set Advanced JCo Server Properties that allows you to configure Java Connector (JCo) server-related attributes.

4.27

main12833

 

Stable

Upgraded with the latest SnapLogic Platform release.
4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25 Patch425patches10571 Latest

Renamed the RFC Listener Snap as SAP RFC Listener Snap. 

4.25main9554
 
Stable

Introduced the SAP RFC Listener Snap that facilitates Remote Function Calls (RFCs) between two SAP systems. The Snap simulates an RFC server and listens to the incoming RFC calls infinitely. Subsequently, the Snap generates output documents either from the import parameters or triggers a child Pipeline. Business applications can use the RFC mechanism to communicate and exchange information (in predefined formats) with other systems.

4.24main8556
StableUpgraded with the latest SnapLogic Platform release.
4.23main7430
 
StableUpgraded with the latest SnapLogic Platform release.
4.22 Patch 422patches7378 Latest

Enhances the SAP Execute Snap to process the structure that contains nested Table Type fields in the output document by recursively parsing them into a Map or a List set.

4.22 Patch 422patches6796 Latest

Fixes the JCO_ERROR_REQUEST_CANCELLED (connection is closed) error in SAP Execute Snap that occurs even when the session is active after 10 minutes.


4.22 Patch 422patches6601 Latest

Enhances SAP Execute and SAP IDoc Write Snaps by introducing the following fields:

  • Reload Function Metadata: To get latest schema.
  • Reload Metadata and Validate: Allows clearing the JCo Metadata cache on the plex node before each validation.
4.22 Patch 422patches6597 Latest

Enhances the SAP Execute Snap by introducing the following two fields:

  • Commit Timeout (sec): Creates a session to call BAPI and commit.
  • Session ID: Identifies specific sessions for all the Snaps that are in a stateful call sequence.
4.22main6403
 
Stable
  • Enhances the Snap Pack to support SNC-based authentication in SAP Accounts and the execution of BAPI call sequences in a Pipeline.
    • The SAP Accounts, SAP JCo Account and SAP Load Balanced JCo Account, can be used to extend connection security with an additional layer of Secure Network Communications (SNC) configuration by passing advanced JCo parameters.
    • Updates the SAP Execute Snap with the ability to execute a sequence of BAPI calls within the same Pipeline and session. Sequence implies that the output from a BAPI call is needed for the next BAPI call to run.
4.21snapsmrc542

 

Stable

Enhances the SAP Execute Snap to add a new field, Output date time as Text, which enables you to output date and time as a String data type instead of a DateTime object.

4.20 Patchsap8811 Latest

Updates the SAP IDoc Write Snap with the following:

  • Fixes the stack overflow error that occurs while retrying to write the IDoc to the SAP server. 
  • Adds inbound success codes to the default value which otherwise only indicates the IDoc being created.
  • Enhances the error messages for a better user experience.
4.20snapsmrc535
 
StableUpgraded with the latest SnapLogic Platform release.
4.19snaprsmrc528
 
StableUpgraded with the latest SnapLogic Platform release.
4.18snapsmrc523
 
StableUpgraded with the latest SnapLogic Platform release.
4.17ALL7402
 
Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17snapsmrc515
 
Latest

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16snapsmrc508
 
StableUpgraded with the latest SnapLogic Platform release.
4.15snapsmrc500
 
StableUpgraded with the latest SnapLogic Platform release.
4.14snapsmrc490
 
StableUpgraded with the latest SnapLogic Platform release.
4.13

snapsmrc486

 
StableUpgraded with the latest SnapLogic Platform release.
4.12

snapsmrc480

 
Stable
  • Added the retry connection and error routing mechanism to the SAP Execute, SAP iDOC Read, SAP iDOC Write, SAP iDOC Document Listener and SAP iDOC Listener Snaps.
  • Updated the SAP Account with Enable trace property to analyse the connection related errors.
4.11 Patch sap4514 Latest

Addressed an issue with the SAP iDoc Listener and iDoc Document Listener Snaps where the pipeline takes a longer time to stop while performing a manual trigger. 

4.11 Patch sap4342 Latest
  • SAP IDoc Write Snap now supports IDoc Extension type.
  • SAP Self-service/on-demand ability to clear IDoc metadata cache.
4.11snapsmrc465
 
StableUpgraded with the latest SnapLogic Platform release.
4.10

snapsmrc414

 
Stable

Added SAP account to connect to a message server, SAP Load Balanced JCo Account.

4.9 Patch sap3246 Latest
  • Added SAP account to connect to MSHOST (JCo Load Balanced account).
  • Addressed an issue with SAP BAPI call appending duplicate fields to object
  • SAP Execute: Support for "table-type" fields added
  • Addressed an issue in SAP Execute: Changing parameter metadata not imported
4.9 Patch sap3233 Latest

Addressed an issue with SAP Execute failing to call BAPI with integer request parameter

4.9snapsmrc405
 
Stable

Introduced the SAP IDoc Document Listener Snap in this release.

4.8

snapsmrc398

 
Stable

Info tab added to accounts.

4.7

snapsmrc382

 
StableUpgraded with the latest SnapLogic Platform release.
4.6snapsmrc362
 
StableUpgraded with the latest SnapLogic Platform release.
4.5.1

snapsmrc344

 
StableUpgraded with the latest SnapLogic Platform release.


See Also