You require the program rfcexec
from the RFC library.
To create a logical destination for RFC, choose TCP/IP Connections
and choose .
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.
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 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).
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".
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):
Outbound IDocs are generated in the SAP System and written to a file.
The SAP system starts the rfcexec program via RFC.
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).
The script starts the receiving system.
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.