RFC SDK指南 连接到R/3系统

来源:互联网 发布:淘宝店铺客服悬浮代码 编辑:程序博客网 时间:2024/06/04 18:45

There are two types of connection to an R/3-System:
• Connection to an explicit application host
• Connection to an R/3 via Load Balancing

 

有两种连接到R/3系统的类型:

    连接到指定的应用服务器;

    通过负载均衡连接到一个服务器(组登录)。

 

Connection to an explicit application server (Connection type A)

连接到指定的应用服务器。

 

You remember that the connection to an external system is established in two steps (connection to an SAP gateway and connection from an SAP gateway to an R/3 system). To establish a connection to an explicit application server the following information is needed:
• Application host name and system number. This information is mandatory.
• Gateway host name and gateway services. This information is optional. The default is the local gateway on the application server itself.

 

你还记得建立一个到指定系统的连接需要两步(连接到sap网关,从sap网关连接到R/3系统)。建立到指定系统的连接需要以下信息:

    应用服务器名和系统标识。这些信息是必须的。

    网关主机名和网关服务。这些信息是可选的。默认应用服务器上的本地网关就是网关主机名。

The gateway options are useful if the gateway is running on a different host. Another host could be located in another network with a different network card and could have a differing IP-address.

 

如果网关服务运行在不同的主机中,这个选项是很有用的。拥有不同网卡或不同IP地址的主机可以定位到其它主机。

 

The data can be assigned:
• Either via a connection string using the following entries: “… TYPE=3 ASHOST=<host name of application server> SYSNR=<R/3 system number> GWHOST=<optional: gateway host;default: local gateway on application server>
GWSERV=<optional: gateway service; default: local gateway on application server> …”.
• Or via following entries in saprfc.ini file for corresponding destination:
DEST = ...
TYPE = A
ASHOST=<host name of application server>
SYSNR=<R/3 system number>
GWHOST=<optional: gateway host; default: local gateway on application server>

GWSERV=<optional:gateway service; default: local gateway on application server>.

 

数据声明如下:

    一种,通过声明如下连接字符串:“… TYPE=3 ASHOST=<host name of application server> SYSNR=<R/3 system number> GWHOST=<optional: gateway host;default: local gateway on application server>
GWSERV=<optional: gateway service; default: local gateway on application server> …”.
    另一种,在saprfc.ini文件中声明相应的描述信息。

DEST = ...
TYPE = A
ASHOST=<host name of application server>
SYSNR=<R/3 system number>
GWHOST=<optional: gateway host; default: local gateway on application server>

GWSERV=<optional:gateway service; default: local gateway on application server>.

 

 

The host name and service name of the specific application server have to be defined in ‘host’ and ‘service’ files. The service name for the application server has to be defined as follows:
<service name>=sapdp<R/3 system number>.

 

指定服务器的主机名和服务名必须在'host'和service文件中定义。应用服务器的服务名称必须以如下格式声明:

    <service name>=sapdp<R/3 system number>.

The host name and service name of the SAP gateway have to be defined in the ‘host’ and ‘service’ files. The service name for the SAP gateway has to be defined as follows:
<service name>=sapgw<R/3 system number>.

 

SAP网关的主机名和服务名必须在'host'和service文件中定义。SAP网关服务名必须以如下格式定义:

   <service name>=sapgw<R/3 system number>.

 

Please notice: If GWHOST and GWSERV are not used (this is optional), the service name of the SAP gateway has to be defined in the ‘service’ files anymore.

 

 请注意:如果未用到GWHOST和GWSERV(这是选择项),sap网关的服务名不必在'service'文件中声明。

 

 Load balancing feature (Connection type B)负载均衡登录
It is possible to connect to an R/3 system via “Load Balancing” feature. This functionality enables the user to connect to an application server with the minimum load within a group of predefined application servers. This feature has the following advantages:

• The load in an R/3 system is distributed among different application servers
• The application server will be determined at run time. In this case, the RFC connection is independent of a specific RFC server. This improves the flexibility of your RFC application
• Only host name and port number of the R/3 message server will be made known in your system.

 

 一般通过负载均衡方式连接到R/3系统。此功能使用户用预定义组应用服务器连接到应用服务器。此特性拥有如下优势:

    R/3系统的负载被动态分配到不同的应用服务器

    应用服务器可能被终止。假如这样,RFC连接可以不受特定应用服务器限制。这样可以改进你的RFC应用的灵活性。

    你只需要知道R/3信息服务器的主机名和端口号即可。

 

To establish a connection to an R/3 system via Load Balancing the following information is necessary:
• Message Server host name. This information is optional. If no information about host name of message server is available, RFC library tries to retrieve this information from sapmsg.ini file according given system name. The
sapmsg.ini file is usually used by SAP-GUI. If the SAPGUI is not installed on your system, you may copy the sapmsg.ini into your working directory or into Windows-Directory (MS-Windows platforms only) manually.
• Message Server services. This information is optional. Default is sapms<R/3system name>.
• System name. This information is mandatory.
• Application servers group name. This information is optional. The default isthe group ‘PUBLIC’.

 

通过负载均衡建立到R/3系统的连接需要以下信息:

    信息服务器域名。这是可选的。如果没有关于信息服务器的域名信息,RFC库尝试从sapmsg.ini文件中检索与给定系统名称相符的信息。sapmsg.ini文件通过为SAP-GUI使用。如果SAPGUI未安装在当前系统,你可以手动将sapmsg.ini拷贝到你工作路径或Windows目录(仅Windows平台)。

    信息服务器服务。这是可选的,默认为sapms<R/3system name>.
    系统名称。必填项。

    应用服务器组名称。这个可选的。默认为'PUBLIC'组。

 

Please notice: The data could be assigned:
• Either via connection string with following entries: “ … TYPE=3 MSHOST=<message server host name> R3NAME=<system name> MSSERV=<message server service> GROUP=<group of application servers>…”.
• Or via the following entries in the saprfc.ini file for the corresponding destination:
DEST= …
TYPE=B
MSHOST=<message server host name>
R3NAME=<system name>
GROUP=<group of application servers; optional, default ‘PUBLIC’>

 

请注意:以下数据定义:

  一、通过声明以0结束的连接字符串: “ … TYPE=3 MSHOST=<message server host name> R3NAME=<system name> MSSERV=<message server service> GROUP=<group of application servers>…”.
  二、通过在saprfc.ini中声明相应的节点:

DEST= …
TYPE=B
MSHOST=<message server host name>
R3NAME=<system name>
GROUP=<group of application servers; optional, default ‘PUBLIC’>

 

The host name and service name of the message server have to be defined in the ‘hosts’ and ‘services’ files. The service name has to be defined as follows:
<service name>=sapms<R/3 system name>.
The connection string has to have the following entries:“TYPE=3 MSHOST=<message server host name> R3NAME=<system name> GROUP=<group of application servers> …”

 

信息服务器的地址和服务名必须在'host'和'services'文件中定义。定义格式如下:

    <service name>=sapms<R/3 system name>.

 

连接字符串必须以如下格式声明:“TYPE=3 MSHOST=<message server host name> R3NAME=<system name> GROUP=<group of application servers> …”

 

 Logon data
To log on an SAP system the user has to be initialized. The following logon data is needed:
• Client. This entry describes the client in the connect string: CLIENT=000
• Language. Entry describes the logon language has the format: LANG=<ISOLanguage>.
• User identity information

 

连接到SAP系统的用户必须初始化。需要以下信息:

    客户端。在连接字符串中声明:CLIENT=110

    语言。登入语言声明格式如下:LANG=<ISOLanguage>.

    用户标识信息。


The user can be identified via:
• Username and password. Format is: USER=<user name> PASSWD=<password>
• Mysapsso2 certificate. In this case password is not required and user name is optional.
• X509 certificate.
• EXTID data.

 

通过以下信息认证用户:

    用户名密码。格式如下:USER=<user name> PASSWD=<password>
    Mysapsso2证书。此时密码不是必须的并且用户名也是可选的。

    X509证书

    EXTID数据。

 

 

 

原创粉丝点击