data: begin of itab,
col1 type i,
col2 type i,
end of itab,
begin of itab1,
col1 type i,
col2 type i,
end of itab1.
data:
t_itab like table of itab ,
t_itab1 like table of itab1 ,
w_itab like itab,
w_itab1 like itab .
loop at t_itab into w_tab .
read table t_itab1 into w_tab1 index sy-tabix .
if sy-subrc = 0 .
if w_tab-col1= w_tab1-col1 .
"write the logic "
endif.
if w_tab-col2 = w_tab1-col2 .
"write your logic "
endif .
endif .
endloop .