Code: Alles auswählen.
REPORT.
TYPE-POOLS: slis.
DATA: itab TYPE STANDARD TABLE OF t000
WITH NON-UNIQUE DEFAULT KEY,
it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF it_fieldcat.
END-OF-SELECTION.
SELECT *
INTO TABLE itab
FROM t000.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'T000'
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
wa_fieldcat-input = 'X'.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING input
WHERE fieldname = 'MTEXT'.
wa_fieldcat-row_pos = 2.
MODIFY it_fieldcat FROM wa_fieldcat TRANSPORTING row_pos
WHERE col_pos > 4.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = it_fieldcat
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.