WRITE - Output Length

When data is written with a WRITE statement, the output is stored in the list buffer and accessed from there for display when the list is called.

Each time a data object is output with a WRITE statement, an output length is defined, either implicitly or explicitly (if len is specified after the addition AT). The output length defines the following:

Output Length in the List Buffer

If the output length is shorter than the length of the format specified for the data object or defined with int_format_options, the output is shortened as follows when it is written to the list buffer:

If the output length is greater than the length of a predefined or user-defined format, this output length is filled in the list buffer and output is arranged there according to the predefined or user-defined alignment. Space that is not required is filled with blanks.

Output Length in the List

When displaying or printing a list, the content stored in the list buffer is transferred to the list as follows:

Class for Calculating Output Lengths

The methods of the system class CL_ABAP_LIST_UTILITIES can be used to calculate output lengths in the list buffer and in list display. The return values of these methods can be used to program a correct column alignment for ABAP lists, even if they contain characters that require more than one column.