cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to already active SAPgui instance C#

Former Member
0 Kudos

I've written a C# program to automate some processes.  Currently, the only way that the program can be run is if a user is not already logged into the SAP environment, or if they terminate any existing connections.

With C#, am I able to detect an already running instance of the gui and create a new session from the already existing connection?

Thanks,
Steve

Accepted Solutions (1)

Accepted Solutions (1)

former_member213011
Participant
0 Kudos

I dont know much about C# but this is possible in VB. You can use GuiApplication.Connections.Count to check for existing connections. If it is zero then create a new Connection. If it is only one, then GuiConnection = GuiApplication.Children(0).

Answers (0)