cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Script Multiple Sessions

tirusu
Explorer
0 Likes
330

So I have the following scenario:

I logon to SAP GRP (which has scripting disabled). From this session, I am able to open another session, EP1 (which has scripting enabled). I'm accessing EP1 THROUGH the GRP system.

Is there a way to connect the script to EP1?

using standard connection code:

Set oSapGuiAuto = GetObject("SAPGUI")
Set oGuiApplication = oSapGuiAuto.GetScriptingEngine
If oGuiApplication.Connections.Count > 0 Then
    Set oConnection = oGuiApplication.Children(0)
    If oConnection.Sessions.Count > 0 Then
        Set Session = oConnection.Children(0)
    End If
End If

is not working, since it will not find the open session to EP1.

Accepted Solutions (0)

Answers (0)