Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to close Portal Window

Hi,

I'm opening my iVew as "Display in seperate Window" and this iView has one close button.

Once I click on this button, the full browser window should be closed.

I have done like this:-

First created an html file (Say close.html) inside Project\src\mimes\Components\package with contents

<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>

Now open InterfaceViews-><ViewName>InterfaceView

Create an Exit outboundplug with parameter Url(use the same name in the scenario) of type String. Save all metadata.

Inside the closeAction, written following code

String url=WDURLGenerator.getWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"Close.html");

wdThis.wdGet<ViewName>InterfaceViewController().wdFirePlugCloseWindow(url);

This is working fine with simple Web Dynpro App but once I deployed this as a iView in the portal and opened as "Display in seperate Window" than this code is not working for me.

Can anybody suggest how can I close my portal window?

Thanks,

Vikas

Message was edited by:

Vikas Saxena

Former Member
Not what you were looking for? View more on this topic or Ask a question