Micro Focus QTP (UFT) Forums
How to access multiple SAP sessions by script? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to access multiple SAP sessions by script? (/Thread-How-to-access-multiple-SAP-sessions-by-script)



How to access multiple SAP sessions by script? - Osprey - 06-24-2010


Hi,

I'm building a script in QTP that performs changes in a SAP web dynpro based solution, and this triggers updates in 4 different SAP systems. Next step in the script is to log onto these 4 SAP systems and check if the changes have been performed locally. But I'm having trouble accessing the SAP systems; the GUI is started, but QTP does not catch the system called, so the logon screen does not appear, and the script halts.

I've worked with the Record & run settings, and currently I have them set to 'Record and run test on any open [application]'.

I have tried two approaches: splitting the test up in bits (as per system) and trying to tie these into a sequence, but I cannot make it work.
The other solution is to have the entire test in one script, I kinda prefer this solution. But it does not work yet...

Any ideas? How would you do this?


Thanks in advance,
/Osprey


RE: How to access multiple SAP sessions by script? - Osprey - 06-24-2010

I found the solution myself, simply by adding an auto logon:

Code:
SAPGuiUtil.AutoLogon "[SAP system description]", SAP client, "user", "[password]", "[language]"
Using this function launches an SAP logon Smile

/Osprey