Skip to main content
Version: 5.5

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:

RFC Trigger

PropertyDescription
SAP connectionSAP connection through which the relevant function is accessed.
Program IDProgram ID used to call the destination on the SAP system, corresponds to the program ID in transaction SM59.
Gateway service
  • RFC protocol: Gateway entry, e.g., sapgw00 (SAP Gateway 0)
  • Netweaver RFC protocol: Specification of the port

    • 3300 + ID for basic authentication
    • 4800 + ID for SNC authentication
FunctionFunction defined in the SAP system that triggers this trigger.
TimeoutTime period after which the router sends a timeout message to the SAP system if the task continues.
OutputSet 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 formatCopies 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.

Attention

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.

Attention

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

NameDescription
TRANSFER_OK
  • 1 = OK: Successful transfer of the connection
  • 2 = Aborted: The transfer was aborted by a transfer object, e.g., if a table for a database transfer object did not contain any data.
  • 3 = Error: An error occurred during the transfer. The request must be sent again later and must not be marked as completed by the connected system.
warning

Important: The program ID and function name must be written in CAPITAL LETTERS. The SAP-side call is:

Call function &#x27;&#x27;<funktionsname> destination &#x27;<sap-destination>&#x27;.

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:

PropertyConfiguration
SAP connection<sap-anbindung>, through which the relevant function is accessed.
Program IDINRAYTRIGGER
Gateway serviceGateway service of the SAP system, e.g., 3302
FunctionTRIGGERFUNKTION

Corresponding SAP settings, SM59:

The program ID INRAYTRIGGER was created in SAP transaction SM59.

PropertyConfiguration
DestinationOPCROUTER
Connection typeT TCP/IP
Activation typeRegistered server program
Program IDINRAYTRIGGER
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 &#x27;TRIGGERFUNKTION&#x27; destination &#x27;OPCROUTER&#x27;.
```</sap-anbindung></sap-destination>