Skip to Content
0

VBA code - layout change

Nov 30, 2017 at 02:11 PM

47

avatar image
Former Member

Hi, I have simply line in my VBA to set focus on field, but sometimes it doesnt work:

session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV50A:1202/tblSAPMV50ATC_LIPS_OVER_INB/txtLIPSD-PIKMG[15,0]").setFocus

I found its most propably becouse two reasons:

1) layout change. I tried to switch columns and then I recorded but different code:

Session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\04/ssubSUBSCREEN_BODY:SAPMV50A:1204/tblSAPMV50ATC_LIPS_PICK_INB/txtLIPSD-PIKMG[7,0]").SetFocus

2) field is not on the user visible screen (its outside, but if you will scroll to to left you can see it)

Its possible to change command to ignore those two points, so focus will be there no matter user change layout?

For example something like this?

Session.findById("wnd[0]/usr/tabs/LIPSD-PIKMG").SetFocus

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers