Skip to Content
avatar image
Former Member

is it possible to automate opening the GuiMainWindow

Hello all,

I'm new to SAP ..

I'm looking for a way to open the GuiMainWindow

the one you get after to login.

Below is a simple console script written in, that auto populates my login details.

Can anyone suggest what com object / code is required to take me to the next screen?

Imports SAPBAPIControlLib
Imports SAPTableFactoryCtrl

Module Module1

    Sub Main()
        Dim bapi As Object
        Dim connection As Object

        bapi = CreateObject("SAP.Functions")
        connection = bapi.connection

        connection.User = "username"
        connection.Password = "password"
        connection.client = "500"
        ' connection.Destination = "R/3"

        If (connection.logon(0, False)) Then
            'Console.WriteLine("Your connection was successfuly made... ")

      ' call the form to load?

        End If

    End Sub

End Module


I also have a similar one in VBS.

Set oBAPICtrl = CreateObject("SAP.BAPI.1")

'Creating Connection object
Set oConnection = oBAPICtrl.Connection
oConnection.Client = "500"
oConnection.User = "username"
oConnection.Language = "EN"
oConnection.ApplicationServer = "ipaddress"
oConnection.Password = "password"
oConnection.SystemNumber = "00"
'Performing a remote logon to the R/3 System
If oConnection.Logon(0, True) <> True Then    'Logon with dialog
      Set oConnection = Nothing
      Logon = False
      MsgBox ("No access to R/3 System")
     Logon = True
End If
If Logon Then
 MsgBox "Logged on successfullyu2026"
End If

the vbs one successfully authenticates, so i could run background processes, but I just want to show the guiMainForm for now.

Is this possible?

many thanks.

Edited by: VBDevGuy on Aug 20, 2010 11:26 AM

Edited by: VBDevGuy on Aug 20, 2010 12:23 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 20, 2010 at 10:53 AM

    its OK, i've found the html help file with samples.

    thanks anyway

    Add comment
    10|10000 characters needed characters exceeded