on 08-27-2008 6:11 PM
Hi Friends ,
I'm calling a window as a pop up of used component ( Usage defined ). I want to close that pop up using a button on the embedded view of that window.
it would be great help If any one can help me in this.
Regards,
Laeeq
Hi Laeeq,
use the close method of if_wd_window.
[http://help.sap.com/saphelp_nw70/helpdata/en/43/035be8dc7e22f4e10000000a1553f7/frameset.htm]
Kind regards, Silke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi Silke ,
>
> I Want to close a pop up using a botton on embedded view of window of used component and I do not have the refrence of window object there. I know what you are talking about but its not that simple.
>
> Regards,
> Laeeq
Actually it is pretty simple. From the embedded view you can use the APIs to get access to the hosting window object.
data l_api_v_new_attachment type ref to if_wd_view_controller.
l_api_v_new_attachment = wd_this->wd_get_api( ).
data window_controller type ref to if_wd_window_controller.
window_controller = l_api_v_new_attachment->get_embedding_window_ctlr( ).
data window type ref to if_wd_window.
window = window_controller->get_window( ).
window->close( ).
HI,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.