on 2005 Jul 21 11:50 AM
Hi all,
I have successfully implemented the "How to.." document with BPS variables feeding the Bex filters, but can anyone out there help me understand how to launch the Bex application into a new window rather than it being embedded in a frame (inside the planning layout, that is)?
I am trying to set up a button to press in order to launch the report in a new window....
The current code in the text component (in BPS_WB) is as follows:
<iframe id="BWReport03"
name="BWQUERY"
src="/sap/bw/mime/bex/icons/pixel.gif"
width="1000" height="600"></iframe>
<script language="JavaScript" type="text/javascript">
var frame = document.getElementById( 'BWReport03' );
var url = '/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=';
var filter = '&FILTER_IOBJNM=MYINFOOBJECT&FILTER_COLLAPS=&FILTER_VALUE_EXT=';
// Example using fiscal year 2004 and variant K4: K4/2004 => comp = #K4/#
var comp = '';
var appl = 'MYBEXAPPLICATION';
var varvl = 'MYVARIABLE';
// Option: Adjust the 'SELECT' to your local language
if (varvl != "" && varvl != "-- SELECT --"){
// expected formatting of variable selector: Text(Key) or Key
var convert = /\((.*)\)/;
convert.exec(varvl);
// If there is value in brackets it is the key
if ( RegExp.$1 != "") varvl = RegExp.$1;
// create URL
url = url + appl + filter + comp + varvl;
// remove possible white spaces
url = url.replace(/ /,"");
// set source attribute of iframe to new URL
frame.src = url;
}
</script>
Rael,
that's easy
<span>
<a href="#1" onclick="open_url();return false;"
class="urBtnStd" id="OpenButton1" ct="Button"
style="white-space:nowrap;"
OnMouseOver="javascript:window.status = 'Open BEx Application';return true;"
title="Open BEx Application">
<nobr>Open BEx Application</nobr>
</a>
</span>
<script type="text/javascript">
function open_url () {
// INSERT THE OLD SCRIPT HERE (without the frame.src = url line)
// OPEN WINDOW
var window1 = window.open(url,"Window1","width=310,height=400,left=100,top=100");
}
</script>
Regards
Marc
SAP NetWeaver RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marc,
Works like a dream....
Many thanks,
Rael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.