cancel
Showing results for 
Search instead for 
Did you mean: 

GUI Scripting Engine Type Mismatch

Former Member
0 Kudos

Hello everyone,

We've got an external CRM system that invokes a (relatively!) simple piece of Visual Basic 6 code that uses SAP GUI Scripting to invoke VA01, fill in the details on the first screen, and then put the relevant Sold To number on the next screen. When the user saves the order, the VB6 app reads the message and extracts the order number, storing it in the CRM system.

We've just installed everything on a new PC, and the scripting doesn't work on it. I have created a debugging version of the VB6 program, and it is executing the lines:

Set oSAPGui = GetObject("SAPGUI")

Set m_oGuiApp = oSAPGui.GetScriptingEngine

The second line is coming back with a Type Mismatch error (Err.Number 13 in VB6)

The app server is definitely okay - it is working for other people and I checked using transaction RZ11 just to be sure.

The SAP GUI Front End seems to be okay - I went to the options under "Scripting -> User Settings" and it says "Scriptng is installed!" and the "Enable Scripting" checkbox is definitely checked. I've checked wdtfuncs.ocx, and it's registered - I registered it again anyway - and comparing the C:\Program Files\SAP\SAPgui\FrontEnd directory with a PC that it does work on shows no differences apart from a wdtfuncs.oca on the working PC, and a "changed" wdobapiU.ocx and wdtlogU.ocx (for which the versions are the same anyway).

We are using VB6, and we have SAP GUI 640 FInal Release, File Version 6403.3.11.2963, Build 760892, Patch Level 11

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi David,

Don't know if you solved this yet but you don't specify how you declared the m_oGuiApp object. Is it defined as type Object or something else?

Randy

Former Member
0 Kudos

Thanks for the query, Randy - reminded me that I needed to come back here and update the thread. The m_oGuiApp object was defined as an Object.

The problem seems to have been an problem somewhere with the SAP GUI installation - althoguh SAP GUI seemed to work perfectly fine logging on and navigating around, this wasn't working until I uninstalled the whole thing and re-installed it with our deployment software, and then it was okay. Thanks for checking!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

Don't know if you solved this yet but you don't specify how you declared the m_oGuiApp object. Is it defined as type Object or something else?

Randy