on ‎2016 Nov 09 2:34 PM - last edited on ‎2024 Feb 03 6:19 PM by postmig_api_4
Perhaps someone with experience in SAP GUI and VBScripts can help me.
I am trying to run the following VBScript in SAP GUI
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection= application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session,"on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text="cv04n"
session.findById("wnd[0]").sendVkey 0I keep getting the error: The server threw an exception. Code: 80010105
This error is in this line: session.findById("wnd[0]").maximize
Can the server block my scripts?
The SAPGUI scripts are enable in the SAP GUI configuration, but when i try to record one it doesn't record and the symbol down in the window always says that script is running but nothing happens and doesn't record anything to the .vbs file. When i try to run my script inside the GUI the same happens and it will stay running but nothing happens.
Thank you very much.
Request clarification before answering.
Hello Pedro,
execute the report RSPARAM in the SE38 and set the filter for the parameter name to *script* and you will find a few backend parameters which controls the SAP GUI Scripting. Look at sapgui/user_scripting - should be true, sapgui/user_scripting_disable_recording - should be false, sapgui/user_scripting_force_notification - should be false, sapgui/user_scripting_set_readonly - should be false and sapgui/user_scripting_per_user - better false, otherwise you need explicite rights.
Cheers
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Are you running the script through SAP BPA?
Regards Gerben
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have the same problem. What was the solution for your problem?
best regards
Yvonne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.