ALV in PopUp with REUSE_ALV_POPUP_TO_SELECT

type-pools: slis.
data: gt_outtab type sflight occurs 0,
      gs_private type slis_data_caller_exit,
      gs_selfield type slis_selfield,
      gt_fieldcat type slis_t_fieldcat_alv with header line,
      g_exit(1) type c.
 
parameters: p_title type sy-title.
*
start-of-selection.
  select * from sflight into table gt_outtab up to 5 rows.
 
  call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
            i_structure_name       = 'SFLIGHT'
       changing
            ct_fieldcat            =  gt_fieldcat[].
 
  read table gt_fieldcat with key fieldname = 'PLANETYPE'.
  if sy-subrc = 0.
    gt_fieldcat-no_out = 'X'.
    modify gt_fieldcat index sy-tabix.
  endif.
 
  call function 'REUSE_ALV_POPUP_TO_SELECT'
       exporting
            i_title                 = p_title
*           I_SELECTION             = 'X'
*           I_ZEBRA                 = ' '
*           I_SCREEN_START_COLUMN   = 0
*           I_SCREEN_START_LINE     = 0
*           I_SCREEN_END_COLUMN     = 0
*           I_SCREEN_END_LINE       = 0
*           I_CHECKBOX_FIELDNAME    =
*           I_LINEMARK_FIELDNAME    =
*           I_SCROLL_TO_SEL_LINE    = 'X'
            i_tabname               = '1'
            it_fieldcat             = gt_fieldcat[]
*           IT_EXCLUDING            =
*           I_CALLBACK_PROGRAM      =
*           I_CALLBACK_USER_COMMAND =
            is_private              = gs_private
     importing
            es_selfield             = gs_selfield
            e_exit                  = g_exit
       tables
            t_outtab                = gt_outtab
       exceptions
            program_error           = 1
            others                  = 2.
  if sy-subrc <> 0.
    message i000(0k) with sy-subrc.
  endif.
  write: / g_exit,
           gs_selfield-tabname,
           gs_selfield-tabindex,
 
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com