!--a11y-->
Outbound: Triggering the Receiving System

You require the rfcexec program from the RFC library.
...
1. To create an RFC logical destination select Tools ® Administration ® Administration®Network ® RFC destinations(transaction SM59). Position the cursor on TCP/IP connections and select Edit ® Create.
2. Enter the name of the RFC destination (for example EDI) and the connection type t (start an external program via TCP/IP). Enter a description of the RFC destination. Save your entries.
3.
Work
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).
Work 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 Destination ® Gateway Options and enter
gateway host and gateway service. You determine these two parameters,
for example, with the report RSPARAM (see also Inbound: Triggering
the SAP System)
4. Save your entries. Test your destination via 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“.
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), which it transfers as a parameter directory and a name of the new file (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.

