Skip to Content
0

VBA run-time error '614'

Nov 05, 2017 at 06:22 AM

313

avatar image
Former Member

when i run above code the error pop up, in watch list, the object's children count is 0,

what happened?

vedcc.png (9.3 kB)
cbrdq.png (7.1 kB)
delzs.png (14.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Stefan Schnell
Nov 05, 2017 at 05:03 PM
0

Hello Tim,

welcome in the SAP Community.

To use your code you must open an SAP session manually. With the code

Sub szz()

  Set SAPGuiAuto = GetObject("SAPGUI")
  Set SAPApplication = SAPGuiAuto.GetScriptingEngine
  Set SAPConnection = SAPApplication.Children(0)
  Set asession = SAPConnection.Children(0)

End Sub

you want to connect explicite to the connection 0 and the session 0, which means the first session of the first connection - counting starts at zero. If you open a session to an SAP system your code should work.

Best regards
Stefan

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 06, 2017 at 01:29 AM
0

@Stefan Schnell,

i am sure i opened a session and the screen stay on

SESSION_MANAGER but the code still not work.


xjiiu.png (123.7 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Tim,

please use TAC SA38 with the program RSPARAM and look at the parameters sapgui/user_scripting, they must be set like this:

Best regards
Stefan

001.jpg (35.1 kB)
0