简体   繁体   English

SAP 查询 64 位 WIN 和 OFFICE 上的 RFC 连接“ActiveX 组件无法创建对象”

[英]SAP query RFC connection on 64bit WIN and OFFICE “ActiveX component can't create object”

We used to use RFC connection in excel (VBA) from SAP query with object "SAP.LogonControl.1" on 32 bit WIN and OFFICE.我们曾经在 32 位 WIN 和 OFFICE 上使用对象“SAP.LogonControl.1”的 SAP 查询在 excel (VBA) 中使用 RFC 连接。 Now we installed 64 bit version of WIN and OFFICE and we have a problem with "ActiveX component can't create object".现在我们安装了 64 位版本的 WIN 和 OFFICE,我们遇到了“ActiveX 组件无法创建对象”的问题。 Here is the line, where it was fall: Set functionCtrl = CreateObject("SAP.LogonControl.1") Somebody some solution?这是它所在的行: Set functionCtrl = CreateObject("SAP.LogonControl.1") 有人解决办法吗? Installation to 32bit is unwanted.不需要安装到 32 位。

Please see SAP note 1442028: SAP GUI for Windows - Support for Office 64bit editions.请参阅 SAP 说明 1442028:适用于 Windows 的 SAP GUI - 支持 Office 64 位版本。

By default 64bit programs cannot load 32bit programs.默认情况下,64 位程序无法加载 32 位程序。 Since SAP GUI for Windows is a 32bit program, which is also true for its Active libraries like LogonControl, it is not compatible with 64bit Office.由于适用于 Windows 的 SAP GUI 是 32 位程序,它的活动库(如 LogonControl)也是如此,因此它与 64 位 Office 不兼容。 Alternatively you can use 32bit Office on a 64bit Windows.或者,您可以在 64 位 Windows 上使用 32 位 Office。

There are workaounds via DLL surrogates, but they require changes to the registry and might not be stable longterm.有通过 DLL 代理的解决方法,但它们需要更改注册表并且可能长期不稳定。

We found a solution.我们找到了解决方案。 We use SAPGUI 7.50, repair some registy (surrogate) and use SAP.Function instead of SAP.LogonControl.1.我们使用 SAPGUI 7.50,修复一些注册表(代理)并使用 SAP.Function 而不是 SAP.LogonControl.1。 Thats all.就这样。 It works.有用。 Here are our registry changes:以下是我们的注册表更改:

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}]
@="SAP Remote Function Call"
"AppID"="{5B076C03-2F26-11CF-9AE5-0800096E19F4}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\Control]
@=""

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\InprocServer32]
@="c:\\program files (x86)\\sap\\frontend\\sapgui\\wdtfuncs.ocx"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\MiscStatus]
@="0"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\MiscStatus\1]
@="132241"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\ProgID]
@="SAP.Functions"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\ToolboxBitmap32]
@="c:\\program files (x86)\\sap\\frontend\\sapgui\\wdtfuncs.ocx, 1"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\TypeLib]
@="{5B076C00-2F26-11CF-9AE5-0800096E19F4}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\Version]
@="5.0"

[HKEY_CLASSES_ROOT\WOW6432Node\AppID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}]
"DllSurrogate"=""

Date: 2020-11-26 There is a SAP Support OSS Note ('2724656'), Where SAP is saying they are not supporting Office 64 bits till next year (2021) with the arrival of SAPgui 770 (Thus NOT yet with SAPgui 760)日期:2020-11-26 有一个 SAP Support OSS Note ('2724656'),其中 SAP 表示他们不支持 Office 64 位,直到明年(2021 年)随着 SAPgui 770 的到来(因此还没有 SAPgui 760 )

The Surrogate solution provided above works fine with both SAPgui 750 and 760 but it covers only 1 of the actual 4 ActiveX controls上面提供的代理解决方案适用于 SAPgui 750 和 760,但它仅涵盖实际 4 个 ActiveX 控件中的一个

Here is the full solution for the 4 Controls if you have them in same path as here below:这是 4 个控件的完整解决方案,如果您将它们放在与下面相同的路径中:

c:\program files (x86)\sap\frontend\sapgui\wdtaocx.ocx  (SAP Table Factory)
c:\program files (x86)\sap\frontend\sapgui\wdobapi.ocx  (SAP BAPI Control)
C:\Program Files (x86)\Common Files\SAP Shared\wdtlog.ocx  (SAP Logon Control)
c:\program files (x86)\sap\frontend\sapgui\wdtfuncs.ocx  (SAP Remote Function Call Control)

Solution, create a *.reg file and Merge it to your Windows Registry: (do this first on a test system) - Content of the *.reg file:解决方案,创建一个 *.reg 文件并将其合并到您的 Windows 注册表:(首先在测试系统上执行此操作) - *.reg 文件的内容:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}]
@="SAP BAPI"
"AppID"="{2E9A4698-F0EE-11CF-AC55-080009D213D2}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}]
@="SAP Remote Function Call"
"AppID"="{5B076C03-2F26-11CF-9AE5-0800096E19F4}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}]
@="SAP Logon Control"
"AppID"="{B24944D6-1501-11CF-8981-0000E8A49FA0}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}]
@="SAP Table Factory"
"AppID"="{87D2850E-6B43-101C-92CE-10005AF5DF4D}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\Control]
@=""

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\Control]
@=""

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\Control]
@=""

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\Control]
@=""

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\InprocServer32]
@="c:\program files (x86)\sap\frontend\sapgui\wdobapi.ocx"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\InprocServer32]
@="c:\program files (x86)\sap\frontend\sapgui\wdtfuncs.ocx"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\InprocServer32]
@="C:\Program Files (x86)\Common Files\SAP Shared\wdtlog.ocx"
"ThreadingModel"="both"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\InprocServer32]
@="c:\program files (x86)\sap\frontend\sapgui\wdtaocx.ocx"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\MiscStatus]
@="0"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\MiscStatus\1]
@="131474"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\MiscStatus]
@="0"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\MiscStatus\1]
@="132241"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\MiscStatus]
@="0"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\MiscStatus\1]
@="135569"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\MiscStatus]
@="0"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\MiscStatus\1]
@="132498"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\ProgID]
@="SAP.BAPI.1"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\ProgID]
@="SAP.Functions"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\ProgID]
@="SAP.LogonControl.1"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\ProgID]
@="SAP.TableFactory.1"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\ToolboxBitmap32]
@="c:\program files (x86)\sap\frontend\sapgui\wdobapi.ocx, 200"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\ToolboxBitmap32]
@="c:\program files (x86)\sap\frontend\sapgui\wdtfuncs.ocx, 1"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\ToolboxBitmap32]
@="C:\Program Files (x86)\Common Files\SAP Shared\wdtlog.ocx, 1001"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\ToolboxBitmap32]
@="c:\program files (x86)\sap\frontend\sapgui\wdtaocx.ocx, 2002"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\TypeLib]
@="{2E9A4698-F0EE-11CF-AC55-080009D213D2}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\TypeLib]
@="{5B076C00-2F26-11CF-9AE5-0800096E19F4}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\TypeLib]
@="{B24944D6-1501-11CF-8981-0000E8A49FA0}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\TypeLib]
@="{87D2850E-6B43-101C-92CE-10005AF5DF4D}"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}\Version]
@="1.2"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}\Version]
@="5.0"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{B24944D6-1501-11CF-8981-0000E8A49FA0}\Version]
@="1.1"

[HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}\Version]
@="1.1"

[HKEY_CLASSES_ROOT\WOW6432Node\AppID\{2E9A4698-F0EE-11CF-AC55-080009D213D2}]
"DllSurrogate"=""

[HKEY_CLASSES_ROOT\WOW6432Node\AppID\{5B076C03-2F26-11CF-9AE5-0800096E19F4}]
"DllSurrogate"=""

[HKEY_CLASSES_ROOT\WOW6432Node\AppID\{B24944D6-1501-11CF-8981-0000E8A49FA0}]
"DllSurrogate"=""

[HKEY_CLASSES_ROOT\WOW6432Node\AppID\{87D2850E-6B43-101C-92CE-10005AF5DF4D}]
"DllSurrogate"=""

As of February 2021, SAP have finally released a 64 bit version of the NWRFC controls that allow direct use within 64bit MS Office.截至 2021 年 2 月,SAP 终于发布了 64 位版本的 NWRFC 控件,允许在 64 位 MS Office 中直接使用。 This was included with the 770 GUI, that is now widely available and on a stable patch 3 as of July 2021. SAP GUI 770 release .这包含在 770 GUI 中,现在广泛可用,并且在 2021 年 7 月发布了稳定的补丁 3。SAP GUI 770 版本 This means that the Surrogate solution in earlier answers is no longer needed!这意味着不再需要早期答案中的代理解决方案!

This Note 2724656 has some information on NWRFC, but this is what you need to know:这个 Note 2724656有一些关于 NWRFC 的信息,但这是你需要知道的:

If NWRFC is correctly installed then there will be a set of the four .ocx controls installed on the C:\\Program Files\\SAP\\FrontEnd\\SAPgui folder, eg wdtfuncs.ocx .如果 NWRFC 安装正确,那么将在C:\\Program Files\\SAP\\FrontEnd\\SAPgui文件夹中安装一组四个 .ocx 控件,例如wdtfuncs.ocx Note that there will be an identically named 32bit control in the C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui folder also.请注意, C:\\Program Files (x86)\\SAP\\FrontEnd\\SAPgui文件夹中也会有一个同名的 32 位控件。

Office 64bit VBA should pick up the new controls automatically, but to be sure, in VBA, open "References", and ensure that the controls show the path to the 64bit folder (or Edit/Add a reference to the .ocx controls). Office 64 位 VBA 应自动选取新控件,但可以肯定的是,在 VBA 中,打开“引用”,并确保控件显示 64 位文件夹的路径(或编辑/添加对 .ocx 控件的引用)。

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

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