繁体   English   中英

通过 Excel VBA 在 Citrix 上连接 SAP

[英]Connect SAP on Citrix through Excel VBA

我的机器上没有直接安装 SAP,并通过下面的链接使用 SAP 窗口。

https://nedc-ctx.applications.services.axa-tech.intraxa/Citrix/AccessPlatform/auth/loggedout.aspx

我知道 SAP GUI 的 Record and Run 功能并且正在工作。 我仅在培训版本中具有此访问权限。 在生产中,我无法使用运行和记录选项。

如何从 Excel VBA 打开 SAP 窗口、连接和加载数据?

在下面的代码中,我得到一个错误。

我发现我无法在我的机器上添加参考文件“sapfewse.ocx”。

如果我们通过上面提供的链接访问 SAP,是否可以通过 Excel VBA 连接 SAP。 单击上面的链接后,新的弹出窗口将与 SAP with window 连接。 SAP 正在通过 Citrix 进行连接。

代码(取自此帮助链接):

Set SapGuiAuto  = GetObject("SAPGUI") 'Get the SAP GUI Scripting object
Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI 
Set SAPCon = SAPApp.Children(0) 'Get the first system that is currently connected
Set session = SAPCon.Children(0) 'Get the first session (window) on that connection

'Start the transaction to view a table
session.StartTransaction "SE16"

您提供的代码只有在您的计算机上安装了 SAP GUI 时才有效。 我建议询问 IT 团队是否可以为您提供服务器地址,以便您可以使用远程函数调用来自动检索数据。 这可以通过 VBA ( https://archive.sap.com/discussions/thread/129358 ) 完成 您需要调整链接中的代码以满足您的需求

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM