Showing results for 
Search instead for 
Did you mean: 

Close Web Dynpro Application on click of button

Former Member
0 Kudos


I have a Web Dynpro Appliaction which would be open in a Portal iView. I have a close button in the application. How do I close the application on the click of "Close" button.



Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos


I am looking too for a button to close the browser window in a web dynpro application. The code, that you all posted above is very helpful, but I need it in ABAP. Is that possible? I am not expert in ABAP.

Thx a lot.


Former Member
0 Kudos


1. Go to your Webdynpro component Interface View (<Your Webdynpro project> - WebDynpro - Web Dynpro Components - <your component> - Component Interface - Interface Views - <component>InterfaceView)

create a outbound plug (CloseWindow) of type exit with parameter "Url" as String

2. Go to your view controller and in the action to close the window


String Url = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");

wdThis.wdGet<your component>InterfaceViewController().wdFirePlugCloseWindow(Url);


catch(WDURLException WDURLe){


3. Create a html file with following content and place it in the src --> mimes --> Components --> <your component> -- > close.html



<script langauage="javascript">

function closeWindow()


var currWindow =;

currWindow.opener =;





<body onload="javascript:closeWindow()">



This code will close your present explorer window.

Former Member
0 Kudos

Hi Prasanna,

check this link,u get a clear idea for close button



Former Member
0 Kudos

Hi prasanna,

First, it is very bad decision to make decisions instead of user. Just redirect him to logoff page and let close window himself.

In WebDynpro you may use Exit plug on interface view with parameter Url (notice the case) of type string.

Then you may previously fire this plug with JavaScript url: javascript:void(

In recent versions of WD this will not work. So you have to redirect user via exit plug to some static html page, that contains in header <script>;</script>

Check the below thread,u will get an solution for your question....