SAP RFC Listener

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

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

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.

Error

If 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 Name

Data Type

Description

Default Value

Example 

Parameter Name

Data Type

Description

Default Value

Example 

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/A

RFC Listener

RFC Function Name*

String/Expression

Specify the name of the remote function corresponding to the RFC function on the SAP application.

N/A

X_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/Expression

Specify the host name of the SAP gateway service.

N/A

sap.cloud.com

Gateway Service*

String/Expression

Specify the SAP gateway service in this format: sapgwNN, where NN represents integer values.

N/A

sapgw02

Program ID*

String/Expression

Specify 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/A

Snaplogic

Connection Count*

String/Expression

Specify the count of the registered connections that are managed by the server instance.

2

4

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.

2

300

Datetime Parameter As Text

Checkbox

Select this check box to import parameters with Date or Time data type, and to pass these parameters as a string.

Deselected

Selected

Date conversion format

String/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/A

20210309

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 Name

String/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/A

Response

Export Parameter Value

String/Expression

Specify 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 Mode

Drop-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 Parameters

Trigger Child Pipeline

Pipeline

String/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/A

RFC 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 Name

String/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/A

Quantity

Pipeline Parameter Name

String/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/A

Export_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 On

Drop-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_PATH

groundplex4-West

Snaplex Path

String/Expression

Specify 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/A

userplex-1

Reuse executions to process function

Checkbox

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. 

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

Deselected

Selected

Pool Size

Integer/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.

1

4

Timeout

Integer/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/A

10

Retry Limit

Integer/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/A

10

Retry Interval

Integer/Expression

Specify the number of seconds to wait before retrying after a failure in the execution of the child Pipeline.

N/A

10

Advanced JCo Server Properties

Property Name

String

N/A

jco.pool.maxconn

Property Value

String

N/A

15*

Snap Execution

Drop-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 & Execute

Execute only