cancel
Showing results for 
Search instead for 
Did you mean: 

window closing

Former Member
0 Kudos

In my window there is a button when i click on that i want to close that window how can i do that?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi shanto,

see the below link,In that they mentioned how to create window and close the window.(creating external window)page no:11 onwards

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20jav...

Former Member
0 Kudos

Hi,

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"(name it in the same manner 'U'-uppercase and 'rl' - lower case) as String

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

try{

String Url = WDURLGenerator.getWebResourceURL (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

<html>

<head>

<script langauage="javascript">

function closeWindow()

{

var currWindow = window.top;

currWindow.opener = window.top;

currWindow.close();

}

</script>

</head>

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

</body>

</html>

Former Member
0 Kudos

Hi shanto..

wdThis.wdGet<your interface view controller>().wdFirePlug<your exit plug's name>("javascript:void(window.close())");

Urs GS

Former Member
0 Kudos

Hi shanto,

check this links

Regards,

vino

Former Member
0 Kudos

<b><b>Hi Shanto Aloor

Check This Thread

Regards

Chandran

former_member751941
Active Contributor
0 Kudos

Hi Shanto,

Check this threads steps are given.

Steps to create "close.html" file.

Step 1: Select Your Component(src/mimes/components/<ur webdynpro component>) from Navigrator

right click =>New =>

Step2: A wizard will appear select "Simple" from left and "File" from the right

Then Click Next button.

Step3: Give the File Name "close.html" and Finish.”Close.html” File will be created

Step4: select the "source" tab and paste the code.

Then select the "Preview" tab it will give you the option to "Save" the file.

Regards,

Mithu