Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Per thread:

https://www.sdn.sap.com/irj/scn/thread?forumID=292&threadID=1197803

Open the component and then view where the pop up is to be raised.

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.