Skip to Content
author's profile photo Former Member
Former Member

Closing Window with component usage in used component

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 09:36 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.