gpt4 book ai didi

excel - 通过 Excel VBA 在 Citrix 上连接 SAP

转载 作者:行者123 更新时间:2023-12-04 20:58:39 27 4
gpt4 key购买 nike

我的机器上没有直接安装 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 进行连接。
代码(取自 help link ):

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) 完成
您需要调整链接中的代码以满足您的需求

关于excel - 通过 Excel VBA 在 Citrix 上连接 SAP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41543972/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com