Connections > SAP Table Connector connection properties > Configure the sapnwrfc.ini file
  

Configure the sapnwrfc.ini file

To enable the Secure Agent to connect to the SAP system as an RFC client, create and configure the sapnwrfc.ini file on the Secure Agent machine.
If you want to write data to SAP tables, you need to use the sapnwrfc.ini file.
SAP uses the communications protocol, Remote Function Call (RFC), to communicate with other systems. SAP stores RFC-specific parameters and connection information in a file named sapnwrfc.ini.
If you are upgrading from an earlier version, you do not need to create an sapnwrfc.ini file. The Secure Agent copies the sapnwrfc.ini file to the deploy_to_main\bin\rdtm directory.
When you read data from or write data to SAP tables, if you define the path and file name of the sapnwrfc.ini file in the SAP connection, the Secure Agent uses the sapnwrfc.ini file. However, if you define only the path of the sapnwrfc.ini file in the connection, the Secure Agent first verifies if an sapnwrfc.ini file exists in the specified path. If the sapnwrfc.ini file exists, the Secure Agent uses the sapnwrfc.ini file. Else, an exception occurs.
To create the sapnwrfc.ini file, use a DOS editor or WordPad to configure the sapnwrfc.ini file. Notepad can introduce errors to the sapnwrfc.ini file.
After you create the sapnwrfc.ini file, copy the file to the following directory and restart the Secure Agent:
<Informatica Secure Agent installation directory>\apps\Data_Integration_Server\ext\deploy_to_main\bin\rdtm\
Create the deploy_to_main\bin\rdtm directory if it does not already exist.

Using the configured sapnwrfc.ini file in connections

After you create the sapnwrfc.ini file, you can use the sapnwrfc.ini file to configure the following types of connections that you want to use:
Connection to a specific SAP application server
Create this connection to enable communication between an RFC client and an SAP system. Each connection entry specifies one application server and one SAP system.
The following sample shows a connection entry for a specific SAP application server in the sapnwrfc.ini file:
DEST=sapr3
ASHOST=sapr3
SYSNR=00
Connection to use SAP load balancing
Create this connection to enable SAP to create an RFC connection to the application server with the least load at run time. Use this connection when you want to use SAP load balancing.
The following sample shows a connection entry for SAP load balancing in the sapnwrfc.ini file:
DEST=sapr3
R3NAME=ABV
MSHOST=infamessageserver.informatica.com
GROUP=INFADEV
Connection to an RFC server program registered at an SAP gateway
Create this connection to connect to an SAP system from which you want to receive outbound IDocs.
The following sample shows a connection entry for an RFC server program registered at an SAP gateway in the sapnwrfc.ini file:
DEST=sapr346CLSQA
PROGRAM_ID=PID_LSRECEIVE
GWHOST=sapr346c
GWSERV=sapgw00
You can configure the following parameters in the sapnwrfc.ini file for various connection types:
sapnwrfc.ini Parameter
Description
Applicable Connection Types
DEST
Logical name of the SAP system for the connection.
All DEST entries must be unique. You need to have only one DEST entry for each SAP system.
For SAP versions 4.6C and later, use up to 32 characters. For earlier versions, use up to eight characters.
Use this parameter for the following types of connections:
  • - Connection to a specific SAP application server
  • - Connection to use load balancing
  • - Connection to an RFC server program registered at an SAP gateway
ASHOST
Host name or IP address of the SAP application. The Secure Agent uses this entry to attach to the application server.
Use this parameter to create a connection to a specific SAP application server.
SYSNR
SAP system number.
Use this parameter to create a connection to a specific SAP application server.
R3NAME
Name of the SAP system.
Use this parameter to create a connection to use SAP load balancing.
MSHOST
Host name of the SAP message server.
Use this parameter to create a connection to use SAP load balancing.
GROUP
Group name of the SAP application server.
Use this parameter to create a connection to use SAP load balancing.
PROGRAM_ID
Program ID. The Program ID must be the same as the Program ID for the logical system that you define in the SAP system to send or receive IDocs.
Use this parameter to create a connection to an RFC server program registered at an SAP gateway.
GWHOST
Host name of the SAP gateway.
Use this parameter to create a connection to an RFC server program registered at an SAP gateway.
GWSERV
Server name of the SAP gateway.
Use this parameter to create a connection to an RFC server program registered at an SAP gateway.
TRACE
Debugs RFC connection-related problems.
Set one of the following values based on the level of detail that you want in the trace:
  • - 0. Off
  • - 1. Brief
  • - 2. Verbose
  • - 3. Full
Use this parameter for the following types of connections:
  • - Connection to a specific SAP application server
  • - Connection to use load balancing
  • - Connection to an RFC server program registered at an SAP gateway
The following snippet shows a sample sapnwrfc.ini file:
/*===================================================================*/
/* Connection to an RFC server program registered at an SAP gateway */
/*===================================================================*/
DEST=<destination in RfcRegisterServer>
PROGRAM_ID=<program-ID, optional; default: destination>
GWHOST=<host name of the SAP gateway>
GWSERV=<service name of the SAP gateway>
*===================================================================*/
/* Connection to a specific SAP application server */
/*===================================================================*/
DEST=<destination in RfcOpenConnection>
ASHOST=<Host name of the application server.>
SYSNR=<The back-end system number.>
/*===================================================================*/
/* Connection to use SAP load balancing */
/* The application server will be determined at run time. */
/*===================================================================*/
DEST=<destination in RfcOpenConnection>
R3NAME=<name of SAP system, optional; default: destination>
MSHOST=<host name of the message server>
GROUP=<group name of the application servers, optional; default: PUBLIC>