Loop in SAP

Hi,

I need to do a loop in SAP.
image
I need to find if in column MRP element I have “IndReq”. If yes I have to copy the data.

I have a problem with creating a loop. When I click the cells I need, Sap Scripting gives me for example:
session.findById(“wnd[0]/usr/subINCLUDE1XX:SAPMM61R:0750/tblSAPMM61RTC_EZ/txtMDEZ-DELB0[2,0]”).setFocus
session.findById(“wnd[0]/usr/subINCLUDE1XX:SAPMM61R:0750/tblSAPMM61RTC_EZ/txtMDEZ-DELB0[2,1]”).setFocus

Thanks for help,
Marek

@Marek_Matuszak You can make your selector dynamic to loop through each row in the datagrid and check for specific value.
Can you please share your first row selector of MRP element

Thanks for answering. How to get this?

If I click on the magnifying glass I get:
“wnd[0]/usr/subINCLUDE1XX:SAPMM61R:0750/tblSAPMM61RTC_EZ/btnMDEZ-DETAIL_ICON[0,0]”

And on the date 07.07 I get:
“wnd[0]/usr/subINCLUDE1XX:SAPMM61R:0750/tblSAPMM61RTC_EZ/ctxtMDEZ-DAT00[1,0]”

Can You show me where should I click to get this?

@Marek_Matuszak you want to compare the value of MRP column so you need to capture/identify that column