原贴地址:http://techlog.hikarulea.com/abap-popup_to_confirm/
通过 Function Module 弹出窗口,提示信息,并获得用户选项值
所属 Function Group : SPO1
所属 Package : SZP
DATA:answer TYPE c LENGTH 1.
CALL FUNCTION ‘POPUP_TO_CONFIRM’
EXPORTING
titlebar = ‘This is title’
* DIAGNOSE_OBJECT = ‘ ‘
text_question = ’8 + 8 = ?’
text_button_1 = ‘Ja’(001)
* ICON_BUTTON_1 = ”
* TEXT_BUTTON_2 = ‘Nein’(002)
icon_button_2 = ‘ICON_HISTORY’ "name in table ICON
default_button = ’2′"default focus
display_cancel_button = ”"no cancel
* USERDEFINED_F1_HELP = ‘ ‘
start_column = 1 "position
start_row = 1
"type ICON-NAME
popup_type = ‘ICON_MESSAGE_INFORMATION’
iv_quickinfo_button_1 = ‘button 1 quick info’
* IV_QUICKINFO_BUTTON_2 = ‘ ‘
IMPORTING
answer = answer "Return values: ’1′, ’2′, ‘A’
* TABLES
* PARAMETER =
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.