Webdynpro程序实现弹窗提醒
实现效果如上图
类似SAP GUI界面的函数 POPUP_TO_CONFIRM
1 2 3 4 5 6 7 8 9 |
<span class="hljs-keyword">CALL</span> <span class="hljs-keyword">FUNCTION</span> <span class="hljs-string">'POPUP_TO_CONFIRM'</span> EXPORTING text_question = qus IMPORTING ANSWER = ans |
WDA界面程序:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
l_component_api = wd_comp_controller->wd_get_api( ). l_window_manager = l_component_api->get_window_manager( ). INSERT text INTO TABLE l_message_text . l_popup_window = l_window_manager->create_popup_to_confirm( text = l_message_text button_kind = if_wd_window=>co_buttons_yesno message_type = if_wd_window=>co_msg_type_question window_title = title window_position = if_wd_window=>co_center default_button = if_wd_window=>co_button_yes ). l_view_controller_api = wd_this->wd_get_api( ). l_popup_window->subscribe_to_button_event( button = if_wd_window=>co_button_yes action_name = <span class="hljs-string">'SUBMIT_REQUEST'</span> * button_text = button_text action_view = l_view_controller_api is_default_button = abap_true ). l_popup_window->open( ). |
消息文本写入text即可