Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1673

An internal table should be sorted before duplicates are deleted

    XMLWordPrintable

    Details

    • Type: Bug Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Message:
      Sort this table before the delete
    • Default Severity:
      Major
    • Impact:
      Low
    • Likelihood:
      High
    • Default Quality Profiles:
      Sonar way
    • Covered Languages:
      ABAP
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min

      Description

      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

      DELETE ADJACENT DUPLICATES FROM ITAB COMPARING LAND.
      

      Compliant Solution

      SORT ITAB BY LAND.
      DELETE ADJACENT DUPLICATES FROM ITAB COMPARING LAND.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: