Skip to main content
The SAP IDoc connector supports sending and receiving IDoc files to and from a variety of SAP systems. It is a data container that is used to exchange information between SAP and another process that can understand the syntax and semantics of the data.

Overview

IDoc connectors can connect to SAP using the following methods: Windows
  • NetWeaver RFC SDK
  • Classic RFC SDK
  • Classic RFC SDK with Unicode support
  • SOAP (send-only)
Java
  • Java connector (JCO)
  • SOAP (send-only)
IDoc connectors can send and retrieve files formatted either as raw IDoc or as IDoc XML.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Host Configuration

Settings related to establishing the connection to the SAP system.
SettingDescription
Connector IdThe static, unique identifier for the connector.
Connector TypeDisplays the connector name and a description of what it does.
Connector DescriptionAn optional field to provide a free-form description of the connector and its role in the flow.
Connect TypeThe method with which to connect to SAP. See the Establishing a Connection section for your method for additional information.
SAP HostHostname or IP address of the target SAP system.
System NumberThe number by which the target SAP system is defined. Valid values are 0-99, and often this value should be 0.

Client Authentication

Settings related to authenticating against the SAP system.
SettingDescription
ClientThe client that is authenticating to the SAP system.
UserThe username credential for authentication.
PasswordThe password for the specified user.

Receiver Options

Settings related to receiving IDoc files.
SettingDescription
IDoc ReceiverWhether the connector should retrieve IDoc files from SAP.
Program IDA unique name that identifies to the SAP system.
IDoc FormatWhether to receive files as raw IDoc or IDoc XML.

Control Record Information Options

This section allows you to overwrite the control headers for IDoc files before sending them to SAP. This is useful when you are receiving IDoc files from one SAP system and sending them to another SAP system: in this situation you should change the control record without changing the IDoc file data. See Sending IDocs to SAP for more information.

Advanced Tab

Language Settings

Settings related to communication language.
SettingDescription
LanguageThe language value to be used when connecting to the SAP system. Set this to the ISO 639-1 value for the language the SAP system uses.

Gateway

Settings related to communicating with SAP through a gateway.
SettingDescription
Gateway HostThe hostname or IP address of the gateway through which to connect.
Gateway ServiceThe gateway service to use.

Logon Load Balancing

Settings related to logging in to the SAP system as a group to enable load balancing.
SettingDescription
Message ServerThe service name of the load balancer.
System IDIdentifies the SAP system.
Logon GroupThe group to use when load balancing.

Secure Network Communications (SNC)

Settings related to using an external security product to enhance the SAP connection security.
SettingDescription
SNC NameThe SNC name for the machine making the connection.
SNC Partner NameThe SNC name of the SAP system the connector is connecting to.
SNC Quality of Protection LevelThe level of protection added by the SNC product.
SNC LibraryThe path to the external security product’s library.

Advanced Settings

Settings not included in the previous categories.
SettingDescription
Processing DelayThe amount of time (in seconds) by which the processing of files placed in the Transactions tab is delayed. This is a legacy setting. Best practice is to use a File connector to manage local file systems instead of this setting.
Refresh SchemaWhen enabled, the connector attempts to update the schema it uses for parsing when a parsing error occurs. The schema is updated by reaching out to the SAP system and querying for the appropriate schema.

Logging

Miscellaneous

Automation Tab

Automation Settings

Settings related to the automatic processing of files by the connector.
SettingDescription
SendWhether files arriving at the connector are automatically sent.
Retry IntervalThe amount of time before a failed send is retried.
Max AttemptsThe maximum number of times a failed send is retried.

Performance

Alerts Tab

SLAs Tab

Establishing a Connection

Using NetWeaver RFC SDK

The following libraries from the NetWeaver RFC SDK must be placed into the www\\bin\\x64 folder (www\\bin\\x86 on 32-bit operating systems):
  • sapnwrfc.dll
  • icudt30.dll
  • icuin30.dll
  • icuuc30.dll
  • libicudecnumber.dll
  • libsapucum.dll
  • The .dll names might be different based on the version of the SAP RFC SDK you have installed. The examples above are for version 3.0.
  • You need to add the sapgw00 service to your listed services for the NetWeaver SDK connection to work on your client machine. You can add it to the services file at C:\\Windows\\System32\\drivers\\etc\\services.

Using Classic RFC SDK

The non-Unicode library does not require anything other than librfc32.dll. Place librfc32.dll into the www\\bin\\x64 folder (www\\bin\\x86 on 32-bit operating systems).
These libraries are provided in both x86 and x64, so you must use the same platform that the process is using. If the application is running on a 64-bit version of Windows, the process is 64-bit.

Using Classic RFC SDK with Unicode Support

The following libraries from the SAP RFC SDK must be placed into the www\\bin\\x64 folder (www\\bin\\x86 on 32-bit operating systems):
  • librfc32u.dll
  • icudt30.dll
  • icuin30.dll
  • icuuc30.dll
  • The .dll names might be different based on the version of the SAP RFC SDK you have installed. The examples above are for version 3.0.
  • These libraries are provided in both x86 and x64, so you must use the same platform that the process is using. If the application is running on a 64-bit version of Windows, the process is 64-bit.

Using the Java Connector

To use the Java connector, add sapjco3.jar to the lib folder of your Java servlet container.

Using SOAP

SOAP can only be used to send IDocs to SAP. You must use a different connection type to receive IDocs from SAP.
This requires enabling SOAP connections on the SAP system.

Configuring Services

In addition to the dependencies above, the following services must be added to %WINDIR%\\system32\\drivers\\etc\\services, or /etc/services if your system is running Linux or Mac OS X. If SAP NetWeaver is already installed on the machine, no further action is required.
Service NameConnector Number/Protocol
sapdp003200/tcp
sapdp013201/tcp
sapdp023202/tcp
sapdp033203/tcp
sapdp043204/tcp
sapdp053205/tcp
sapdp063206/tcp
sapdp073207/tcp
sapdp083208/tcp
sapdp093209/tcp
sapdp103210/tcp
sapdp113211/tcp
sapdp123212/tcp
sapdp133213/tcp
sapdp143214/tcp
sapdp153215/tcp
sapdp163216/tcp
sapdp173217/tcp
sapdp183218/tcp
sapdp193219/tcp
sapdp203220/tcp
sapdp213221/tcp
sapdp223222/tcp
sapdp233223/tcp
sapdp243224/tcp
sapdp253225/tcp
sapdp263226/tcp
sapdp273227/tcp
sapdp283228/tcp
sapdp293229/tcp
sapdp303230/tcp
sapdp313231/tcp
sapdp323232/tcp
sapdp333233/tcp
sapdp343234/tcp
sapdp353235/tcp
sapdp363236/tcp
sapdp373237/tcp
sapdp383238/tcp
sapdp393239/tcp
sapdp403240/tcp
sapdp413241/tcp
sapdp423242/tcp
sapdp433243/tcp
sapdp443244/tcp
sapdp453245/tcp
sapdp463246/tcp
sapdp473247/tcp
sapdp483248/tcp
sapdp493249/tcp
sapdp503250/tcp
sapdp513251/tcp
sapdp523252/tcp
sapdp533253/tcp
sapdp543254/tcp
sapdp553255/tcp
sapdp563256/tcp
sapdp573257/tcp
sapdp583258/tcp
sapdp593259/tcp
sapdp603260/tcp
sapdp613261/tcp
sapdp623262/tcp
sapdp633263/tcp
sapdp643264/tcp
sapdp653265/tcp
sapdp663266/tcp
sapdp673267/tcp
sapdp683268/tcp
sapdp693269/tcp
sapdp703270/tcp
sapdp713271/tcp
sapdp723272/tcp
sapdp733273/tcp
sapdp743274/tcp
sapdp753275/tcp
sapdp763276/tcp
sapdp773277/tcp
sapdp783278/tcp
sapdp793279/tcp
sapdp803280/tcp
sapdp813281/tcp
sapdp823282/tcp
sapdp833283/tcp
sapdp843284/tcp
sapdp853285/tcp
sapdp863286/tcp
sapdp873287/tcp
sapdp883288/tcp
sapdp893289/tcp
sapdp903290/tcp
sapdp913291/tcp
sapdp923292/tcp
sapdp933293/tcp
sapdp943294/tcp
sapdp953295/tcp
sapdp963296/tcp
sapdp973297/tcp
sapdp983298/tcp
sapdp993299/tcp
sapgw003300/tcp
sapgw013301/tcp
sapgw023302/tcp
sapgw033303/tcp
sapgw043304/tcp
sapgw053305/tcp
sapgw063306/tcp
sapgw073307/tcp
sapgw083308/tcp
sapgw093309/tcp
sapgw103310/tcp
sapgw113311/tcp
sapgw123312/tcp
sapgw133313/tcp
sapgw143314/tcp
sapgw153315/tcp
sapgw163316/tcp
sapgw173317/tcp
sapgw183318/tcp
sapgw193319/tcp
sapgw203320/tcp
sapgw213321/tcp
sapgw223322/tcp
sapgw233323/tcp
sapgw243324/tcp
sapgw253325/tcp
sapgw263326/tcp
sapgw273327/tcp
sapgw283328/tcp
sapgw293329/tcp
sapgw303330/tcp
sapgw313331/tcp
sapgw323332/tcp
sapgw333333/tcp
sapgw343334/tcp
sapgw353335/tcp
sapgw363336/tcp
sapgw373337/tcp
sapgw383338/tcp
sapgw393339/tcp
sapgw403340/tcp
sapgw413341/tcp
sapgw423342/tcp
sapgw433343/tcp
sapgw443344/tcp
sapgw453345/tcp
sapgw463346/tcp
sapgw473347/tcp
sapgw483348/tcp
sapgw493349/tcp
sapgw503350/tcp
sapgw513351/tcp
sapgw523352/tcp
sapgw533353/tcp
sapgw543354/tcp
sapgw553355/tcp
sapgw563356/tcp
sapgw573357/tcp
sapgw583358/tcp
sapgw593359/tcp
sapgw603360/tcp
sapgw613361/tcp
sapgw623362/tcp
sapgw633363/tcp
sapgw643364/tcp
sapgw653365/tcp
sapgw663366/tcp
sapgw673367/tcp
sapgw683368/tcp
sapgw693369/tcp
sapgw703370/tcp
sapgw713371/tcp
sapgw723372/tcp
sapgw733373/tcp
sapgw743374/tcp
sapgw753375/tcp
sapgw763376/tcp
sapgw773377/tcp
sapgw783378/tcp
sapgw793379/tcp
sapgw803380/tcp
sapgw813381/tcp
sapgw823382/tcp
sapgw833383/tcp
sapgw843384/tcp
sapgw853385/tcp
sapgw863386/tcp
sapgw873387/tcp
sapgw883388/tcp
sapgw893389/tcp
sapgw903390/tcp
sapgw913391/tcp
sapgw923392/tcp
sapgw933393/tcp
sapgw943394/tcp
sapgw953395/tcp
sapgw963396/tcp
sapgw973397/tcp
sapgw983398/tcp
sapgw993399/tcp

Logging on to SAP

The following settings are required to connect with your SAP system.
SettingDescription
SAP HostHost name of the target system. Host names can be regular host names defined in a hosts file, an IP address like 123.123.123.123, or an SAProuter address such as /H/hostname/S/connector/H/host/S/connector/...
System NumberThe number by which the target system is defined. The valid range is 0 to 99, but in general this is 0.
ClientThe client authenticating to the SAP system.
UserThe user that is authenticating to the SAP system.
PasswordThe password for the authenticating user.

Gateway

When connecting to SAP via a gateway, use the options in the Gateway section of the Advanced tab.

Load Balancing

To log on via load balancing, set the properties in the Logon Load Balancing section of the Advanced tab.

Secure Network Communications (SNC)

To enable secure network communications, check the Enable SNC box in the Secure Network Communications (SNC) section of the Advanced tab. Set SNC Library to the .dll of the SNC library you want to use to connect with SAP.

Sending IDocs to SAP

Once you have configured the IDoc connector to connect to your SAP system, you can begin sending IDoc files to SAP. The IDoc connector can send files formatted in raw IDoc or XML IDoc. You can configure the connector to automatically insert control record information into the IDoc being sent to SAP: the DOCREL, SNDPOR, SNDPRT, and so on. This makes it easier to process outgoing IDocs to the configured system. Configure these settings in the Control Record Information Options section of the Settings tab. Before sending an IDoc to your SAP system, make sure that you have properly configured a partner profile in SAP. If no partner profile in SAP matches the control record information in the IDoc you are sending, the data will not be processed by your SAP system. See Test Sending an IDoc to SAP for more information on setting up a partner profile.
You can use transaction code WE60 to search for segment documentation for different IDoc types.

Test Sending an IDoc to SAP

To test sending an IDoc to SAP, you first need to configure your SAP system to have a partner profile for . The following steps describe how to do this with an ORDERS IDoc.
  1. Create a partner: Go to transaction code WE20 and define a partner profile. Set Partn Type to KU for Customer and Partner No to a valid customer number. Create a Partner
  2. Add an inbound parameter for the ORDERS document: The message type for this document is ORDERS. On the Inbound Options tab, set Process code to ORDE to tell SAP how to create a sales order when a purchase order ORDERS document is received by the SAP system. Set Parameters
  3. Assign the customer to a sales division: The customer configured in step one must be assigned to a sales organization, distribution channel, and division. Go to transaction VOE2 to configure these settings in the EDSDC table.

Receiving IDocs from SAP

Once you have configured the IDoc connector to connect to your SAP system, you can begin receiving IDoc files from SAP. The IDoc connector can receive files formatted in raw IDoc or XML IDoc. To receive files from SAP, create an RFC destination for . You can then check Enable IDoc Receiver in the Receiver Options section of the Settings tab, then enter the Program Id that you registered in your SAP system for .

Test Receiving an IDoc from SAP

This example describes how to configure your SAP system to send a MATMAS IDoc to .
  1. Define a logical system: First, go to transaction SALE. Then navigate to Basic Settings > Logical Systems > Define Logical System. Create a new entry with a valid name (for example, ) and description.
  2. Create an RFC destination: Open transaction code SM59. Click the create button and fill in the fields for the RFC destination described below.
    SettingDescription
    RFC DestinationA unique name for the new destination (for example, _DEST).
    Connection TypeT for TCP/IP.
    DescriptionA description for the destination.
    Program IdA unique name that will be set in to identify the destination.
    Activation TypeSelect Registered Server Program.
    After you save the settings, test the connection to make sure you can successfully connect to .
  3. Create a processing connector: Go to transaction code WE21. Create a new Transactional RFC connector with a unique name and the same destination you created in step 2.
  4. Create a partner profile: Open transaction WE20. Create a partner profile for the logical system that you added in step 1. Next, add an outbound parameter for the MATMAS document. Set the Message Type to MATMAS. On the Outbound Options tab, set the Receiver port to the value of the connector you configured in step 3, set the Output Mode to Transfer IDoc Immed, and set the IDoc Basic type to MATMAS05.
  5. Send a test IDoc: Use transaction BD10 to send a test IDoc to for a specified material number. You need to configure the Message Type and Logical System before sending the message. Use transaction BD87 to monitor outgoing messages and process them again if necessary.

Macros

Examples