SAP IDocs and RFCs/BAPI Connector Administration
Before you can use an SAP connection to process data through IDocs or RFCs/BAPIs, an SAP administrator must perform the following tasks:
- 1. If necessary, download and install the Microsoft Visual C++ Redistributable.
- 2. Download and configure the SAP libraries.
- 3. Configure the sapnwrfc.ini file.
- 4. Define SAP Connector as an external logical system in SAP.
- 5. Configure SAP user authorization.
- 6. To process data through IDocs, install and configure the SAP Metadata utility.
After the administrator has performed the configuration, you can create and use SAP RFC/BAPI, IDoc Reader, and IDoc Writer connections in mappings.
Step 1. Downloading and Installing the Microsoft Visual C++ Redistributable
If you do not have Microsoft Visual C++ (VC++) installed, download and install the Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package on the Windows machine that hosts the Secure Agent. You can then run applications developed with VC++.
Perform the following steps to install the Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package:
1. Click the following URL:
2. Scroll down and find the Affected Software section.
3. Click the following link to download and install the package:
For more information, see the following SAP Notes: 1375494 and 1025361
Step 2. Downloading and Configuring SAP Libraries for IDoc and BAPI/RFC
Download and configure the SAP NetWeaver RFC SDK libraries. Contact SAP Customer Support if you encounter any issues when you download the libraries.
Note: If you performed this step for an SAP table connection, you do not need to do it again.
1. Remove the classic SAP RFC SDK 7.20 libraries.
Note: You must have SAP credentials to access the Service Marketplace.
3. Download Unicode SAP NetWeaver RFC SDK 7.20 libraries that are specific to the operating system that hosts the Secure Agent process and the Windows 32-bit SAP NetWeaver RFC SDK libraries.
The following table lists the libraries corresponding to the different operating systems:
Operating System | Unicode SAP NetWeaver RFC SDK Libraries |
---|
Linux.64 | - - libicuuc.so.34
- - libsapucum.so
- - libicudata.so.34
- - libicui18n.so.34
- - libsapnwrfc.so
- - libicudecnumber.so
|
Linux.32 | - - libicuuc.so.34
- - libsapucum.so
- - libicudata.so.34
- - libicui18n.so.34
- - libsapnwrfc.so
- - libicudecnumber.so
|
Windows EM64T | - - libsapucum.dll
- - libicudecnumber.dll
- - sapnwrfc.dll
- - icuin34.dll
- - icuuc34.dll
- - icudt34.dll
|
Windows 32-bit | - - libsapucum.dll
- - libicudecnumber.dll
- - sapnwrfc.dll
- - icuin34.dll
- - icuuc34.dll
- - icudt34.dll
|
4. Copy the NetWeaver RFC SDK libraries to the following directory:
<Informatica Secure Agent installation directory>\main\bin\rdtm
5. Set the following permissions for each NetWeaver RFC SDK library:
- - Read, write, and execute permissions for the current user.
- - Read and execute permissions for all other users.
Step 3. Configuring sapnwrfc.ini
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. To enable the Secure Agent to connect to the SAP system as an RFC client, create and configure the sapnwrfc.ini file on the machines that host the Secure Agent.
When you read data from SAP tables, if you define the path and file name of the saprfc.ini file in the SAP connection, the Secure Agent will use the saprfc.ini file. However, if you define only the path of the saprfc.ini file in the connection, the Secure Agent will first verify if an sapnwrfc.ini file exists in the specified path. If the sapnwrfc.ini file exists, the Secure Agent will use the sapnwrfc.ini file. Else, it will use the saprfc.ini file.
Note: Informatica will deprecate the saprfc.ini file in a future release. Therefore, Informatica recommends that you create and use an sapnwrfc.ini file instead of the saprfc.ini file.
To process data through RFC/BAPIs, read IDocs, write IDocs, and write data to SAP tables, you cannot use the saprfc.ini file. You must create and configure 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:
<Informatica Secure Agent installation directory>\main\bin\rdtm
Configure the Connection Entries in the sapnwrfc.ini File
Use the sapnwrfc.ini file to configure the connections that you want to use.
You can configure the following types of connections in the sapnwrfc.ini file:
- 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
sapnwrfc.ini Parameters
The following table describes the parameters that you can define for various connection types in the sapnwrfc.ini file.
sapnwrfc.ini Parameter | Description | Applicable Connection Types |
---|
DEST | Logical name of the SAP system for the connection. All DEST entries must be unique. You must 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
|
Sample sapnwrfc.ini File
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>
Step 4. Defining SAP Connector as a Logical System in SAP
To use SAP Connector to send and receive IDocs from SAP, you must define SAP Connector as an external logical system in SAP.
Create a single logical system in SAP for IDoc ALE integration with SAP Connector. When you define SAP Connector as a logical system, SAP acknowledges SAP Connector as an external system that can receive outbound IDocs from SAP and send inbound IDocs to SAP.
Perform the following steps to define SAP Connector as a logical system:
- 1. Create a logical system in SAP for SAP Connector.
- 2. Create an RFC destination for SAP Connector.
- 3. Create a tRFC port for the RFC destination.
- 4. Create a partner profile for SAP Connector.
- 5. Create outbound and inbound parameters for the partner profile.
Note: These steps are based on SAP version 4.6C. The steps may differ if you use a different version. For complete instructions on creating a logical system in SAP, see the SAP documentation.
Step 1. Create a Logical System for SAP Connector
To uniquely identify SAP Connector as a client within a network, define SAP Connector as an external logical system in SAP.
1. Go to transaction SALE.
The Display IMG window appears.
2. Expand the tree to navigate to the Application Link Enabling > Sending and Receiving Systems > Logical Systems > Define Logical System operation.
3. Click the IMG - Activity icon to run the Define Logical System operation.
An informational dialog box appears.
4. Click Enter.
The Change View Logical Systems window appears.
5. Click New Entries.
The New Entries window appears.
6. Enter a name and description for the logical system entry for SAP Connector.
Step 2. Create an RFC Destination
Create an RFC destination and program ID for SAP Connector.
1. Go to transaction SM59.
The Display and Maintain RFC Destinations window appears.
2. Click Create.
The RFC Destination window appears.
3. Enter the name of the logical system you created as the RFC destination.
4. To create a TCP/IP connection, enter T as the connection type.
5. Enter a description for the RFC destination.
6. Click Save.
7. For Activation Type, click Registration.
8. For Program ID, enter the same name as the RFC destination name.
Use the Program ID as the value for the PROGRAM_ID parameter in the sapnwrfc.ini file.
9. If the SAP system is an unicode system and the Secure Agent runs on AIX (64-bit), HP-UX IA64, Linux (32-bit), Solaris (64-bit), or Windows, click the Special Options tab, and select the Unicode option under Character Width in Target System.
SAP provides unicode RFC libraries for these operating systems. When the Secure Agent runs on one of these operating systems, it uses the unicode RFC libraries to process unicode data.
Step 3. Create a tRFC Port for the RFC Destination
Create a tRFC port for the RFC destination you defined in SAP. SAP uses the tRFC port to communicate with SAP Connector.
1. Go to transaction WE21.
2. Click Ports > Transactional RFC.
3. Click Create.
The Ports in IDoc Processing dialog box appears.
4. Click Generate Port Name or Own Port Name and enter a name.
5. Click Enter.
6. Enter a description for the port.
7. Select the IDoc record version type.
8. Enter the name of the RFC destination you created.
Step 4. Create a Partner Profile for SAP Connector
Create a partner profile for the logical system you defined for SAP Connector. When SAP communicates with an external system, it uses the partner profile to identify the external system.
1. Go to transaction WE20.
2. Click Create.
3. Enter the following properties:
Partner Profile Property | Description |
---|
Partner number | Name of the logical system you created for SAP Connector. |
Partner type | Partner profile type. Enter LS for logical system for ALE distribution systems. |
4. In the Post-processing tab, enter the following properties:
Partner Profile Property | Description |
---|
Type | User type. Enter US for user. |
Agent | The SAP user login name. |
Lang | Language code that corresponds to the SAP language. Enter EN for English. |
5. In the Classification tab, enter the following properties:
Partner Profile Property | Description |
---|
Partner class | Enter ALE. |
Partner status | Indicates the status of communication with the partner. To communicate with the partner, enter A for active. |
Step 5. Create Outbound and Inbound Parameters for the Partner Profile
Outbound parameters define the IDoc message type, IDoc basic type, and port number for outbound IDocs. Inbound parameters define the IDoc message type for inbound IDocs.
SAP uses outbound parameters when it sends IDocs to SAP Connector. Create an outbound parameter for each IDoc message type that SAP sends to SAP Connector. SAP uses inbound parameters when it receives IDocs from SAP Connector. Create an inbound parameter for each IDoc message type that SAP receives from SAP Connector.
1. From the partner profiles window, click Create Outbound Parameter.
The Partner Profiles: Outbound Parameters window appears.
2. Enter the following properties:
Outbound Parameter Property | Description |
---|
Message Type | The IDoc message type the SAP system sends to SAP Connector. |
Receiver Port | The tRFC port number you defined. |
IDoc Type | The IDoc basic type of the IDocs the SAP system sends to SAP Connector. |
3. Click Save.
The Packet Size property appears.
4. Enter a value between 10 and 200 IDocs as the packet size.
The packet size determines the number of IDocs that SAP sends in one packet to SAP Connector.
5. Click Enter.
6. Repeat steps from 1 to 5 to create an outbound parameter for each IDoc message type that SAP sends to SAP Connector.
7. Click Create Inbound Parameter.
The Partner Profiles: Inbound Parameters window appears.
8. For each inbound parameter, enter the following properties:
Inbound Parameter Property | Description |
---|
Message Type | The IDoc message type the SAP system receives from SAP Connector. |
Process Code | The process code. The SAP system uses the process code to call the appropriate function module to process the IDocs it receives. |
9. Click Enter.
10. Repeat steps 7 through 9 to create an inbound parameter for each IDoc message type that SAP receives from SAP Connector.
Step 5. Configuring SAP User Authorizations
An SAP administrator needs to create a profile in the development, test, and production SAP system so that you can use the integration features. This profile name must include authorization for the objects and related activities. The profile on the test system should be the same as the profile on the production system.
The setup of the user and profiles is done within SAP using the SAP GUI. This activity is external to Informatica Cloud.
- BAPI/RFC
- The following table describes the authorization an SAP user requires to execute tasks using the BAPI/RFC functions:
Authorization Object | Authorization Value |
---|
S_RFC | SYST, SDTX, SDIFRUNTIME, RFC1, RFC2 |
Note: In addition to the above authorization, the user needs access to any BAPI/RFC function that needs to be executed.
- IDoc
- The following table describes the authorization an SAP user requires to execute tasks with IDoc messages:
Authorization Object | Authorization Value |
---|
S_RFC | SYST, SDTX, SDIFRUNTIME, RFC1, RFC2, EDIMEXT |
Note: In addition to the above authorization, the user needs access to specific IDoc and underlying transactions that needs to be executed.
Step 6. Installing and Configuring the SAP IDocs Metadata Utility
To import IDoc metadata from SAP systems and generate mapplets, you need to install and configure the SAP Metadata utility.
Prerequisites
Before you use the SAP Metadata utility to process data through IDocs, verify the following prerequisites:
- •Download and install the 32-bit SAP JCo libraries for your operating system. You can find the libraries on the SAP Service Marketplace at the following URL: http://service.sap.com. Unzip the contents to a local directory.
- •Add the location of the SAP JCo libraries to the PATH system environment variable.
- •Verify that an SAP user has the authorization to browse and extract metadata.
Installation and Configuration
Install and configure the SAP Metadata utility to process data through IDocs on the machine that hosts the Secure Agent.
2. Unzip the file to a local directory.
Avoid using spaces in the directory name because spaces can cause imports to fail.
3. Edit the <SAP Metadata utility download directory>/SAPUtil.bat file to define the CLASSPATH and JAVA_HOME variables.
- a. Enter the SAP JCo libraries directory and the sapjco3.jar file name in the CLASSPATH variable and remove “REM” from the following line:
REM SET CLASSPATH=%CLASSPATH%;<Location of sapjco3.jar>\sapjco3.jar
For example: SET CLASSPATH=%CLASSPATH%;C:\SAP\JCo\sapjco3.jar
- b. Enter the JAVA JRE directory in the JAVA_HOME variable and remove “REM” from the following line:
REM SET JAVA_HOME=<JRE_LOCATION>
For example: SET JAVA_HOME=C:\Program Files (x86)\Informatica Cloud Secure Agent\jre
Use the JAVA JRE included with the Informatica Cloud Secure Agent.
4. Save and close the batch file.