cancel
Showing results for 
Search instead for 
Did you mean: 

Close Main Window directly on action on Pop up window

Former Member
0 Kudos

Hi All,

I am calling a pop-up window on th emain window and on Action 'OK' on the Pop-up window I want to close the main window.

Please let me know how can I achieve the same.

Thanks

Deb

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I have an application where I do this. I create an exit output plug in the my main window. From the popup view, you can access the parent window and trigger this exit plug:

data lo_w_main type ref to ig_w_main .
  lo_w_main =   wd_this->get_w_main_ctr( ).

  lo_w_main->fire_exitapp_plg(
    url =  lv_exit_url  ).

Former Member
0 Kudos

Hi,

Is URL is a mandatory parameter ?

Thanks

Deb

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Do you want to close the entire browser? If so use the parameter CLOSE_WINDOW instead. You can read about exit plugs here:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm

Former Member
0 Kudos

Hi Thomas,

I am not being able to refer to ig_w_main. Is it a standard class/interface ?

Why do I have to add the main view main view in pop up view as component use and If I have to , how to do that ?

Thanks a lot for your help.

Deb

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Like many generated objects within Web Dynpro, the classes and interfaces are based upon the name you gave the objects they represent. I named my main window W_MAIN. Therefore the interface to access it is IG_W_MAIN. You need to adjust your logic to account for whatever you named your Window: IG_<your window name>.

You do have to add a component usage for the main window into the view of your popup.

Former Member
0 Kudos

Hi

Thanks for the help.Problem is solved.

Thanks

Deb

Answers (0)