做CRM有些时间了,可是对于UI却接触的不是很多,不过感觉UI和DYNPRO差不多。。。很类似的,。。。呵呵。加油吧!
LV_TITLE = TEXT-T07.”POPUP TITLE
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( ) = 'OK'.
IF ZCHANGE_STATUS_TO_CANCEL( ) = 'X'.
ELSE.
ENDIF.
ELSE.
ENDIF.
按钮事件一般在第一个IF里面写方法或者直接写代码。