You are on page 1of 1

*&

---------------------------------------------------------------------*
*& Report Z00_ALVGRID_FULLSCREEN
*&
*&---------------------------------------------------------------------*
REPORT z00_alvgrid_fullscreen.
* work area and internal table for ALV data
DATA: wa_data TYPE sflight, "Anpassung: Bezeichner der DB-Tab
elle / DB-View
it_data LIKE TABLE OF wa_data.
DATA ok_code LIKE sy-ucomm.
DATA: alv TYPE REF TO cl_gui_alv_grid.

SELECT-OPTIONS: so_car FOR wa_data-carrid, "Anpassung: passend zur DB-Tabelle /
DB-View
so_con FOR wa_data-connid.
AT SELECTION-SCREEN OUTPUT.
CHECK alv IS NOT INITIAL.
CALL METHOD: alv->free.
FREE: alv.
AT SELECTION-SCREEN ON EXIT-COMMAND.
CHECK alv IS NOT INITIAL.
CALL METHOD: alv->free.
FREE: alv.
START-OF-SELECTION.
SELECT * FROM sflight "Anpassung: passend zur DB-Tabel
le / DB-View
INTO TABLE it_data
WHERE carrid IN so_car
AND connid IN so_con.
END-OF-SELECTION.
SKIP. "Listenpuffer für Listenanzeige-Dynpro füllen
CHECK alv IS INITIAL.
CREATE OBJECT alv
EXPORTING
i_parent = cl_gui_custom_container=>screen0
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE a010(bc405_408).
ENDIF.
CALL METHOD alv->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT' "Anpassung: Bezeichner der DB-Ta
belle / DB-View
CHANGING
it_outtab = it_data
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE a012(bc405_408).
ENDIF.