JAVA+sapjco3连接SAP的两种Destination的创建方式

java + sapjco3 连接SAP系统,根据SAP GUI的设置,有两种Destination的设置方式。

1. Custom Application Server 

   SAP GUI连接属性如下图:


  登陆时输入如下图:


则sapjco的Destination应如下设置:

Properties connectProperties = new Properties();
		connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "10.10.10.10");// Application Server
		connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "02"); // Instance Number
		connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "100"); // Client
		connectProperties.setProperty(DestinationDataProvider.JCO_USER, "abc"); // User
		connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "123456"); // Password
		connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en"); // Logon Language

2.Group/Server Selection

SAP GUI连接属性如下图:


则sapjco的Destination应如下设置:

		Properties connectProperties = new Properties();
		connectProperties.setProperty(DestinationDataProvider.JCO_R3NAME, "CQQ"); // System ID
		connectProperties.setProperty(DestinationDataProvider.JCO_MSHOST,"abc.aaa.cn"); // Message Server
		connectProperties.setProperty(DestinationDataProvider.JCO_MSSERV,"3610"); // Message Server
		connectProperties.setProperty(DestinationDataProvider.JCO_GROUP,"PUBLIC"); // Group/Server
		connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT,"100"); 
		connectProperties.setProperty(DestinationDataProvider.JCO_USER, "abc");
		connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "123456");

具体DestinationProvider的含义在api文档里有说明,可以参照。

虽然并没有连接的例子。

api 文档+官方例子下载:点击打开链接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值