网站大量收购独家精品文档,联系QQ:2885784924

2.3.3 - 通过java语言进行bapi调用(2.3.3 - Bapi calls through the Java language).doc

2.3.3 - 通过java语言进行bapi调用(2.3.3 - Bapi calls through the Java language).doc

  1. 1、本文档共11页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2.3.3 - 通过java语言进行bapi调用(2.3.3 - Bapi calls through the Java language)

2.3.3 - 通过java语言进行bapi调用(2.3.3 - Bapi calls through the Java language) / / 载入所需的类库: import com.sap.rfc. *; import com.sap.rfc.exception. *; import com.ibm.sap.bapi. *; import com.ibm.sap.bapi.generated. *; / / 连接sap系统 private static irfcconnection establishconnection (middlewareinfo amiddlewareinfo) throws jrfcremoteexception { irfcconnection aconnection = null; connectinfo aconnectinfo = null; userinfo auserinfo = null; amiddlewareinfo.getorbservername orbservername = (string); boolean badjusted = true; if (! badjusted) { throw (new jrfcrfcconnectionexception ( please adjust the connection parameters to your needs -! )) ; } / / 连接信息: 调整为所需要输入的值 aconnectinfo connectinfo (= new 3, / / int rfc模式 3 or 2 / 3 = r = r / 2 null, / / string rfc目标 9.7.12.7 / / string 主机名 (ip地址) 0, / / int 系统编号 null, / / string 网关主机 null, / / string 网关服务 null, / / string 系统名 null, / / string 服务器组名 null, / / string 消息服务器 负载平衡选项 boolean false, / / true); / / boolean 权限检查选项 / / 用户信息 auserinfo userinfo (= new muster, / / string 用户名 ides / / string 密码 800, / / string 集团 the e / / string 登录语言 代码页 int); / / 1103 / / technical conversion for the selected middleware; / / 打开连接open connection: irfcconnectionfactory aconnectionfactory = factorymanager.getsingleinstance.getrfcconnectionfactory () (); aconnection = aconnectionfactory.createrfcconnection (aconnectinfo, auserinfo); aconnection.open (); / / 返回连接 aconnection return; } / / 调用main方法 public static void main (java.lang.string args []) / / 通过所指定的中间件设定连接选项 { middlewareinfo amiddlewareinfo = new middlewareinfo (args); factorymanager afactorymanager = factorymanager.getsingleinstance (); afactorymanager.setmiddlewareinfo (amiddlewareinfo); / / 初始化连接连接对象 irfcconnection aconnection = null; try { aconnection = establishconnection (amiddlewareinfo); } catch (exception ex) { system.out.println (error: could not create connection: + ex); system.exit (- 1); } system.out.println (connection established.); / / - - - 测试代码段开始 ------------------------------------

您可能关注的文档

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档