cancel
Showing results for 
Search instead for 
Did you mean: 

Close the main window

former_member610985
Participant
0 Kudos

Hi,

Initially when I execute my application I have to open a new outlook window and in the mean time the existing window should be closed.

I am able to open the new outlook window but not able to close the existing window. Please let me know if there is any possibility.

Regards,

Arun.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Is your new window modal window or external window.?

Use Exit Plug and close the existing window and open a new in the same window by passing the URL with parameter.

Check this thread : http://scn.sap.com/thread/2041174

Hope this helps u.,

Regards,

Kiran

former_member610985
Participant
0 Kudos

Hi Kiran,

Actually I have to open an outlook window directly when the application is executed. I have tried the same scenario which you have mentioned, it works when we try to open any weblink but when we try to open the outlook then the outlook is opening in new window and the existing (parent) window is not getting closed.

Regards,

Arun.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Arunagiri,

     Same as parameter 'URL' take a parameter 'CLOSE_WINDOW' .

This will be used to close the parent window.

  Chek the below help document

http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/content.htm

Regards,

Monishankar Chatterjee

former_member610985
Participant
0 Kudos

Hi Monishankar,

I have used the below code to open the outlook initially when the application is executed.

   DATA lo_ZSAMPLE_WD1 TYPE REF TO IG_ZSAMPLE_WD1 .
  lo_ZSAMPLE_WD1 =   wd_this->get_zsample_wd1_ctr( ).

    lo_zsample_wd1->fire_exit_to_url_plg(
     url =  'mailto:<mailid>' ).

But when this outlook gets opened the parent window should get closed thats not happening.

As per ur suggestion i have changed the code as below:

lo_zsample_wd1->fire_exit_to_url_plg(

     url =  'mailto:<mailid>' 

  close_window = 'X'  ).

I have added a CLOSE_WINDOW parameter in the exit plug of type boolean.. but i am getting the below error.

'With an exit plug the URL and CLOSE_WINDOW parameters are not permitted to be specified at the same time'

Regards,

Arun.

Former Member
0 Kudos

Hi ,

   You can not do both task simultaneously i.e moving to other url & closeing window.

The  'URL' one is trying to to redirect to a specified URL from the parenet window as same time the 'CLOSE_WINDOW' tis trying to close the main window. Its conflict , remove any one of them i.e. if you want to close remove the parameter 'URL' & the code for that.

Regards,

Monishankar Chatterjee

former_member610985
Participant
0 Kudos

Hi,

So is there any other work around for opening the outlook and closing the parent window

simultaneously.

Regards,

Arun.

former_member184578
Active Contributor
0 Kudos

Hi,

You can open Outlook using AcfExecute. Check my article here: http://scn.sap.com/docs/DOC-34524

But am not sure whether you can close window or not. Give a try.

Regards,

Kiran