Hi @Sajuri, your question is not that much clear to me however I’m trying to answer you.
I think you are creating an order and in that order you need to insert multiple items but the problem is - you dunno how many rows are there, right?
-
So in order to get the visible row counts you can use below VB Script command and loop through your program till last line -
Session.FindById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell").RowCount-1
Replace the ID(“wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell”) with your SAP table ID -
You can use keystrokes like first set focus on the first row then keep pressing down arrow key until your program throws an error. you can handle the error using try catch.
Good Luck!!