on 10-21-2005 11:45 AM
Hi, I need to read two tables, and compare the field content in each. It's not just a case of checking how many lines are in each. Do I have to loop at each line then field, or does anyone know of a clever way of doing this ?
Thanks
Hi Jill Thompson
Can you elaborate on your question?
I mean the structure of 2 tables.
and
what exactly you want to do.
Like: Do you want to show a message of typemismatch if any of field mismatches or else?
Regards,
Vijay Raheja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
by two different systems you mean different clients or different servers altogether...
if clients... u can use the "<b>client specified</b>" addition with the select and get data for two different clients...
for different servers (say DEV and QA) read the table in other system via RFC (as already suggested)
rgds,
PJ
I think you have to loop through the first table and read the second one ...and compare the filed you want and move it to some another internal table for further processing.
Loop at tab1.
read tab2 with key fd1 = tab1-fd1.
if sy-subrc = 0.
*--move it some other internal tabe if needed
endif.
endloop.
You can improve the perfomance by sorting the tables and doing a binary serach in the read statemenmt
Hi,
if you only want to know if there's a difference,
you can say :
if itab1[] = itab2[].
or by standard tables (without header line)
if itab1 = itab2.
regards Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
loop at itab.
read table itab1 with key matnr = itab-matnr
.........
if itab-matnr ne itab1-matnr.
move .......to itab2.
endloop.
I hope it will be use full to u.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.