Skip to main content
Version: 5.5

IDoc Trigger

The IDoc trigger is used when the OPC Router is to receive IDocs from the SAP system. The SAP system triggers the transfer via the IDoc trigger. The SAP-side configuration is only explained in broad terms. Please refer to the SAP documentation for more details.

The following properties can be configured:

SAP Trigger IDOC

"Settings" tab

PropertyDescription
SAP connectionSAP connection through which the relevant function is accessed.
IDoc typeIDoc type for which the trigger is activated when sent. Should be identical to the type set in the IDoc transfer object.
IDoc extensionClass extension of the IDocs
Program IDProgram ID used by the SAP system to call the destination, identical to the program ID of transaction SM59.
Gateway serviceGateway service of the SAP system
OutputSet this field if you want to receive output as JSON.

"Parameters" tab

PropertyDescription
Available parametersSelect the required parameters by checking the corresponding boxes. You can also select entire categories.
Copy JSON formatCopies a JSON document to the clipboard whose structure corresponds to the function call.
warning

Important: The program ID and function name must be written in UPPERCASE. The combination of host (SAP connection), gateway, and program ID must be unique. The program ID itself can be used multiple times from version 3.1.1.5 onwards – but only with different gateways/hosts.

warning

Important: If an IDoc is updated/changed in SAP, the trigger must also be adapted to the new IDoc.

Example

Settings for the IDoc trigger:

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

Logical system in SAP transaction BD54:

PropertyConfiguration
LogSystemOPCRIDOC01
DescriptionOPC router with IDoc listener

Corresponding SAP settings, SM59:

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

Port in SAP Transaction WE21:

PropertyConfiguration
(Type)Transactional RFC
Porte.g., IDOCPORT
Version(select appropriate IDoc version)
RFC destinationOPCROUTER

Partner agreement in WE20:

PropertyConfiguration
(Partner type)LS (logical system)
Partner numberOPCRIDOC01

Output parameters in WE20:

PropertyConfiguration
Receiver portIDOCPORT
Output modeTransfer IDoc immediately
IDoc type/base typePRODUCTIONORDER
Syntax check(activated)

For manual testing, an IDoc can be sent via WE19 by specifying the partner number and port. Start IDoc outbound processing immediately must be activated. Any errors can be viewed in WE07. The function to be called in SAP is called IDOC_INBOUND_ASYNCHRONOS (from 4.0) or INBOUND_IDOC_PROCESS (3.x).