Does you business requirement needs single line item in ALV to be displayed in multiple rows/lines for better readability? You then surely need a multi-line ALV, which can be implemented by just a simple tweaking in your ALV field catalog.
You can achieve this objective using property ROW_POS of Field catalog. Just assign a value between 1 to 3 to each of the records (denoting output internal table’s columns/fields) in field catalog. That’s it. Value is restricted between 1 and 3 since ALV can handle maximum of 3 rows for 1 ALV line item.
The example followed will completely clear the usage.
Here is the code to build the field catalog of an ALV.
FORM e01_fieldcat_init USING e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
ls_fieldcat-fieldname = ‘CARRID’.
ls_fieldcat-key = ‘X’.
ls_fieldcat-ref_fieldname = ‘CARRID’.
ls_fieldcat-ref_tabname = ‘SFLIGHT’.
ls_fieldcat-row_pos = 1.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = ‘CONNID’.
ls_fieldcat-key = ‘X’.
ls_fieldcat-ref_fieldname = ‘CONNID’.
ls_fieldcat-ref_tabname = ‘SFLIGHT’.
ls_fieldcat-row_pos = 1.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = ‘FLDATE’.
ls_fieldcat-key = ‘X’.
ls_fieldcat-ref_fieldname = ‘FLDATE’.
ls_fieldcat-ref_tabname = ‘SFLIGHT’.
ls_fieldcat-row_pos = 1.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = ‘PRICE’.
ls_fieldcat-ref_fieldname = ‘PRICE’.
ls_fieldcat-ref_tabname = ‘SFLIGHT’.
ls_fieldcat-row_pos = 2.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = ‘CURRENCY’.
ls_fieldcat-ref_fieldname = ‘CURRENCY’.
ls_fieldcat-ref_tabname = ‘SFLIGHT’.
ls_fieldcat-row_pos = 2.
APPEND ls_fieldcat TO e01_lt_fieldcat.
ENDFORM.

Multi-lined ALV using ROW_POS specified in Field catalog
