首页 > 数字化转型 > ERP > configuration SAPGUI Java

configuration SAPGUI Java

原创 ERP 作者:lkptantan 时间:2011-10-30 09:30:43 0 删除 编辑
Technical Background - Connection Strings
Connection String is a technical term used within SAPGUI for the Java Environment configuration. A connection string describes a connection address for a destination, e.g. an SAP system's application server, rather like an Internet URL describes a location for a web page.

Simple Connection Strings
In its simplest form, a connection string contains an IP address and a port number. These informations are sufficient for SAPGUI for the Java Environmant to open a direct TCP connection to a destination, e.g. an application server. IP address and port number are marked with the prefixes '/H/' (for host) and '/S/' (for service). Note that the portnumber for an SAP application server is by convention 3200 plus the two-digit SAP system number.

Example for a simple connection string with an application server's IP address ( and portnumber (3200): 


If your network environment supports DNS (Domain Name Services), a hostname can be used instead of the IP address in all kinds of connection strings. (This requires a correct DNS configuration at the frontend computer, e.g. via the /etc/hosts file).

Example with an application server's hostname ( and portnumber (3200):


If your network environment supports symbolic service names for well-known ports, the symbolic service name can be used instead of the port number in all kinds of connection strings. (This requires a correct service configuration at the frontend computer, e.g. in the /etc/services file). Note that SAP application server ports are by convention named 'sapdp', where  is the SAP system id.

Example with host name ( and symbolic service name (sapdpIWD):


Simple connection strings need not be resolved by the GUI application. Resolution of host names and symbolic service names is done by the operating system's network layer.

SAP Routers
In a WAN (Wide Area Network) environment, SAP routers are used to make connections to remote SAP systems that cannot be reached with a direct TCP connection. Passwords may be used for each SAP router to control access.

In order to make a connection, the frontend computer is responsible for providing the complete route to the destination, possibly including a chain of several SAP routers. Path information is not provided by the routers. (Strictly speaking, a SAP router is actually better described as an application level proxy with password capabilities and strict source routing).

The address for each router is specified by a simple connection string (with the router's host name and port number), optionally followed by '/P/' and the router password. The path from the current location to the destination is described by appending all router addresses together, followed by the address of the destination SAP system. Thus, a connection string with SAP routers generally has the form ....

Example with two routers (, port 3299, and, port 3298), the first using a password (secret), for a connection to the application server, port 3200):

<-------- 1st router ----------><---- 2nd router ----><------ app_server ------>
Connection strings including SAP routers are passed to the GUI's communication layer and resolved step by step by the routers on the path. If host names and symbolic service names are used, each router must have access to correct network configuration information to resolve them.

Message Servers and Logon Groups
For load balancing purposes, application servers from one SAP system are usually configured in logon groups, where each group serves a particular kind of user. The application servers in each group are assigned to users by a least-heavily-loaded strategy. This load balancing is done by message servers. Each SAP system has exactly one message server, which can be reached via TCP on a specific message server port.

Care should be taken that the application server's port number is not confused with the message server's port number. Although the message server's host name may in small installations often be identical to the hostname of an application server, the port number is always different. Symbolic service names for message servers by convention have the form 'sapms', where  is the SAP system id.

Message server and group information can be used to address a SAP system in a connection string. The address of the message server is specified as a combination of message server host name, message server port and group name. These informations are marked with the prefixes '/M/' (message server host name), '/S/' (message server port) and '/G/' (logon group).

Example with message server (hostname alrmain, port number 4253) and logon group (SPACE):


Connection strings with message servers are resolved by SAPGUI for the Java environment by contacting the message server and retrieving the (simple) connection string of an application server for the specified group. This requires network access to the message server at the time the address is resolved.

SAP router connection strings may be used in combination with message server connection strings simply by specifying the router address before the message server address. The router is then used for contacting the message server as well as for contacting the resolved application server.

Symbolic System Names
The most user-friendly form of connection string addresses an SAP system only by its symbolic name (per convention, the system id) and the logon group name. These informations are marked with the prefixes '/R/' (for the symbolic SAP system name) and '/G/' (for the logon group name).

Example with SAP system (ALR) and logon group (SPACE):


Connection strings with symbolic system names are resolved by SAPGUI for the Java Environment by looking up the symbolic SAP system name in the Message Server List (a text file containing a mapping between symbolic system names and message server addresses) and replacing the /R/ part of the connection string with the resulting message server address. The result is a complete message server connection string which is then further resolved as explained above.

Formal syntax
For the technically interested reader, the following BNF grammar formally describes the syntax of connection strings:

 := []
             := ||
            := "/H/""/S/"
              := |
          := (any DNS hostname)
            := (any IP address, in dotted decimal form)
           := |
       := (any IP service name)
       := (any decimal number)
     := "/M/""/S/""/G/"
             := (any ASCII string not containing '/')
          := "/R/""/G/"
            := (any ASCII string not containing '/')
     := *
            := "/H/""/S/"["/P/"]
          := (any ASCII string not containing '/')

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

下一篇: Java on Windows 7
请登录后发表评论 登录
  • 博文量
  • 访问量