Skip to Content
avatar image
Former Member

how to close a window.. pls help

Hi friends,

I have a WD and on a button i m calling another webdynpr ona other browser.

I used --



application_name = 'ZWDA4_TEST'


out_absolute_url = url ).

lo_api_component = wd_comp_controller->wd_get_api( ).

lo_window_manager = lo_api_component->get_window_manager( ).

lo_window = lo_window_manager->create_external_window(

url = url

lo_window->open( ).

But on Webdynpro2, i have a button, once this button is clicked i want to close this window..

can someone tell me how to code to close an existing window.. code pls..

thanks in advance,


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 18, 2008 at 01:18 AM


    Please check this [blog.|] [original link is broken] [original link is broken] [original link is broken];

    I hope it can help you.



    Are you newbie? Check this out: [Rules of Engagement|]

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 18, 2008 at 05:32 AM

    Hi Niraja,

    When you use the create_external_window to open your application in a new window it would be returning back the reference of this new window to you. So you will have to try figure out a way by which you can pass on this reference to your second component. (This reference passed back is of type CL_WDR_EXTERNAL_URL_WINDOW )Within the 2nd component you can just use the IF_WD_WINDOW~CLOSE method of CL_WDR_EXTERNAL_URL_WINDOW to close your 2nd application window. I couldnu2019t give it a try myself to make sure of this but just try doing it. I think that it should work for you.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Niraja,

      You have two components i.e. let say P component is parent and C component is the called componet.

      1) In your C component create an attribute lets say gv_window of type if_wd_window and keep it public.

      2) In the C component only create an interface method with parameter of type if_wd_window. Now in the implementation of this method set the value of attribute gv_window created in step 1 to the value of parameter.

      3) In the P component after opening the window, call this interface method of C component by passing the instance of window which you created.

      4) Now in the C component on your button click while calling method to close the window pass the window instance as wd_comp_controller->gv_window.

      And your work is done.