RFC trigger
With RFC trigger, SAP systems can trigger data transfers. Within SAP system, in transaction SM59 the corresponding entry has to be made.
Properties are:
SAP access data | Set of SAP access data. |
Program ID | Program ID used by SAP system to call destination, identical with program ID of transaction SM59. |
Gateway Service |
|
Function | Function defined within SAP system that triggers this connection. |
Timeout | Time span after which OPC Router will send time-out to SAP system if task has not been finished |
Output | Set 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 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 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.
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.
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 |
|
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 ID | INRAYTRIGGER |
Gateway Service | Gateway Service of SAP system, e. g. 3302 |
Function | TRIGGERFUNCTION |
Corresponding SAP properties, SM59:
Destination | OPCROUTER |
Connection Type | T TCP/IP |
Activation Type | Registered Server Program |
Program ID | INRAYTRIGGER |
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‘.