cancel
Showing results for 
Search instead for 
Did you mean: 

creating OK-Cancel pop-up

Former Member
0 Kudos

Hi,

How do I create an Ok-Cancel pop-up in FPM, the one given in cookbook doesnt work?

Regards,

Ronita

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Ronita De

DATA: api_component TYPE REF TO if_wd_component,

window_manager TYPE REF TO if_wd_window_manager.

api_component = wd_comp_controller->wd_get_api( ).

window_manager = api_component->get_window_manager( ).

wd_comp_controller->window = window_manager->create_window(

window_name = 'POPUPWINDOW'

button_kind = 3

close_button = abap_true ).

wd_comp_controller->window->open( ).

Cheers,

Mary

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The question asked specifically for FPM - Floor Plan Manager. Although some of the suggestions are correct for regular Web Dynpro - the Floor Plan Manager has its own Popup mechanisms.

I used the NEEDS_CONFIRMATION method of the IF_FPM_UI_BUILDING_BLOCK interface. You can test the event that triggered it. You can then build the confirmation popup message.


method needs_confirmation .
  case io_event->mv_event_id.
    when cl_fpm_event=>gc_event_goto_start or
         cl_fpm_event=>gc_event_refresh.
      eo_confirmation_request = wd_this->check_before_data_loss( ).
    when cl_fpm_event=>gc_event_delete_current_object.
        data lo_confirm_request type ref to cl_fpm_confirmation_request.
        data lt_conf_text type string_table.
        data lv_text type string.
        lv_text = wd_assist->if_wd_component_assistance~get_text( key = '005' ).
        append lv_text to lt_conf_text.
        lv_text = wd_assist->if_wd_component_assistance~get_text( key = '006' ).
        append lv_text to lt_conf_text.
* Create a instance passing the string table which contains the texts to be displayed on the popup
        create object lo_confirm_request
          exporting
            it_confirmation_text = lt_conf_text.
        eo_confirmation_request = lo_confirm_request.
    endcase.
  endmethod.

Answers (1)

Answers (1)

Former Member
0 Kudos

hI,

REFER TO THESE EXAMPLES DEMO_POPUPS_01,DEMO_POPUPS_03

Former Member
0 Kudos

Could you please give the code snippet--am using the e4m and these applications do not exist in here.

Thanks,

Ronita