You are on page 1of 2

You must be raising the popup on some event...

You will need to create following in IMPL class of your view : 1) a Pop up reference variable 2) method that creates pop up and opens it. 3) method to handle yes / no button clicks on the pop up where we can define if yes button is clicked the what is the action to be taken . Following are the details: Class Variable: CONFIRM_POPUP Instance Type Ref To IF_BSP_WD_POPUP . method: METHOD eh_onconfirm_popup.. if confirm_popup is not bound. data: lv_save type string, lv_text type string. lv_save = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_GRM_GAG/SAVE' ). "#EC N lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_GRM_GAG/CONFIRM_SAVE' ) call method comp_controller->window_manager->create_popup_2_confirm exporting iv_title = lv_save iv_text = lv_text iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_yesnocancel receiving rv_result = confirm_popup. confirm_popup->set_on_close_event( iv_event_name = 'CONFIRM_POPUP_CLOSED' iv_view = me ). "#EC NOTEXT endif. confirm_popup->open( ). ENDMETHOD.

The method Confirm_popup_closed: METHOD eh_onconfirm_popup_closed. DATA: lv_answer TYPE string, lv_save_result TYPE abap_bool, lr_application TYPE REF TO cl_crm_bol_entity, lr_tx TYPE REF TO if_bol_transaction_context, lr_coco TYPE REF TO cl_crmcmp_g_bspwdcompone0_impl. INCLUDE: crm_object_types_con. * Retrieve the answer * this is where you can tell which button has been hold lv_answer = confirm_popup->get_fired_outbound_plug( ). CASE lv_answer. WHEN cl_gs_ptc_bspwdcomponent_cn01=>co_event_yes. * WHEN cl_gs_ptc_bspwdcomponent_cn01=>co_event_no. WHEN OTHERS. ENDCASE. ENDMETHOD. You can the call method eh_onconfirm_popup( ) . in the method/event where you want the popup to be raised.

You might also like