10-14-2008 3:48 PM
Hi Experts,
i ve 2 internal tables, both contains NRIC numbers...
now i want to compare whether the both table data is same or not?
i tried like
if itab1[] = itab2[].
but its not working...
how 2 compare both tables are having matching data r not?
Thanks in Advance,
sudeer.
10-14-2008 3:52 PM
if the internal tables defined are having the same structure then you can compare the way you did.
if itab1[] = itab2[].
"they are same
else.
" they are not equal
endif.
if they are not working means the two internal tables may be different check in debug mode once and see.
10-14-2008 4:09 PM
Hi Vijay,
thanks for ur replay...
i ve done same thing what u ve given, but its not working........
but both tables having same data....no doubt on that...
my require ment is i ve contants in both tables..
i want 2 check if both should have same no of records and contant also should be same...
.
10-14-2008 3:56 PM
loop at itab1 into wa_itab1.
read table itab2 into wa_itab2 with key NRIC = wa_itab1.
if sy-subrc eq 0.
Delete itab1 index sy-index. " or
Delete itab2 index sy-index.
endif.
endloop.