Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor
0 Kudos
With the parallel using of the SAP GUI for Windows and the NetWeaver Business Client (NWBC) for Desktop, the connection ID is not longer an unique criterion. As you can see it exists double, on the one hand in the context of the SAPGUI object and on the other hand in the context of the SAPGUISERVER object. So it is necessary to differentiate also with the object.

If you use the SAP GUI for Windows and NWBC parallel and you call in a script the method GetScriptingEngine, after GetObject with SAPGUISERVER - the DisplayName of the NWBC - , the entry of SAPGUISERVER is doubled on a SAPGUI entry. Thus you have the problem, if you run SAP GUI for Windows and NWBC at the same time, that you can't differentiate clearly between the SAPGUI objects from the ROT, because it exists twice by name. The DisplayName is in this case not unique. You have two entries with an equal DisplayName at the same time. I try it with the SAP GUI for Windows 7.40 PL 5 and the NWBC 5 PL 9.

Let me describe this problem on another perspective:

  1. Here the ROT if I run one instance from ABAP in Eclipse

  2. Here VBScript test code

    Option Explicit

    '-Global Variables------------------------------------------------------
    Dim SapGuiAuto, application

    If Not IsObject(application) Then
    Set SapGuiAuto = GetObject("SAPGUISERVER")
    Set application = SapGuiAuto.GetScriptingEngine
    End If

    MsgBox "Stop"



  3. Here the ROT when the message box pop upAs you can see, with the command GetScriptingEngine exists an SAPGUI object additionally. In this case you have no chance to differentiate between this SAPGUI object and an SAPGUI object from the SAP Logon.

Hint: The problem which I described here is also present.

All in all it is better, from the perspective of the SAP GUI Scripting, to use SAP GUI for Windows and NWBC not parallel and to open only one instance of the NWBC at the same time. For multiple running instances it seems that the ROT only returns the same instance if they are similar.
1 Comment
Labels in this area