Hi all,
I have a requirement to strip the contents of a GuiTableControl from SAP. The transaction KO03 doesn't have a download function enabled & some of the tables have many lines, making Ctrl+Y to copy'n'paste data manually very tedious & potentially error prone.
I have some code, where I count the total rows (.RowCount) visible rows (.VisibleRowCount), as well as the columns (.Columns.Count). Then I loop to populate an array of the now correct size with the contents of the cells, paging down once I hit the visible row limit & stopping at the total row limit. I then paste that into a spreadsheet.
ultimately it works well enough for this specific example, but it currently requires that I specify the column ids in each loop. IE
1st column is tblSAPLKOBSTC_RULES/ctxtCOBRB-KONTY[0,0]
2nd column is tblSAPLKOBSTC_RULES/ctxtDKOBR-EMPGE[1,0]
etc
I'd like to make this snippet fairly reusable with minimal adjustment, is there a way to make this generic, so that I only need to loop over the array of displayed cells in the GuiTableControl without having to reference the individual ID's? Or maybe detect the cells ID's & have that as a variable at runtime?
Any insights gratefully received.
Cheers
Daniel