ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Classic Lists → Process lists in the list buffer
MODIFY LINE
Other versions: 7.31 | 7.40 | 7.54
Syntax
MODIFY { {LINE line [OF {PAGE page}|{CURRENT PAGE}]
[INDEX idx]}
| {CURRENT LINE} }
[source].
Extras
1. ... LINE line [{OF PAGE page }|{OF CURRENT PAGE}] [INDEX idx]
2. ... CURRENT LINE
Effect
This statement overwrites a line saved in the list buffer with the content of the sy-lisel
system field and permits additional modifications as specified in
source
. Furthermore, all values that are saved for this line using HIDE
are assigned the relevant variables.
The first output of a data object in the list buffer with the
WRITE statement defines the output length, which cannot be changed by the MODIFY
statement. The MODIFY
statement ignores any output
alignments that are specified
for the output with WRITE
and CENTERED
, RIGHT-JUSTIFIED
.
System fields
sy-subrc | Meaning |
---|---|
0 | The specified line is available and was changed. |
Not equal to0 | The specified line is not available. |
Notes
-
It is recommended that you fill the
sy-lisel
system field before you execute theMODIFY LINE
statement with the content of the list line to be changed, and then change the line exclusively using the information insource
, not by changingsy-lisel
. The sy-lisel system field is filled either using list events or with theREAD LINE
statement. -
For modifying icons and quick
info in list lines, you can use the LIST_ICON_PREPARE_FOR_MODIFY and LIST_MODIFY_QUICKINFO function modules.
Addition 1
... LINE line [{OF PAGE page }|{OF CURRENT PAGE}] [INDEX idx]
Addition 2
... CURRENT LINE
Effect
The line to be changed is specified with the LINE
addition or CURRENT
LINE. The syntax and description of the additions are the same as for the READ LINE
statement.
Example
When you double-click on a line in the basic list, the background of the number that is output becomes yellow, and the background of the remaining line becomes green.
START-OF-SELECTION.
DO 10 TIMES.
WRITE / sy-index.
ENDDO.
AT LINE-SELECTION.
MODIFY CURRENT LINE FIELD FORMAT sy-index COLOR 3
LINE FORMAT COLOR 5.