on 04-26-2010 11:15 AM
Dear experts,
we are facing the following issue:
we create an external window using window manager.
wd_this->go_window = lo_window_manager->create_window(
window_name = 'WI_XXX
title = XXX
* 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
* default_button = if_wd_window=>co_buttons_okcancel
).
We assigned an action to the pop up ok button.
wd_this->go_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'POPUP_OK_XXX
action_view = lo_view_controller "wd_this->wd_get_api( )
is_default_button = abap_true ).
Clicking on OK Button, the action fires - the code is working fine.
But: after our code is finished, the screen has to be refreshed. We fired an exit plug of the current window, providing the url of the current application. This is working fine too, but the pop up window is still open and modal, even if we invoke the close method of the popup window directly before fireing the exit plug. In the background we can see the refreshed application, but it is not possible to do anything.
Does anyone have a solution for this?
We tried setting close_in_any_case to true and so on ... but nothing works.
The problem occurs both create_window and pop_up_to_confirm ...
Regards, Florian
>
> But: after our code is finished, the screen has to be refreshed. We fired an exit plug of the current window, providing the url of the current application. This is working fine too, but the pop up window is still open and modal, even if we invoke the close method of the popup window directly before fireing the exit plug. In the background we can see the refreshed application, but it is not possible to do anything.
>
> Does anyone have a solution for this?
>
> We tried setting close_in_any_case to true and so on ... but nothing works.
> The problem occurs both create_window and pop_up_to_confirm ...
>
> Regards, Florian
Hi Florian,
I am sure by this time you are fed up with everyone's questions and your problem still exists.
I assume that in your code that you have saved the window reference of the popup before you actually open it.
Have you tried closing this saved window before you fire exit plug. I would suggest to comment the line of exit plug for time being to make sure that you are able to close your popup window.
If it is working fine then you can try enabling the exit_plug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following might help those with similar issues.
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( ).
l_popup = l_window_ctlr->get_window( ).
l_popup->close( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Florian,
have you tried this?
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.
" get embedding window
l_api = wd_this->wd_get_api( ).
l_window_ctlr = l_api->get_embedding_window_ctlr( ).
" and close the pop up
IF l_window_ctlr IS BOUND.
l_popup = l_window_ctlr->get_window( ).
l_popup->close( ).
ENDIF.
I had some problems closing popups myself until finding this great snippet that helped me a lot!
Check article [Quick Tips andTtricks on Web Dynpro for ABAP - How to use ALV and Pop Ups|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4] of Joris Bots for better formatting and a lot more great information!
Regards,
Alej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>we create an external window using window manager.
An External Window or a Dialog Window? Your coding would be that for a dialog window, but the description of the way it is working sounds like an external window.
A truely modal external window (separate browser instance, not just a floating iFrame within the current browser canvas) is a separate user sessions on the backend and can not be controlled or closed from the originating application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try like that....
step1) create an attribute (say lo_popup_window) at the component level of type IF_WD_WINDOW make sure you check both check boxes (public) and (ref to)....you need to go to your component controller....click on attribute tab and create this....
step2)...now in your code do following...where you are trying to create and open the popup:
wd_comp_controller->lo_popup_window = wd_this->go_window.
wd_this->go_window->open( ).
step3)...in your close window btn....write this:
DATA:l_final_window TYPE REF TO if_wd_window.
l_final_window = wd_comp_controller->lo_popup_window.
IF l_final_window IS NOT INITIAL.
CALL METHOD l_final_window->close( ).
ENDIF.
this should close your window
Thanks...
AS...
Hey,
thx for your valuable answer.
>
> step1) create an attribute (say lo_popup_window) at the component level of type IF_WD_WINDOW make sure you check both check boxes (public) and (ref to)....you need to go to your component controller....click on attribute tab and create this....
>
we already tried that.
>
> IF l_final_window IS NOT INITIAL.
> CALL METHOD l_final_window->close( ).
> ENDIF.
>
>
It doesn't close ... neither window created by "Create_window" nor Pop_up_to_confirm.
Seems like the code for closing the dialog window is never executed.
Hi,
alright..in this case i would say create your own close btn on the view you are embeding inside this pop-up window and try to close the window in its action method....
here is the code to get rid of all the standard btns:
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 = 'POPUP_WINDOW'
title = title_txt
* close_in_any_case = abap_false
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_false
* 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
).
wd_comp_controller->lo_popup_window = lo_window.
lo_window->open( ).
Thanks..
AS
Did you try using the Close method, for eg: wd_this->go_window->close( )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.