[ABAP] F4-Hilfe Popup

DATA: it_spfli TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.
DATA: it_spfli_sel TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.

PARAMETERS: p_test TYPE spfli-connid.

INITIALIZATION.
  SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE it_spfli.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_test.

  CLEAR: it_spfli_sel.

  DATA(o_f4) = cl_reca_gui_f4_popup=>factory_grid( id_title   = 'Flugdaten'
                                                   if_multi   = abap_false " Mehrfachauswahl
                                                   it_f4value = it_spfli ).

  o_f4->display( IMPORTING et_result = it_spfli_sel ).

  IF lines( it_spfli_sel ) > 0.
    p_test = it_spfli_sel[ 1 ]-connid.
  ENDIF.