Skip to Content
avatar image
Former Member

SAP GUI Scripting access to custom control

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    Hi Stefan,

    thanks for your answer. I got it.

    Kay

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 11 at 04:22 AM

    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

    Add comment
    10|10000 characters needed characters exceeded