Connect to SAP
ERPConnect supports the following connection methods to SAP systems:
- Connect to a single application server.
- Connect to a message server (Load Balancing).
- Connect to a single application server or public or private cloud instance via RFC over WebSocket.
Input Parameters
The connection methods require the following input:
Single Application Server | Load Balancing | RFC over WebSocket |
---|---|---|
Name of the user (UserName property) | Name of the user (UserName property) | Name of the user (UserName property) |
Password (Password property) | Password (Password property) | Password (Password property) |
Language (Language property) | Language (Language property) | Language (Language property) |
Client (Client property) | Client (Client property) | Client (Client property) |
Name of the application server (Host property) | Name of the message server (MessageServer property) | WebSocket host (WebSocketHost property) |
System number between 0 and 99 (SystemNumber property) | System ID (SID property e.g., MBS) | WebSocket port (WebSocketPort property) |
Name of the group (LogonGroup property e.g., PUBLIC) | AliasUser property instead of UserName for cloud systems | |
Various TLS settings (TlsSettings property), e.g., CryptoLibrary, ClientPse |
Connect to SAP
- Add the ERPConnect.dll class library as a reference to the project.
- Create a new R3Connection object and define all input parameters.
-
Establish the connection using
Open
.
Encoding
The default encoding for an SAP connection is SAP code page 1100 (iso-8859-1). When using the NW RFC protocol you can explicitly set an encoding. This is necessary if your SAP credentials contain characters that are not part of SAP code page 1100.
Client Protocol
The default client protocol is the NWRFC Protocol. To use the old RFC Protocol add the following command:
Tip
If you use the constructor of the R3Connection class to provide the login properties, you can save lines.
Example: R3Connection con = new R3Connection("SAPServer",00,"SAPUser","Password","EN","800");
.
Note
For more information on authentication, see SSO with Log On Tickets and SSO with SNC.
Connect via Router
When accessing an SAP system via a Router, the router string must be set before the host name or the name of the message server.
For more information on route strings, see SAP Help- Route String Entry for SAProuter.
Connect to SAP via Router | |
---|---|