cancel
Showing results for 
Search instead for 
Did you mean: 

Pop up window on click of Back button of Internet explorer

Former Member
0 Kudos

Hi,

I have a  requirement wherein once user has created claim & click on back button of the browser to go back to previous screen, a pop up window should appear confirming if the claim needs to be saved or not?

Please suggest  on how to proceed.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

We cannot control/raise events on windows buttons like back,close,minimize etc..So it is not possible to achieve your requirement.

A work-around will be create a custom button namely (Back) and you can raise popup as per your requirement.

Revert back if you require any help.

Thanks

KH

Answers (1)

Answers (1)

Gowtham
Contributor
0 Kudos

Hi Priyank,

Kindly find the following link:

Web Dynpro application to display a Pop-up window on the browser - Web Dynpro ABAP - SCN Wiki

pls find the following code to open window popup.


DATA lo_window_manager TYPEREFTO if_wd_window_manager.
DATA lo_api_component  TYPEREFTO if_wd_component.
DATA lo_window         TYPEREFTO if_wd_window.

  lo_api_component  = wd_comp_controller->wd_get_api( ).
  lo_window_manager = lo_api_component->get_window_manager( ).
  lo_window         = lo_window_manager->create_window(
                     window_name            = 'SUBWINDOW'
*                    title                  =
*   close_in_any_case      = abap_true
    message_display_mode   = if_wd_window=>co_msg_display_mode_selected
*   close_button           = abap_true
    button_kind            = if_wd_window=>co_buttons_ok
    message_type           = if_wd_window=>co_msg_type_none
    default_button         = if_wd_window=>co_button_ok
                     ).

  lo_window->open( ).

use the following code to open confirmation popup


  DATA l_cmp_api            TYPE REF TO    if_wd_component.

  DATA l_window_manager     TYPE REF TO    if_wd_window_manager.

  DATA l_popup              TYPE REF TO    if_wd_window.

  DATA l_text               TYPE           string_table.

  DATA l_api                TYPE REF TO    if_wd_view_controller.

 

  l_cmp_api        = wd_comp_controller->wd_get_api( ).

  l_window_manager = l_cmp_api->get_window_manager( ).

  INSERT `Need Confirmation to save the Details?` INTO TABLE l_text.

  l_popup = l_window_manager->create_popup_to_confirm(

                  text            = l_text

                  button_kind     = if_wd_window=>co_buttons_yesno

                  message_type    = if_wd_window=>co_msg_type_information

                  window_title    = 'Confirmation Window'

                  window_position = if_wd_window=>co_center

                  default_button  = if_wd_window=>co_button_yes ).

    l_api = wd_this->wd_get_api( ).

    l_popup->open( ).

- Gowtham