Skip to Content
avatar image
Former Member

VBA run-time error '614'

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 05, 2017 at 05:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 06, 2017 at 01:29 AM

    @Stefan Schnell,

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

    SESSION_MANAGER but the code still not work.

    Add comment
    10|10000 characters needed characters exceeded