好男人就是我,我就是你兵哥
分类: Web开发
2013-09-23 11:04:48
data lv_title type string.
data lv_text type string.
lv_title = '弹出框'.
lv_text = '是否关闭窗口?'.
LV_POP_BUTTON = IF_BSP_WD_WINDOW_MANAGER=>CO_BTNCOMB_CLOSE.”单一的取消按钮。 YES/NO按钮CO_BTNCOMB_YESNO OK/CANCEL按钮CO_BTNCOMB_OKCANCEL YES/NO/CANCEL按钮CO_BTNCOMB_YESNOCANCEL
CALL METHOD COMP_CONTROLLER->WINDOW_MANAGER->CREATE_POPUP_2_CONFIRM "CREATE POP OBJECT
EXPORTING
IV_TITLE = LV_TITLE
IV_TEXT = LV_TEXT
IV_BTNCOMBINATION = LV_POP_BUTTON
RECEIVING
RV_RESULT = ZPOP_DEPOT_NOLOOK "POPUP WINDOW
"MESSAGE EVENT
CALL METHOD ZPOP_DEPOT_NOLOOK->SET_ON_CLOSE_EVENT "SET EVENT FOR POP CLOSED
EXPORTING
IV_VIEW = ME
IV_EVENT_NAME = 'POP_SAVE_CANCEL'"NEED REDIFINE
."ENDCALL.
ZPOP_DEPOT_NOLOOK->OPEN( ).
以上部分可定义一个弹窗信息,信息内容为LV_TEXT。
如果想对定义的弹窗信息做按钮事件,则需要根据上面的参数IV_EVENT_NAME对应的值在
这里定义一个事件,接受事件如下:
IF ZPOP_DEPOT_NOLOOK->GET_FIRED_OUTBOUND_PLUG( ) = 'YES'.
ENDIF.
按钮事件一般在第一个IF里面写方法或者直接写代码。