cancel
Showing results for 
Search instead for 
Did you mean: 

Closing a webDynpro

Former Member
0 Kudos

Hi there,

I am calling a webDynpro through a external web application. It works fine but I need to be able to close the webDynpro when a certain event occurs. This event is fired on the webDynpro.

I am opening a new window to call the URL of the webDynpro. How can I close the webDynpro?

I cannot find the method to close the webDynpro, neither I can execute javascript.

Any help is welcome.

Thanks to all.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Miguel,

To close a WebDynpro window from the application itself, these steps will help you:

1) In the InterfaceView of your component, create an exitplug with a parameter 'Url' of type String (the name should be exactly 'Url').

2)Make sure you have added the InterfaceViewController in the list of 'requiredControllers' of the view or component from which you want to trigger this action.

3) Now to close the window, all you need to do is to call the plug like:

wdThis.wdGet<application name>InterfaceViewController().wdFirePlug<your plug name>("javascript:void(window.close())");

This will close the window, but will show a confirmation window prior to closing the parent window.

Hope this helps,

Best Regards,

Nibu.

thomas_szcs
Active Contributor
0 Kudos

Hi Nibu,

Executing javascript in an exit plug sounds a bit like exploiting a bug. This is very likely to be fixed in future, since Web Dynpro does not allow javascript to be executed anywhere for the reason that there are also non-HTML clients, such as the SmartBoard. Closing the window there won't work this way then. So I don't recommend using this.

Kind regards,

Thomas

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your tips. I spent a decent amount of time looking for a similar problem on the forums and couldn't find it.

I will have to "refine" my searching methods next time

As far as there is no other solution, I will use this the javascript one so far. We'll see later on

Former Member
0 Kudos

Hi,

This is what you are looking for -

~kranthi