Destination (-D)

The Destination (-D) adapter command is required in order to specify the destination key when using the Saprfc.ini file for connection to an SAP R/3 system. SAP support of the Saprfc.ini file, which replaces the previous SIDEINFO technology, allows for RFC specific parameters to be contained in the .ini file.
-D dest_key
Note: The destination key has no relationship to the logical system, although a common practice is to name the key similarly to the logical system.

The SAP provided example Saprfc.ini file contains the documentation explaining the file format.

By default, the RFC libraries look for the Saprfc.ini file in the directory specified by the RFC_INI system environment variable. Therefore, make sure to set the environment variable RFC_INI to specify the path and file name where the Saprfc.ini file is located. For example, if the file is located in the C:\IBM directory (RFC_INI=c:\IBM\saprfc.ini), perform the following steps to set the system environment variable:

  1. From the Start menu, select Settings > Control Panel > System.
  2. Select the Environment tab.
  3. Select any variable in the System Variable section. (Add your new system variable in the System Variable section, not in the User Variable section.)
  4. Add RFC_INI in the Variable field at the bottom of the window and add the location of your saprfc.ini file in the Value field.
  5. Click Set > Apply > OK.
    Note: Saprfc.ini entries take precedence over values that are entered in any adapter command string. ASHOST is the equivalent of the Host ID (-H) connection adapter command. SYSNR is the equivalent of the System Number (-S) connection adapter command. The value of the DEST= (-D adapter command) is case-sensitive.
  6. Reboot your system.

Example inbound -D R/3 adapter command string

The following example shows an inbound -D R/3 adapter command string with the Saprfc.ini file.

-d R3EXAMPLE -c 800 -u userid -p pswd

The following example is the entry in the Saprfc.ini file:
/*===================================================================*/
/*  Type A:  R/3 system - specific application server                */
/*===================================================================*/
DEST=R3EXAMPLE
TYPE=A
ASHOST=sp2
SYSNR=00
RFC_TRACE=0
ABAP_DEBUG=0
USE_SAPGUI=0
Note: Entries are case-sensitive. The string must match the entry in the Saprfc.ini file.

Saprfc.ini entries take precedence over anything entered in any adapter command string. ASHOST is the equivalent of the Host ID (-H) connection adapter command. SYSNR is the equivalent of the System Number (-S) connection adapter command.

Example outbound -D R/3 adapter command string

The following example shows the outbound -D R/3 adapter command string for use with the Saprfc.ini file.
-d R3EXAMPLE -t
The following example shows the entry in the Saprfc.ini file:
/*===================================================================*/
/*  Type R:  Register a RFC server program at a SAP Gateway          */
/*           or connect to an already registered RFC server program  */
/*===================================================================*/
DEST=R3EXAMPLE
TYPE=R
PROGID=4handler
GWHOST=192.168.1.127
GWSERV=3300
RFC_TRACE=1
Note: Entries are case-sensitive. The string must match the entry in the Saprfc.ini file.

Saprfc.ini entries take precedence over anything entered in any adapter command string. PROGID is the equivalent of the name of the program registered. GWJPST is the equivalent of (-G) and GWSERV is the equivalent of (-X) in the adapter commands.


Feedback