RFC Trigger
Connected SAP systems can trigger data transfers using the RFC trigger. A corresponding entry must be made in transaction SM59 on the SAP side.
The following properties can be configured:

| Property | Description |
|---|---|
| SAP connection | SAP connection through which the relevant function is accessed. |
| Program ID | Program ID used to call the destination on the SAP system, corresponds to the program ID in transaction SM59. |
| Gateway service |
|
| Function | Function defined in the SAP system that triggers this trigger. |
| Timeout | Time period after which the router sends a timeout message to the SAP system if the task continues. |
| Output | Set this field if you want to receive output as JSON. |
| Input (grid) | The rows of this grid are trigger inputs. |
| Output (grid) | The rows of this grid are trigger outputs. |
| Tables (grid) | The rows of this grid are used as both output and input. |
| Copy JSON format | Copies a JSON document to the clipboard whose structure corresponds to the function call. |
The expected length for sent and received CHAR and NUM fields must be configured using the edit button. The default length is set to 0. If you have not changed the length for a parameter, you will receive a message about this when you close the dialog.
Calling a non-existent function module will result in the server being deregistered in the SAP Gateway. The registration can no longer be used and must be performed again, which is reflected in ERP-Connect by restarting the server.
There is no way to delete functions that have been made known to the NW Library. This applies to the entire process, across all SAP systems and RFC servers. This means that you can no longer change the name and type of the import/export/tables parameters of a function module that is called via RFC server and identified by its function module name, nor can you change the existence of the module itself. Do not make any changes while the OPC Router service is running. If you change anything, it must always be published in its entirety.
Return Parameters
| Name | Description |
|---|---|
| TRANSFER_OK |
|
Important: The program ID and function name must be written in CAPITAL LETTERS. The SAP-side call is:
Call function ''<funktionsname> destination '<sap-destination>'.
The combination of host (SAP connection), gateway, and program ID must be unique. The program ID itself can be used multiple times, but only with different gateways/hosts.
With the RFC trigger, you also have the option of creating ITAB or STRUCTURE as parameters. Create the inputs and outputs accordingly by selecting the respective type, assigning a name, and using Edit to access the editor for the individual fields. Nesting is not possible.
Example
Settings on the RFC trigger:
| Property | Configuration |
|---|---|
| SAP connection | <sap-anbindung>, through which the relevant function is accessed. |
| Program ID | INRAYTRIGGER |
| Gateway service | Gateway service of the SAP system, e.g., 3302 |
| Function | TRIGGERFUNKTION |
Corresponding SAP settings, SM59:
The program ID INRAYTRIGGER was created in SAP transaction SM59.
| Property | Configuration |
|---|---|
| Destination | OPCROUTER |
| Connection type | T TCP/IP |
| Activation type | Registered server program |
| Program ID | INRAYTRIGGER |
| Gateway host | (no entry!) |
| Gateway service | (no entry!) |
The synchronous function call within a program, function module, dialog, etc. within SAP actively triggers the data transfer from the SAP system:
Call function 'TRIGGERFUNKTION' destination 'OPCROUTER'.
```</sap-anbindung></sap-destination>