Hi Umur
Thanks for the tip.
this is working very well.
another option is to check is one of the field is empty.
If no then increment a counter
if yes then you have reach the first available line and you can use the counter to identify it in the script
here is an example :
k = 0
While session.findById("wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-POSTP[1," & CStr(k) & "]").Text <> ""
k = k + 1
Wend
session.findById("wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-POSTP[1," & CStr(k) & "]").Text = item_type
......