I'm trying to write a function to copy BOMs (SAP ERP) from an old part to a new part, only changing material quantity. To do this I need to know how many rows of materials are in each particular BOM, which changes depending on the part. When I use the script recorder in SAP GUI, it seems to refer to each row relative to the top of the screen. First row is 0, second is 1, and so on. If I scroll down, there's a new 0 row. Is there an easier way to find how many rows have data in them?
Example row 0:
wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/txtRC29P-MENGE[4,0]
There are additional rows if you were to keep scrolling.