Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

module exit at exit-command

Hi all,

While I am using MODULE EXIT AT EXIT-COMMAND

its not working properly in module pool in PAI for the main screen.

code tht i m using for it is as follows.

DATA : l_ans TYPE c.

CLEAR ok_code.

*ok_code = sy-ucomm.

  • CASE ok_code.

  • WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

text_question = 'Would you like to Quit ?'(004)

text_button_1 = 'Yes'(005)

text_button_2 = 'No'(006)

IMPORTING

answer = l_ans

EXCEPTIONS

text_not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CHECK l_ans = '1'.

LEAVE PROGRAM.

Former Member
Not what you were looking for? View more on this topic or Ask a question