cancel
Showing results for 
Search instead for 
Did you mean: 

A Questions About the Integration of SAP GUI Scripting in NWBC

stefan_schnell
Active Contributor
0 Kudos

Hello NWBC developers and community,

I use SAP GUI Scripting very much and at the moment I test the possibilities of SAP GUI Scripting with NWBC 4.0 PL4.

First of all, it works very well, congratulation to the developers.

And now my question:

If I open a second NWBC Client window and use the method Connections from the Application object with the property Count, I get not more than one connection. Is this a bug or is it necessary to use another property or method to get this kind of information? SAP GUI Scripting uses only the first NWBC Client window.

Here my VBScript code:

Set SapGuiAuto  = GetObject("SAPGUISERVER")

Set application = SapGuiAuto.GetScriptingEngine

Set conCol = application.Connections()

conCount = conCol.Count()

MsgBox CStr(conCount)

Here a snapshot:

Thanks for answers and hints.

Cheers

Stefan

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

dear expert please help me, am trying to connect NWBC and pop up with message as per the attachment and no connection/session identified in the tracker screen now suggest me what step i should next..

stefan_schnell
Active Contributor
0 Kudos

Hello Bibhash,

Scripting Tracker informs you that there are 2 instances of the SAPGUIServer in the Running Object Table (ROT). You can choose Yes or No, Scripting Tracker analyze only the first entry. If you press No you will not see the hint anymore for this execution.

Best regards
Stefan

Former Member
0 Kudos

Hi Stefan,

I found your question while I looked for the string in GetObject("SAPGUISERVER") for the NWBC. Thank you for this information.

To your question:

In the SAPGUI, if you opens a new window, you get a new session in the given connection. Only if you logon to another system you get a new connection. Your sceenshot looks like you have a new session. This would be the normal behavior.

GuiApplication.Connections().Sessions()

I hope this helps.

Cheers

Hans-Dieter

stefan_schnell
Active Contributor
0 Kudos

Hello Hans-Dieter,

thanks for your answer, but the image shows two open NWBC for Desktop connections with four open sessions. With SAP GUI Scripting you can get only the first connection with the two open sessions, the second connection is complete invisible for the SAP GUI Scripting.

Cheers

Stefan

obaid_ullah2
Explorer
0 Kudos

What about integration of Business client 6 and scripting API?

stefan_schnell
Active Contributor
0 Kudos

Hello Obaid,

SAP GUI Scripting works in the context of NWBC 6.0 PL 1 perfect, for more information look here.

Cheers

Stefan

stefan_schnell
Active Contributor
0 Kudos

Hello community,

I check the same question as above with NWBC for Desktop 5.0 PL2 and the actual SAP GUI Scripting 7.40 engine, it shows the same behaviour - the SAP GUI Scripting detects only the first connection.

So is the question above still valid.

Thanks for answers and hints.

Cheers

Stefan