Avoid Classic List Processing Statements
WarningAnti-Patterns & Bad Practices#EC NO_LIST_PROCRemote Enabled
Overview
Prohibit classic list processing statements.
ATC Finding Message:
List processing statement is forbidden in OO/Cloud ABAP
Rationale
Classic list processing with WRITE, ULINE, FORMAT, and READ LINE only works in SAP GUI list reports and is unavailable in ABAP Cloud. It couples business logic to screen output and makes the code impossible to test independently. Use application logging or a modern UI framework instead of writing directly to a list.
Non-Compliant
abap
WRITE / 'Order processed:'.
ULINE.Compliant
abap
mo_logger->info( 'Order processed:' ).Configuration & Thresholds
This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:
| Parameter Name | Data Type | Default Value | Description & Guidance |
|---|---|---|---|
CHECK_WRITE | Boolean | true | Detect classic list processing WRITE statements |
CHECK_ULINE | Boolean | true | Detect classic ULINE statements |
CHECK_SKIP | Boolean | true | Detect classic SKIP statements |
CHECK_OTHER | Boolean | true | Detect BACK, FORMAT, and classic print formatting statements |
IGN_WRITE_TO | Boolean | true | Ignore WRITE ... TO ... string formatting statements (use string templates instead) |
CHECK_LEAVE | Boolean | true | Detect LEAVE LIST-PROCESSING statements |
CHECK_REJECT | Boolean | true | Detect REJECT statements in logical databases |
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC NO_LIST_PROC
" SAP CI_ prefix format:
... "#EC CI_NO_LIST_PROCRelated Rules
- Avoid Obsolete Arithmetic and Assignment Statements —
#EC NO_OBS_ARITH - Avoid Obsolete Control Flow and Procedural Forms —
#EC NO_OBS_CONTROL - Avoid Obsolete Declarations and Table Headers —
#EC NO_OBS_DECL
Technical Details
- Native ATC Class:
ZCL_SKYLINT_NO_LIST_PROC - Implementation File: zcl_skylint_no_list_proc.clas.abap