cancel
Showing results for 
Search instead for 
Did you mean: 

SAP GUI Scripting. How To get values in View Selection window?

0 Kudos
4,319

Hello,

I'm wiriting a script that requires me to verify the selected row value in a view selector. I get the rows selected fine with GetAbsoluteRow(0) etc. But now I would need to verify the view associated with that specific row.

Is there any way for me through a script to access the description of that row in a view selector.

For instance:

If session.findById("wnd[1]/usr/tblSAPLMGMMTC_VIEW").GetAbsoluteRow(0).Text = "Sales Text" and so on.

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

script_man
Active Contributor
0 Kudos

Hi Janne,

In a similar case, I did the following:

. . .
i = 0 
do 
 session.findById("wnd[0]/usr/......SAPLBUD0:1500/tblSAPLBUD0TCTRL_BUT0BK").getAbsoluteRow(i).selected = true
 BANK_ID_IST = session.findById("wnd[0]/usr/......SAPLBUD0:1500/tblSAPLBUD0TCTRL_BUT0BK/txtGT_BUT0BK-BKVID[0," & cstr(i) & "]").text
 if BANK_ID_SOLL = BANK_ID_IST or BANK_ID_IST = "" then exit do
 i = i + 1
loop
. . .

You get the specific name of your variable when recording through the script recorder by ending the recording at the moment you have clicked on the parameter.

Regards,

ScriptMan