First List ALV using FM-REUSE_ALV_LIST_DISPLAY
The post shows how to build your first simple list ALV. The list ALV shows records from the flight table- SPFLI.
The SPFLI table contains below records.
Program Code Snippet:
DATA: lt_spfli TYPE TABLE OF spfli.
START-OF-SELECTION.
SELECT * FROM spfli INTO TABLE lt_spfli.
CALL FUNCTION ‘REUSE_ALV_LIST_DISPLAY’
EXPORTING
i_callback_program = sy-cprog
i_structure_name = ‘SPFLI’
TABLES
t_outtab = lt_spfli
EXCEPTIONS
program_error = 1
OTHERS = 2.
CASE sy-subrc.
WHEN 1.
MESSAGE ‘Program Error’ TYPE ‘I’.
WHEN OTHERS.
ENDCASE.
Program Output:
One comment