This is the code that I've been able to create with the help of the internet, here I'm able to see if there's a connection opened in SAP and if not, It'll use my username and pass to login.
My problem lies where I try to check how many sessions is ...