cancel
Showing results for 
Search instead for 
Did you mean: 

close window

Carola1
Advisor
Advisor
0 Kudos

Hello

How can I close a window after a button event?.The action handler performs severals steps and at the end the window should be closed.

Is there a differnece between a normal window and a popup window ?

Thanks

Carola

Accepted Solutions (0)

Answers (4)

Answers (4)

Carola1
Advisor
Advisor
0 Kudos

explorer does not close...

mohammed_anzys
Contributor
0 Kudos

Hi Carola,

This happens sometimes, the solution is deactivate the service and activate it again in sicf. It will work.

Tahnks

Anzy

Former Member
0 Kudos

Hello, Anzy,

We try to use your instructions but like Carola we get a white page.

Do we need to have Java Engeen to use this code?

If not, do you have any idea why doesn't it work?

Thank you

Efrat

Former Member
0 Kudos

I implemented ANZY's blog and worked fine for me...

One thing is make sure the Javascript code is under the Log-Off Tab in the SICF node.....and dont forget to hit SAVE when u have put the code in there..

But one problem is that ...does this close the USer Session ??????????

That is fine I exit with a EXIT PLUG and wndow closes...but the user session is stilla ctive...

So What I did was , in the exit plug, I navigate to a BSP application which as a Javascript Code, to close the window and also end User session

<% runtime->keep_context = 0 %>

Former Member
0 Kudos

Hello Anand,

How do I navigate to another page?

Is it possible to navigate to an external url such as www.sap.com?

I don't use BSP application in my project

Thank you for your help

Efrat

Former Member
0 Kudos

> Hello Anand,

> How do I navigate to another page?

> Is it possible to navigate to an external url such as

> www.sap.com?

> I don't use BSP application in my project

> Thank you for your help

> Efrat

Hi Efrat,

You can use the EXIT_PLUG of the WIndow (Interface View Controller) to end the current application . This plug should be defined as a OUTBOUND PLUG of the Window with the Interface Flag marked and Type = Exit.

You can create a parameter , 'URL' (not lv_url or ev_url or anything else, BUT URL)for this plug.

You can call this plug, when u want to end the current application and supply the url of the page u wanna navigate to

This si the coding u will do in the action handler of the view when u want to navigate to a different URL. This action handler can be for a button.

data ref_ifc_view_ctr type ref to IG_<COMPONENET_NAME>.

ref_ifc_view_ctr = wd_this->Get_<COMPONENT_NAME>.

ref_ifc_view_ctr->Fire_Plg_<outbound_plug>( 'http://www.sap.com' ).

For migrating to a BSP application or any other resource in Mime rep, give the full path

ref_ifc_view_ctr->Fire_Plg_<outbound_plug>( '/sap/bc/<bsp or WebDynpro>/sap/<name of _resource>).

<b>There is a Redirect URL on the Error Pages Tab of the Service in SICF. I guess you can specify a fixed URL here too. Never used it...but u can try</b>

Thanks

Anand

Former Member
0 Kudos

Hi Anand

thank you for your help, I manage to navigate to a different page.

I tried to use the redirect url in the error pages in sicf but strangely it didn't work.

I'm happy with the solution you gave me,

Thanks

Efrat

Carola1
Advisor
Advisor
0 Kudos

Thanks. That's it.

Carola

Carola1
Advisor
Advisor
0 Kudos

Hello Anzy

I followed your nice step by step procedure with plugs and SICF, but the explorer window does not close but a white, empty explorer window stays there.

sicf: logg of :

<html><body onload="setTimeout('top.close(),100);"></body></html>

What do you thiank could be wrong ?

Kind regards.

Carola

mohammed_anzys
Contributor
0 Kudos

Hi Carola,

You can refer this blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6707. [original link is broken] [original link is broken] [original link is broken] [original link is broken]

Thanks

Anzy

Message was edited by:

Mohammed Anzy S

thomas_szcs
Active Contributor
0 Kudos

Hello Carola,

Just call my_popup_pointer->close( ).

Basically, the difference between a popup window and a normal window is that the normal window has no parent and doesn't feature all those additional fancy things that are required for popup windows, like a button row on the bottom or an optional icon to the left, etc.

Best regards,

Thomas

Carola1
Advisor
Advisor
0 Kudos

Hello Thomas.

sorry, but how do I get my window_pointer ?

In fact I have no popup, but a normal window defined in the WD workbench.

So I did'nt create the window with WINDOW_MANaGER->CREATE.

what's the syntax to get the window instance ?

thanks.

Carola

thomas_szcs
Active Contributor
0 Kudos

Hi Carola,

You are already inside of the window. Closing it means exiting the current application. This can be achieved by calling an exit-plug. If you would like to close the browser window as well, there is the possibility to add a special log-off page to the sicf node of the application that contains a window.close( ) javascript call. Please note, that IE still displays its own popup asking the user if he/she really wants to close the window. This cannot be prevented to my knowledge.

Best regards,

Thomas

mohammed_anzys
Contributor
0 Kudos

Hi

You can go through this blog also...explains the exit plug in a step by step manner.

/people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications

Thanks

Anzy