如何使用 JCo 在显式目标上执行 RFC 功能? [英] How to execute RFC function on explicit destination using JCo?

查看:71
本文介绍了如何使用 JCo 在显式目标上执行 RFC 功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 JCo 在显式目标上执行 RFC 函数.

I would like to execute RFC function on explicit destination using JCo.

我已经修改了现有的 JCo StepByStepClient.java 并且我能够以与使用 Sap GUIse37"完全相同的方式执行 RFC 函数,当RFC target sys"字段为.为了我的演示目的,我调用了TH_USER_LIST"函数.

I've modified existing JCo StepByStepClient.java and I'm able to execute RFC function exactly the same way like using Sap GUI "se37" when the "RFC target sys" field is empty. For my demo purposes I was invoking "TH_USER_LIST" function.

然后我使用程序 IDMY_PROG_ID"注册了自己的 JCo 服务器,然后使用sm59"和注册服务器程序"=MY_PROG_ID"添加了 tcpip 目标MY_DEST".

Then I registered my own JCo server with Program Id "MY_PROG_ID", then added tcpip destination "MY_DEST" using "sm59" with "Registered Server Program"="MY_PROG_ID".

我现在可以使用se37"和 RFC 目标 sys =MY_DEST"在我的 JCo 服务器上调用 TH_USER_LIST

I'm now able to invoke TH_USER_LIST on my JCo server using "se37" with RFC target sys = "MY_DEST"

我希望能够使用 JCo 客户端在我的 JCo 服务器上执行 TH_USER_LIST 的相同实现,但我仍在调用默认实现并且不是我注册的程序.

I would like to be able to execute the same implementation of TH_USER_LIST on my JCo server using JCo client but I'm still invoking the default implementation and not mine registered program.

我认为我只需要将目标分配为如下所示的新属性,但它没有帮助

I presumed I just need to assign the destionation as a new property like the ones bellow but it did not help

connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "appserver");
connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  "00");
connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "000");
connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "JCOTESTER");
connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "JCOTESTERSPASSWORD");
connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");

请指教

推荐答案

调用已注册的外部 RFC 服务器程序请阅读

For calling a registered external RFC server program please read

用于所需的目标配置参数.

for the required destination configuration parameters.

您需要指定 jco.client.tpname 而不是 jco.client.ashostjco.client.sysnrjco.client.gwhostjco.client.gwserv.此外,您可能需要另一个目的地到 ABAP 系统来查询所需的 RFC 元数据.这个目的地需要被指定为属性jco.destination.repository_destination.

Instead of jco.client.ashost and jco.client.sysnr you need to specify jco.client.tpname, jco.client.gwhost and jco.client.gwserv. In addition, you probably need another destination to an ABAP system for querying the required RFC meta data. This destination needs to be specified as property jco.destination.repository_destination.

这篇关于如何使用 JCo 在显式目标上执行 RFC 功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆