Skip to Content
0
Former Member
Feb 23, 2007 at 11:05 PM

BW Web Report Link in BPS Web Interface (Passing Variables)

46 Views

Hi Gurus,

Iam able to sucessfully embed BW Web Report into BPS Web Interface. However Iam not able to solve passing the BPS variables values into BW Report. It gives me BSP error when i click on the link, also the link shows like '<target_blank>'. Below is the code Iam using; please advise;

<iframe id ="(BPS Web Interface)" src="/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID="(BW Web Report)" style="width:800;height:150">> </iframe>

<script language="JavaScript" type="text/javascript">

function varValueConvert(dispValue){

/* Expected formatting of variable selector: Text(Key) or Key

If there are more than one (...) expression the first is taken.

*/

var keySection = dispValue.match(/\(.*?\)/);

if (keySection){

var keyValue = keySection[0].replace(/\(|\)/g,"");

//alert(dispValue + ' : ' + keySection + " : " +keyValue);

return keyValue;

} else {

//alert(dispValue);

return dispValue;

}

}

var frame = document.getElementById( 'BPS Web Interface' );

var url = '/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=';

var queryVar1 = '&VAR_NAME_1=(Variable Name)&VAR_VALUE_EXT_1=';=';

var appl = 'BW Web Report';

var bpsVarvl1 = '<%=descr(BPS Component Name/value)%>';

bpsVarvl1 = varValueConvert(bpsVarvl1);

url = url + appl + queryVar1 + bpsVarvl1 ;

// remove possible white spaces

url = url.replace(/ /,"");

// alert('Generated URL: ' + url);

// set source attribute of iframe to new URL

frame.src = url;

</script>