cancel
Showing results for 
Search instead for 
Did you mean: 

How to return the window/screen name in GUI scripting

0 Kudos

I'm starting out with SAP GUI scripting.  I'm driving the scripts from Excel, which works well.  I haven't found a reference book that explains the objects, methods and properties available in SAP GUI scripting so I do a lot by trial and error, guessing at what I think the property might be.  One of the issues that I have run into is that when I look up a document using FBV3, the resulting screen can be different.  I don't understand what is driving the difference (vendor type, document type, company code ???).  I need to grab a field off of the window, but the field will be referenced different depending on the type of window that come up.

Is there a way with GUI script to read the name of the window so that I know which field reference to use to get the field that I want?

Thanks,

Tyler

Accepted Solutions (0)

Answers (2)

Answers (2)

rspecht
Explorer
0 Kudos

You also can use

session.ActiveWindow.Text

Regards

Rüdiger

holger_khn
Contributor
0 Kudos

Hello.


session.findById("wnd[0]").Name

Or if you have a Dialog popup it can be:


session.findById("wnd[1]").Title

Best regards,

Holger