Skip to Content
0

SAP GUI Scripting access to custom control

Mar 09 at 03:16 PM

60

avatar image
Former Member

Hello everybody,

i use SAP GUI scripting with vba. That works great as long as i try to access a custom control. At the moment i access to text fields like this way:

objSess.FindById("wnd[0]").FindByName("MEREQ3319-TXZ01", "GuiTextField").Text

But i don´t know how i can access to the following custom control:

wnd[0]/usr/subSUB0:SAPLMEGUI:0019/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT10/ssubTABSTRIPCONTROL1SUB:SAPLMEGUI:0060/subSUB1:SAPLMEGUI:3317/cntlREQ_HISTORY

Is there anybody who can help me please?

Thanks in advance
Kay

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

2 Answers

avatar image
Former Member Mar 11 at 05:20 PM
0

Hi Stefan,

thanks for your answer. I got it.

Kay

Share
10 |10000 characters needed characters left characters exceeded
Stefan Schnell
Mar 11 at 04:22 AM
0

Hello Kay,

welcome in the SAP Community.

You can access to custom controls very easily e.g. like this:

Set CustCont = session.findById("wnd[0]/usr/cntlIMAGE_CONTAINER")

CustCont.Visualize(1)
WScript.Sleep(1000)
CustCont.Visualize(0)

In your case:

Set Hist = objSess.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0019/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT10/ssubTABSTRIPCONTROL1SUB:SAPLMEGUI:0060/subSUB1:SAPLMEGUI:3317/cntlREQ_HISTORY")

Now you can use the Hist object, from type GuiCustomControl, with its methods and attributes.

Best regards
Stefan

Share
10 |10000 characters needed characters left characters exceeded