on 07-26-2011 7:00 AM
Hi,
Can anyone tell me ...how to close the popup window through the action in webdynpro abap . In my popup window there is a button(i.e 'UPDATE') apart from that default 'OK' button , I want that when 'UPDATE' button is pressed, along with the action window should be closed. I dont want to close the window by pressing 'OK' button at the botton
I have used following code to open the popup window.
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to 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 = 'POP_UP WINDOW'
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( ).
Hi Dear,
please try this code,
DATA lv_wc TYPE REF TO IF_WD_WINDOW_CONTROLLER.
data lv_view TYPE REF TO IF_WD_VIEW_CONTROLLER.
data lo_window type ref to if_wd_window.
lv_view = wd_this->wd_get_api( ).
lv_wc = lv_view->GET_EMBEDDING_WINDOW_CTLR( ).
lo_window = lv_wc ->GET_WINDOW( ).
lo_window->CLOSE( ).
Message was edited by: kumar.k kulanthaivel Regards, K. Karthikeyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try this code.
"close the window or the pop_up
DATA w TYPE REF TO if_wd_window.
w = wd_this->wd_get_api( )->get_embedding_window( ).
w->close( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kumar,
I think there are lot of solutions possible. one solution is the following
1. in the component controller's context create node (say Default) of cardinality 1..1
2. create an attribute WINDOW_REFERENCE type ref to if_wd_window
3. map this context node to main view's context
4. after creating the popup window store the lo_winow reference in the DEFAULT->WINDOW_REFERENCE attribute
5. in the popup view map the component controller's DEFAULT context node
6. in the UPDATE event handler, get the window reference from DEFAULT->WINDOW_REFERENCE and call the CLOSE method.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.