Skip to Content
avatar image
Former Member

Closing an external window

Hello,

I would like to close an external window dynamically by calling the method

lr_myextwin->close( ) when some event occurs.

This does not seem to work since the opened external window is still open...

Ofcourse it is possible to manally close the external window, but I would like it to happen dynamically.

Can any brief me in, if it possible.

Cheers,

Gerald

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 20, 2006 at 03:09 PM

    Hi Gerald,

    It is not possible at the moment.

    Best regards,

    Thomas

    P.S: Just in case... external windows should not be used popup windows for displaying some data and then closing them in background. In case one needs to navigate to another application and needs to return the data back to the first one, suspend/resume could be used (or alternatively both applications could be integrated into the portal).

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Jagruti,

      Its possible to close the external window dynamically.What you have to do is , while creating the external window instance, save the instance in the component controller as an attribute .

      Which means create an attribute in the component controller of type IF_WD_WINDOW ( In this case i have created LO_POP_UP ).

      l_cmp_api = wd_comp_controller->wd_get_api( ).

      l_window_manager = l_cmp_api->get_window_manager( ).

      CALL METHOD L_WINDOW_MANAGER->CREATE_WINDOW

      EXPORTING

      • MODAL = ABAP_TRUE

      WINDOW_NAME = <WINDOWNAME>

      • TITLE =

      • CLOSE_BUTTON = ABAP_TRUE

      • BUTTON_KIND =

      • MESSAGE_TYPE = IF_WD_WINDOW=>CO_MSG_TYPE_NONE

      • CLOSE_IN_ANY_CASE = ABAP_TRUE

      • MESSAGE_DISPLAY_MODE =

      • DEFAULT_BUTTON =

      RECEIVING

      WINDOW = l_final_window

      .

      When you get the instance of the window.Save it in the component controller attribute.

      wd_comp_controller->LO_POP_UP = L_FINAL_WINDOW.

      CALL METHOD L_FINAL_WINDOW->OPEN

      At later point of time , you could get this instance from compenent controller and you can call that in your method whenever and whereever necessary , so that you could close the window in a smooth fashion.

      mywindow = wd_compcontroller->LO_POP_UP

      mywindow.close().

      Thanks

      Anzy.

      mark this thread as closed if this solves your problem.