cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos
71

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>

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

First of all, it's not clear how you are getting BPS variable value.

Next, it seems that BPS web interface and BW web report are placed in the same iframe ?

Is this correct ?

Former Member
0 Kudos

Hi Vlad,

Thanks for your response. Iam deriving the BPS variable by creating a subcomponent in BPS web interface with Selector variable value. The variable name is declared in this section. Then finally in the code iam just giving the sub component name.

Former Member
0 Kudos

More info....

There is a how to document "How to Integrage BEx Web Applications into BPS Web Interfaces". Iam moreorless referring to the same documentation.

Thanks.

Former Member
0 Kudos

Ok, it's clear, but what means "click on the link" in your question ? In how to there is no any hyperlink. Contents of frame with BW report is changed after selecting a new value of variable in selector in this example.

Former Member
0 Kudos

Hi Vlad,

I revised the code as below and now Iam able to sucessfully execute the report in BPS layout, however the BPS variable value is not passing to the BI Report; any ideas... Thanks Again...

<iframe id="BPSREPOR"

name="BPS Report"

src="/sap/bi/mime/bex/icons/pixel.gif"

width="1000" height="600"></iframe>

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

var frame = document.getElementById( 'BPSREPOR' );

var url = 'http://wbvmburpr10.warnerbros.com:50100/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=';

var filter = '&FILTER_IOBJNM=0COMP_CODE&FILTER_COLLAPS=&FILTER_VALUE_EXT=';

// Example using fiscal year 2004 and variant K4: K4/2004 => comp = #K4/#

var comp = '';

var appl = 'BPSREPOR';

var varvl = '<%descr(BPS_VARIABLE/value)%>';

// 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 + varvl;

alert (url);

// remove possible white spaces

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

// set source attribute of iframe to new URL

frame.src = url;

}

</script>