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 |
---|---|---|---|---|
Input | Document |
|
| Document containing key/value pairs. |
Output | Document |
|
| 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 |
---|---|---|---|---|
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* | 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 | 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
|
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 | 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 | 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 | Drop-down list | Select the Snaplex location on which to execute the child Pipeline. The available options are:
| 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. 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 | 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 | String | Enter the name of the JCo Server property; the name should start with jco.server. | N/A | jco.pool.maxconn |
Property Value | String | Enter the value for the JCo server property. | N/A | 15* |
Snap Execution | Drop-down list | Select one of the three modes in which the Snap executes:
| Validate & Execute | Execute 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.
Prerequisite: You 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.
Downloads
Important Steps to Successfully Reuse Pipelines
- Download and import the Pipeline into SnapLogic.
- Configure Snap accounts as applicable.
- Provide Pipeline parameters as applicable.
See Also
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.