Skip to content

Prefer INSERT ... INTO TABLE over APPEND ​

WarningClean ABAP & Modern SyntaxQuickFix Ready#EC INSERT_INTORemote Enabled

Overview ​

Prefer INSERT ... INTO TABLE over APPEND for table safety.

ATC Finding Message: Prefer INSERT ... INTO TABLE over APPEND

Rationale ​

APPEND only works for index tables and implies sequential insertion, so changing the table type to sorted or hashed later breaks the code. INSERT ... INTO TABLE works with every table category and states the intent generically. Use INSERT for table handling that should remain independent of the concrete table kind.

Non-Compliant ​

abap
APPEND ls_order_item TO lt_order_items.

Compliant ​

abap
INSERT ls_order_item INTO TABLE lt_order_items.

Automated QuickFix ​

This rule provides an automated QuickFix directly in Eclipse ABAP Development Tools (ADT):

  1. Position the cursor on the flagged statement.
  2. Press Ctrl + 1 (Quick Assist).
  3. Select the automated refactoring to apply the clean syntax immediately.

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC INSERT_INTO

" SAP CI_ prefix format:
... "#EC CI_INSERT_INTO

Technical Details ​

Released under the MIT License.