Skip to Content
0

How to login SAP without single signon through vb.net

Jan 13, 2017 at 05:55 PM

57

avatar image

How to login SAP without single signon through vb.net, i have used below code but got below err msg can you able to help on this.

Error message:

An unhandled exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll

Additional information: Cannot create ActiveX component.

Code used:

Dim application AsObject

Dim SapGui AsObject

Dim connection AsObject

Dim session AsObject

application = CreateObject("SAPGUI.ScriptingCtrl.1")

SapGui = GetObject("SAPGUI")

application = SapGui.GetScriptingEngine

connection = application.OpenConnection("**", True)

session = connection.children(0)

session.findById("wnd[0]/usr/txtRSYST-BNAME").text = "**"

session.findById("wnd[0]/usr/pwdRSYST-BCODE").text = "**"

session.findById("wnd[0]").sendVKey(0)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

S Sriram Jan 13, 2017 at 07:51 PM
0

Hi Nagarajan.

1. Could you refer the Link - http://stackoverflow.com/questions/13130176/how-do-i-automate-sap-gui-with-c-sharp

2. You can use the .Bat or .CMD file to logon SAP system.

BR

Share
10 |10000 characters needed characters left characters exceeded