DELETE ADJACENT DUPLICATES - Differences

Question: Hi.

What's the exactly difference between:

DELETE ADJACENT DUPLICATES FROM itab.

and

DELETE ADJACENT DUPLICATES FROM itab COMPARING ALL FIELDS.

Is the effect always the same?

Thanks!!!

Answer:
difference is " COMPARING ALL FIELDS"


_________________
SapFans Moderator
NetWeaver ‘04–SAP Web AS for ORACLE certified

Search: /forums/search.php
SAP Notes: http://service.sap.com/notes
SAP Help: http://help.sap.com
Basic Rules: /forums/viewtopic.php?t=222759

Answer:
If the addition COMPARING is not specified, the groups are determined by the content of the key fields. COMPARING ALL FIELDS, does has it states, without this addition only the key fields determine deletion condition.
_________________
Focus on what's in front of you. Don't worry about anything else, because if you don't take care of that, then you are worrying about something that doesn't really exist and is what you cannot control.

Answer:
This is in the SAP Help the extra funky bit that no-ones mentioned is you can DELETE ADJACENT DUPLICATES FROM <ITAB> COMPARING <FIELD1> <FIELD2> <FIELD3> etc. Therefore you can sort by non-key fields, and then remove adjacent duplicates on non-key fields from your itab if appropriate (it's a rare requirement, but does sometimes happen).
_________________
Kind Regards

Rosie Brent

Please remember to search the forum and check the FAQ before posting questions, thank you.

Tuly Idiot most of the time, part-time Guru
Copyright ?2007 - 2008 www.jt77.com