I need the code to recognize the open session in SAP to start woking on it.
I already have the code to access SAP since the begining (introducing user and password) I am not looking for it. In fact that code is every where.
The situation is this:
Before anything, I am going to ask the user to enter his SAP System and his user.
Once he entered the data the code verifies that there is a session already logged in with that information so now he is able to run a T-code and if it's not, it will show a message telling it didn't find the session.
THE CODE DOESN'T ASK PASSWORD because the user has already logged in SAP before he use the code. The code just verify that the session matches the user and the system that we already gave and set it as the session. (e.g: Session = mySession)
So then I can follow with the script.
[login to view URL]("wnd/tbar/okcd").text = "MY T-CODE"
[login to view URL]("wnd").sendVKeys(0)