cancel
Showing results for 
Search instead for 
Did you mean: 

How to close a pop up window of used component ( usage defined )

laeeqsiddique
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

laeeqsiddique
Participant
0 Kudos

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

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> 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( ).

Answers (1)

Answers (1)

Former Member
0 Kudos

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.