cancel
Showing results for 
Search instead for 
Did you mean: 

Popup box text

Former Member
0 Kudos

Is there a way to get the exact text from a popup? i.e. Session.findbyid("wnd[1]").Text only gets the title of the popup.  Also counting the number of push buttons will not work for my scenarion to identify the popup box.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Using the SAP script recorder and Hit Test should get you around this.

But just started a Q as:

SAPGUI scripting API message handling

Former Member
0 Kudos

Hello Todd,

you can get the exact text from a popup by using this code:

RowOne= Trim(session.findById("wnd[1]/usr/txtMESSTXT1").text)

RowTwo= Trim(session.findById("wnd[1]/usr/txtMESSTXT2").text)

(in SAP version 7.20)

Counting the numbers of push buttons will follow tomorow.

Kind Regards,

netkid

Former Member
0 Kudos

Here is the popup it does not work on.

Former Member
0 Kudos

Oh, I didn't recognize you're not using the FI-Modul.

I don't know this example will help you (no guarantee).

As I promised the code for the buttons (in FI-Modul):

Hint: First you have to focus the first line, to go on in this popup
session.findById("wnd[1]/usr/txtMESSTXT1").setFocus

session.findById("wnd[1]/tbar[0]/btn[0]").press     'Button "Continue"
session.findById("wnd[1]/tbar[0]/btn[12]").press    'Button "Cancel"

You have to test it.

Or you start the SAP script recorder and create this popup.

Then you push one button and you'll see then it's exact code.

Hope this will help you.

Bye, netkid