Skip to main content
Version: 5.4

IDoc trigger

The IDoc trigger will be used if the OPC Router should receive an IDoc from the SAP system. SAP system will trigger the transfer through this object. SAP configuration is described as overview. Please consult you SAP manual.

Properties are:

SAP access dataSet of SAP access data.
SAP access dataSAP connection via which the relevant function is accessed.
IDoc typeType of IDoc the Trigger listens. Must be the same as in corresponding transfer object.
IDoc EnhancementClass extension of the IDocs.
Program IDProgram ID used by SAP system to call destination, identical with program ID of transaction SM59.
Gateway ServiceGateway Service of SAP system
OutputSet this field if you want to receive an output as JSON.
warning

Important: Program ID and function have to be written in CAPITALS. The combination of host, gateway and program ID has to be unique. From version 3.1.1.5 you can use the program ID several times provided gateway-service and/or hosts differ.

warning

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

Example

IDoc Trigger Settings:

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

Logical System within SAP transaction BD54:

LogSystemOPCRIDOC01
DescriptionOPC Router with IDoc listener

Corresponding SAP Settings, SM59:

DestinationOPCROUTER
Connection TypeT TCP/IP
Activation TypeRegistered Server Program
Program IDINRAYTRIGGER
Gateway host(no entry!)
Gateway service(no entry!)

Communication Port in transaction WE21:

(Type)Transactional RFC
Porte.g. IDOCPORT
Version(select appropriated IDoc version)
RFC destinationOPCROUTER

Partner profile in transaction WE20

(Partner type)LS (Logical System)
Partner no.OPCRIDOC01

Outbound parameters in WE20:

Receiver PortIDOCPORT
Outpout modeTransfer IDoc immed.
IDoc Type/Basic typePROCESSORDER
Cancel processing after syntax error(activated)

For testing, via WE19 an IDoc can be send manually providing partner no. and Port. Errors might be found in WE07. Function to call is IDOC_INBOUND_ASYNCHRONOS (as of 4.0), resp. INBOUND_IDOC_PROCESS (before 3.x).