类型为I 和E 类型的message不能用在initialization event中。
如果要用对话框形式,可以调用function module POPUP_TO_CONFIRM
INITIALIZATION.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = '这个程序已经嗝屁了,不能使用了,你是退出还是退出?'
display_cancel_button = ''
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
LEAVE PROGRAM.
这样更好一些:
LOAD-OF-PROGRAM.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = '这个程序已经嗝屁了,不能使用了,你是退出还是退出?'
display_cancel_button = ''
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
INITIALIZATION.
LEAVE PROGRAM.