You can use the SAPGuiutil object to open connections. All you need to do is to pass the server name taht you want to log into followed by userid and password. Please find the below code
Sapguiutil.OpenConnection “A:Test Server”
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("User").Set UserID
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Password").SetSecure Password
SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiButton("Enter").Click
No comments:
Post a Comment
Note: only a member of this blog may post a comment.