Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from ChrisW_at_Work on Jul 16 at 2:32 AM Hi Szaboa, Are you trying to export data from the control? If so, then I use this to get all the Column names then export the data. ' this is in VBA for excel 'NB this is for a different SAP screen to yours! '"=======" ' get the control type Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").Type ' get the control name Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").Name ' get the control object type. Important. Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").Text Debug.Print "--------------" ' select all columns s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").SelectAll ' get all the column names into a collection Set A = s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").SelectedColumns ; the collection is zero based For i = 0 To A.Count 1 ' get first name sColumnName = A.Item(i) ' get the data for a row that column Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").GetCellValue(irow, sColumnName) Next '== Best wishes Chris
| | | ---------------Original Message--------------- From: szaboa Sent: Wednesday, July 15, 2015 6:54 AM Subject: How to Choose a Specific Layout by Name, Instead of ID? Hi! I would like to create a script where the script chooses a specific layout, but not via currentcellrow like here: session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").currentCellRow = 2 session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").firstVisibleRow = 0 session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").selectedRows = "2" session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").clickCurrentCell In spite of that I need to choose the layout by name? So choose layout "/HUF" Thanks for your help: Attila | | Reply to this email to post your response. __.____._ | _.____.__ |