rspec/rules/S1673/abap/rule.adoc
2022-02-04 16:28:24 +00:00

29 lines
639 B
Plaintext

Calling ``++DELETE ADJACENT DUPLICATES++`` won't reliably do any good if the table hasn't first been sorted to put duplicates side by side, since the ``++ADJACENT++`` part of the command looks for multiple rows side-by-side with the same content.
== Noncompliant Code Example
[source,abap]
----
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING LAND.
----
== Compliant Solution
[source,abap]
----
SORT ITAB BY LAND.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING LAND.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]