Show TOC

Procedure documentationOutbound: Triggering the Receiving System

Prerequisites

You require the program rfcexec from the RFC library.

Procedure

  1. To create a logical destination for RFC, choose Start of the navigation path Tools Next navigation step Administration Next navigation step Administration Next navigation step Network Next navigation step RFC Destinations End of the navigation path (SM59). Place the cursor on TCP/IP Connections and choose Start of the navigation path Edit Next navigation step Create End of the navigation path.

  2. Enter the name of the RFC destination (e.g. EDI) and the connection type t (start an external program via TCP/IP). Enter a description of the RFC destination. Confirm your entries.

  3. Working without registration:

    Choose Explicit host or Application server. Specify the program rfcexec (rfcexec.exe for Windows NT) with the directory (for example, /usr/sap/<SID>/SYS/exe/dbg/rfcexec). If you have chosen Explicit host, enter the target machine on which rfcexec is to be addressed (for example marvin).

    Working with registration:

    Register your program here in the gateway using a freely definable name. Then you can use this ID to call the program with this exact name from the distributed systems. Select registration and enter a name under Program ID. Choose Start of the navigation path Destination Next navigation step Gateway Options End of the navigation path and specify the gateway host and gateway service. You determine these two parameters, for example, with report RSPARAM (see also Inbound: Triggering the SAP System).

  4. Save your entries. Test your destination using Test Connections.

    The connection will only work in registration mode if you have started the program before in the operating system with the same name in the corresponding gateway. The command line for the gateway service sapgw00 on the gateway host arthur is as follows: rfcexec -a Heribert -g arthur -x sapgw00, if the program is to be registered under the name "Heribert".

Result

The logical destination specifies the machine on which the rfcexec program is to be started. rfcexec calls the command file on the same computer. Store the name of this command file, as well as the directory and name of the IDocs to be transferred, in the port definition.

Once you have maintained the port definition and have selected Start Subsystem in the corresponding partner profiles, the process with triggering appears as follows (see the graphic below):

  1. Outbound IDocs are generated in the SAP System and written to a file.

  2. The SAP system starts the rfcexec program via RFC.

  3. rfcexec starts a script (in the graphic: out.script), to which it transfers the directory and name of the new file as parameters (a character string).

  4. The script starts the receiving system.

  5. The receiving system reads the new file and then deletes it. It is important that the receiving system stores the numbers of transferred IDocs, so that status information can be assigned to IDocs in the SAP system later.