on 05-14-2010 5:27 PM
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( ).
Got it working. Just changed the way I call the close and open. It should be close first and then open.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh ,
i think you have to specify the window name when you controling more that one windows try by passing the windo name in that close method .
DATA: l_api TYPE REF TO if_wd_view_controller,
l_window_ctlr TYPE REF TO if_wd_window_controller,
l_popup TYPE REF TO if_wd_window.
l_api = wd_this->wd_get_api( ).
l_window_ctlr = l_api->get_embedding_window_ctlr( ).
IF l_window_ctlr IS BOUND.
l_popup = l_window_ctlr->get_window( ).
l_popup->close( 'L_POPUP' ).
ENDIF.
REAGARDS
CHINNAIYA . P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.