Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

SAP GUI Scripting API C# Broken after update 7.40 -> 7.70


My C# program was working fine with 7.40. After I updated to 7.70 the program no longer is able to start SAP.

This is the basics of the program. In 7.40 the "new GuiApplication()" launched SAP Easy Access. In 7.70 it does not. Instead, it closes my own program, without any error or even leaving anything to the try catch.

using SAPFEWSELib;
using SapROTWr;

public static class SAP
	public static GuiApplication SapApplication { get; set; }
	public static GuiConnection SapConnection { get; set; }
	public static GuiSession SapSession { get; set; }

	public static void Open()
		SapApplication = new GuiApplication();
		SapConnection = SapApplication.OpenConnection(connectString, Sync: true);
		SapSession = (GuiSession)SapConnection.Sessions.Item(0);
	public static void Login()
The library does work as long as SAP is already open. I can connect to it with:
sapGUIROT = sapROTWrapper.GetROTEntry("SAPGUI");
SapApplication = (GuiApplication)sapGUIROT.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, sapGUIROT, null);
SapConnection = SapApplication.OpenConnection(connectString, Sync: true);
SapSession = (GuiSession)SapConnection.Sessions.Item(0);
Any idea what might have changed 7.40 -> 7.70, or what might be the problem?
  • SAP Managed Tags:

0 Kudos

This has happened with me as well, script used to work fine with SAP 7.7 but it stopped working after upgrade to sap 8.0 can someone please help me here

P.S: Enabled scripting and accessibility options as well.

  • SAP Managed Tags: