Как только я покидаю экран выбора в ABAP, например, записывая: Как переписать поведение кнопки отмены?В приведенном ниже сокращенном коде, каждый раз, когда я нажимаю кнопку «Выполнить», а затем «Отмена», я возвращаюсь к экрану выбора :( Вместо этого поведения я хочу полностью выйти из программы, когда нажимаю в записи, выводим красную кнопку.
PARAMETERS p_output AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK such WITH FRAME TITLE text-001.
"...
SELECTION-SCREEN END OF BLOCK such.
SELECTION-SCREEN END OF SCREEN 101.
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK such2 WITH FRAME TITLE text-002.
"...
SELECTION-SCREEN END OF BLOCK such2.
SELECTION-SCREEN END OF SCREEN 102.
SELECTION-SCREEN BEGIN OF TABBED BLOCK searchtab FOR 20 LINES.
SELECTION-SCREEN TAB (15) expert USER-COMMAND ucomm1
DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (17) common USER-COMMAND ucomm2
DEFAULT SCREEN 102.
SELECTION-SCREEN END OF BLOCK searchtab.
INITIALIZATION.
expert = text-001.
common = text-002.
searchtab-prog = sy-repid.
searchtab-dynnr = 101.
searchtab-activetab = 'EXPERT_SEARCH'.
"...
AT SELECTION-SCREEN ON EXIT-COMMAND.
CASE sy-dynnr.
WHEN 1000."main screen number
CASE sy-ucomm.
WHEN 'ECAN'.
LEAVE PROGRAM.
WHEN 'DBAC' OR 'ENDE'. "execute go back
LEAVE TO SCREEN 1000." SELECTION-SCREEN 1000.
WHEN 'UCOMM1'.
searchtab-dynnr = 101."subscreen number 1
searchtab-activetab = 'EXPERT'.
WHEN 'UCOMM2'.
searchtab-dynnr = 102."subscreen number 2
searchtab-activetab = 'COMMON'.
ENDCASE.
WHEN Others.
CASE sy-ucomm.
WHEN 'ECAN'.
LEAVE PROGRAM.
WHEN 'DBAC' OR 'ENDE'. "execute go back
LEAVE TO SCREEN 1000." SELECTION-SCREEN 1000.
ENDCASE.
ENDCASE.
START-OF-SELECTION.
PERFORM say_hello.
FORM say_hello .
WRITE: 'from the write output screen I want to navigate by Cancel button or key f12',
'not back to selection screen but leave the program entirely.'.
ENDFORM. " SAY_HELLO