cancel
Showing results for 
Search instead for 
Did you mean: 

Closing Window with component usage in used component

Former Member
0 Kudos

Hi,

I create a popup with the following code.


  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_for_cmp_usage(
                     interface_view_name    = 'W_DEFAULT'
                     component_usage_name   = 'TEST'
*                  title                  =
*                  close_in_any_case      = abap_true
                     message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                     ).

  lo_window->open( ).

Now I need a function which close the window in the component test. Not in the calling component.

Kind regards

Marcus

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It is very simple, I used the following code.


  DATA:
  lo_api   TYPE REF TO if_wd_view_controller.
  lo_api = wd_this->wd_get_api( ).
  DATA: lo_window_controller TYPE REF TO if_wd_window_controller,
  lo_window TYPE REF TO if_wd_window.

  lo_window_controller = lo_api->get_embedding_window_ctlr( ).
  lo_window = lo_window_controller->get_window( ).
  lo_window->close( ).