Generic create selection-screen

DATAlv_bukrs      TYPE bukrs,
      " select-options: type range of.. (must be dictionary type)
      lrg_werks     TYPE ckf_werks_table,
      " select-options: table, separate values
      lt_werks      TYPE plants,
      " checkbox + radiobutton ( must be DDIC types )
      lv_simulate   TYPE xfeld,
      lv_mode_open  TYPE xfeld,
      lv_mode_close TYPE xfeld,
      lv_language   TYPE spras.
lv_language sy-langu.

cl_ci_query_attributes=>generic(
  EXPORTING
    p_name       =  CONV #sy-repid )   " Selection Name
    p_title      =  'Generic screen for input'   " Title of Selection
    p_attributes =  VALUE #(
                              " parameter field
                             kind 'S'
                               obligatory abap_true
                               text 'Company code'(001)
                               ref REF #lv_bukrs )

                              " select-option
                              kind 'S'
                                text 'Plant'(002)
                                ref REF #lrg_werks )

                              " selec-option no intervals
                              kind 'T'
                                text 'Additional plants'(008)
                                ref REF #lt_werks )

                              " Screen groupd
                              kind 'G'
                                text 'Mode'(006)
                                ref REF #sy-index )

                              " radiobuttons
                              kind 'R'
                                text 'Open'(004)
                                button_group 'MOD'
                                ref REF #lv_mode_open )

                              kind 'R'
                                text 'Close'(005)
                                button_group 'MOD'
                                ref REF #lv_mode_close )

                             " checkbox field
                             kind 'C'
                               text 'Simulate'(003)
                               ref REF #lv_simulate )

                            " listbox field
                            kind 'L'
                              text 'Language'(007)
                              ref REF #lv_language )
       )
      p_display    abap_true    " General Flag
*  RECEIVING
*    p_break      =     " Terminate Yes/No
).

Comments