Skip to Content
0
Former Member
May 14, 2010 at 04:27 PM

Close a popup and open a new one

77 Views

I've to open a new pop up from an already opened popup and close the open popup. Bleow is my code . But it closes the open pop up but not opening the new pop up. what should be done to open the new one and close the exiting one?

lr_component = wd_comp_controller->wd_get_api( ).

lr_window_manager = lr_component->get_window_manager( ).

lr_popup = lr_window_manager->create_window(

modal = abap_true

window_name = 'REQ_ITEM_WD'

button_kind = if_wd_window=>co_buttons_close

title = 'Info' ).

CHECK lr_popup IS BOUND.

lr_popup->set_window_position( position = if_wd_window=>co_center ).

lr_popup->set_close_in_any_case( abap_true ).

lr_popup->open( ).

DATA: lo_api TYPE REF TO if_wd_view_controller,

lo_window TYPE REF TO if_wd_window,

lo_window_ctlr TYPE REF TO if_wd_window_controller.

lo_api = wd_this->wd_get_api( ).

lo_window_ctlr = lo_api->get_embedding_window_ctlr( ).

  • get the control for window to be closed

lo_window = lo_window_ctlr->get_window( ).

lo_window->close( ).