Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SAPGuiSession get the active SAPGuiWindow dynamically
#1
Solved: 10 Years, 10 Months ago
Hello everybody!

I need to set the actual window of a SAPGuiSession dynamically.

For example:
I'm calling a transaction by entering the transaction code in the OKCode-Field and pressing the Continue-Button.
Then, I'm in a transaction (the transaction codes are saved in a data table) and need to press the back button (F3). But I need to know the name of the window I'm in.

Take a look at the following:

Code:
SAPGuiSession("SAP").SAPGuiWindow("XYZ")

I need to get the SAPGuiWindow("XYZ") dynamically. I've tried different things but without any success. Can anybody help me please.

Regards

Chris
#2
Solved: 10 Years, 10 Months ago
If I understand you question correctly....
We can use "ActiveWindow" method which will fetch the active window object. Then we have to use the "Text" method on the window object to get the name of the active window.
Code:
Set oActiveWindow = SAPGuiSession("SAP").ActiveWindow
Msgbox oActiveWindow.Text
Thanks,
SUpputuri
#3
Solved: 10 Years, 10 Months ago
Hello supputuri!

Thanks a lot. That hint did it for me. It works!

Thanks!!!!Big Grin

Greetings

Chris


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using SAPGuiTable).SetCellData to Active cell. rhozeski 2 2,289 02-10-2020, 10:44 PM
Last Post: rhozeski
  How to dynamically find the OracleFormWindow? arpan 0 1,776 04-26-2017, 12:45 AM
Last Post: arpan
  How to click on all links dynamically in UFT? Rohan 9 18,525 02-25-2016, 10:42 AM
Last Post: vinod123
  How to Verify Static Object Text which is changing Dynamically with Expected Result johnny77 0 3,308 06-25-2015, 11:32 AM
Last Post: johnny77
  Dynamically run QTP script on multiple servers arpan 8 7,070 06-21-2013, 06:34 PM
Last Post: arpan

Forum Jump:


Users browsing this thread: 1 Guest(s)