cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

SAP GUI Scripting access to custom control

Former Member
0 Likes
2,174

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Stefan,

thanks for your answer. I got it.

Kay

Stefan-Schnell
Active Contributor
0 Likes

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