Skip to main content
Version: 5.4

RFC trigger

With RFC trigger, SAP systems can trigger data transfers. Within SAP system, in transaction SM59 the corresponding entry has to be made.

RFC-Trigger

Properties are:

SAP access dataSet of SAP access data.
Program IDProgram ID used by SAP system to call destination, identical with program ID of transaction SM59.
Gateway Service
  • RFC protocol: Enter the gateway, 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 within SAP system that triggers this connection.
TimeoutTime span after which OPC Router will send time-out to SAP system if task has not been finished
OutputSet this field if you want to receive an 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 lines 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 via the Edit button. The default length is 0. If you have not changed the length of a parameter, you get information about it when you close the dialog.

warning

Attention: The call of a non-existing function module forcibly leads to the deregistration of the server in the SAP Gateway. The registration can no longer be used and must be performed again, which manifests itself in ERP-Connect by a server restart.

warning

Attention: There is no way to delete functions once they have been made known to the NW Library. This applies to the entire process, across all SAP systems and RFC servers. So you cannot change the name and type of the Import/Export/Tables parameters of a function block that is called by RFC server and identified by its function block name, nor the existence of the block itself. Do not make any changes while the OPC Router service is running. So if you change something it must always be published completely.

return parameters

TRANSFER_OK
  • 1 = OK: Successful transfer of the connection
  • 2 = Aborted: The transfer was aborted from a type transfer object, for example, if no data was contained in a table for a database transfer object. 3 = Error: An error occurred during the execution of the transfer. The request must be resent later and must not be marked as closed by the connected system.
  • 3 = Error: An error occurred during the execution of the transfer. The request must be sent again later and must not be marked as completed by the connected system.
warning

Important: Program ID and function have to be written in CAPITALS. SAP call is set:

Call function ’<FUNCTION\>‘ destination ’<SAP-DESTINATION\>‘.

The combination of host, gateway and program ID has to be unique. The program ID itself can be used multiple times - but only with different gateways / hosts.

You can also use the RFC trigger to create ITAB or STRUCTURE as parameters. Create the inputs and outputs accordingly by selecting the respective type, assigning a name, and choosing Edit to access the editor for the individual fields. Nesting is not possible.

Example

RFC-Trigger Properties:

SAP access data<SAP access data>
Program IDINRAYTRIGGER
Gateway ServiceGateway Service of SAP system, e. g. 3302
FunctionTRIGGERFUNCTION

Corresponding SAP properties, SM59:

DestinationOPCROUTER
Connection TypeT TCP/IP
Activation TypeRegistered Server Program
Program IDINRAYTRIGGER
Gateway-Host(no entry!)
Gateway-Service(no entry!)

By calling this function from within SAP system, SAP system will trigger OPC Router:

Call function ’TRIGGERFUNCTION‘ destination ’OPCROUTER‘.