start-of-selection and sy-ucomm

sy-ucomm

AT SELECTION-SCREEN.
  IF syucomm ‘BTN1’ AND lv_executed IS INITIAL.
    “lv_executed = abap_true.

    CALL FUNCTION ‘NUMBER_GET_NEXT’
      EXPORTING
        nr_range_nr             ’01’
        object                  ‘ZNRO_TEST2’
      IMPORTING
        number                  lv_number
      EXCEPTIONS
        interval_not_found      1
        number_range_not_intern 2
        object_not_found        3
        OTHERS                  4.

    gs_logid lv_number.
    gs_logad gv_ad.
    gs_logsoyad gv_soyad.
    gs_logyas gv_yas.

    INSERT zbk_egt_00034 FROM gs_log.

  ENDIF.

In this statement, If statement triggers twice. Because of that program print 2 rows. What could be the reason ?

Scroll to Top