2004 Nov 18 11:53 AM
I Have table A with MSEH MSEHT MSEHL ISOCODE KZEH, fields and I have another table B which is exactly a snap shot of A.
I want to check B aganist A to wether the values are exactly in same as in A.
Can anyone suggest how to do this in ABAP.( with internal tables.)
can anyone write some code
Oli
2004 Nov 18 11:55 AM
2004 Nov 18 12:02 PM
Thanks Donald,
Where can I find info on this..can you send a link?
regards
Oli
2004 Nov 18 12:53 PM
I probably found this in the ABAP help a long time ago.
It's one of things I know works but can't remember where I first saw it.
Cheers
James
2004 Nov 18 12:11 PM
If there are not many entries, probably you can do :
data : lt_a type table of A.
select *
into lt_a
from a inner join b
on a~mseh = b~mseh
where a~mseht <> b~mseht
or a~msehl <> b~msehl
or a~isocode <> b~isocode
or a~kzeh <> b~kzeh.
if lt_a is initial.
write: 'Entries exactly match'.
else.
write: 'Entries don't match'.
endif.
lt_a will have all those entries which are not matching in both the tables
Only if it does not have many entries, you should use the above code.
Hopefully it will work as you intended.
Regards,
Subramanian V.
I keep making too many mistakes, just corrected the code
Message was edited by: Subramanian Venkateswaran
2004 Nov 18 3:17 PM
2004 Nov 18 3:16 PM
Hi Oli.
Copy a[] and b[] to c[] as you like and
DELETE ADJACENT DUPLICATES FROM c.
describe table c lines anyLines.
and you have the answer
Regards
Bartosz
2004 Nov 18 3:19 PM