tables: sscrfields.
selection-screen begin of block blog with frame title  text-014.
selection-screen pushbutton  /01(29) but1 user-command but1.
selection-screen end  of block blog .


data: gv_icon_name type iconname,
      gv_button_text(20type c,
      gv_quickinfo like smp_dyntxt-quickinfo,
      gv_icon_str(255type c.
initialization.
  gv_icon_name = 'ICON_LIST'.    " 'ICON_DISPLAY_MORE'.
  gv_button_text = 'Log Display'.
  concatenate gv_button_text text-akt
              into gv_quickinfo
              separated by space.

  call function 'ICON_CREATE'
    exporting
      name                      = gv_icon_name
      text                        = gv_button_text
      info                        = gv_quickinfo
*       ADD_STDINF                  = 'X'
    importing
      result                      = gv_icon_str
    exceptions
      others                      = 0"not interested in errors


    but1 = gv_icon_str .


    at selection-screen .
  if sscrfields-ucomm eq 'BUT1'.
    MESSAGE e000(yuauth) WITH 'DENEME'.
    ENDIF.


***Select Options Teke İndirme Aralığı Kapatma

REPORT z.
TABLES: ekpo.
TYPE-POOLS: sscr.

DATA: restrict TYPE sscr_restrict,
selopt TYPE sscr_ass,
opt_list TYPE sscr_opt_list.
SELECT-OPTIONS: s_no
 FOR ekpo-werks NO INTERVALS.

INITIALIZATION.
  CLEAR selopt.
  selopt-kind = 'S'.
  selopt-name = 'S_NO'.
  selopt-sg_main = 'I'" I-INCLUSIVE, SPACE-BOTH
  selopt-sg_addy = ' '.
  selopt-op_main = 'I'.
  APPEND selopt TO restrict-ass_tab.

  CLEAR opt_list.
  opt_list-name = 'I'.
  opt_list-options-eq = 'X'.
  opt_list-options-ge = 'X'.
  APPEND opt_list TO restrict-opt_list_tab.

  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
*   PROGRAM                      =
      restriction                  = restrict
*   DB                           = ' '
* EXCEPTIONS
*   TOO_LATE                     = 1
*   REPEATED                     = 2
*   SELOPT_WITHOUT_OPTIONS       = 3
*   SELOPT_WITHOUT_SIGNS         = 4
*   INVALID_SIGN                 = 5
*   EMPTY_OPTION_LIST            = 6
*   INVALID_KIND                 = 7
*   REPEATED_KIND_A              = 8
*   OTHERS                       = 9
            .
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.



Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com