Skip to Content
author's profile photo Former Member
Former Member

Compound value from BPS to BW

Hi

I am using an SEM BPS web application and wish to pass multiple variable to BW Web application so to display a report. I need to compound my profit center field with controlling area but cannot work out how to amend the example code on the "How-To" guide. Can any help with this. Code is below:

Thanks

Simon

<iframe

id ="myWebAppl"

src="/sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=MYTEMPLATE"

style="width:800;height:600">>

</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( 'myWebAppl' );

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

var queryVar1 = '&VAR_NAME_1=0PROFIT_CTR&VAR_VALUE_EXT_1=';

var queryVar2 = '&VAR_NAME_2=0VERSION&VAR_VALUE_EXT_2=';

var queryVar3 = '&VAR_NAME_2=0FISCYR&VAR_VALUE_EXT_2=';

var appl = 'XBPSWEBAPP2';

var bpsVarvl1 = '<%=descr(VarCountry/value)%>';

var bpsVarvl2 = '<%=descr(VarVersion_Customer/value)%>';

var bpsVarvl3 = '<%=descr(VarFY_Customer/value)%>';

bpsVarvl1 = varValueConvert(bpsVarvl1);

bpsVarvl2 = varValueConvert(bpsVarvl2);

bpsVarvl3 = varValueConvert(bpsVarvl3);

// create URL

url = url + appl + queryVar1 + bpsVarvl1 + queryVar2 + bpsVarvl2 + queryVar2 + bpsVarvl3;

// remove possible white spaces

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

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

// set source attribute of iframe to new URL

frame.src = url;

</script>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2007 at 05:10 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2007 at 09:44 AM

    Bump....

    Help anyone

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 12:32 PM

    <br>

    <FONT FACE = "Tahoma", Font Color = "Blue">

    Hi

    <Br>

    Please confirm what is your exact requirement. <Br> You want to pass on some values selected by User on BPS Web Interfaces to some BW Reports automatically? And whilst doing that, you want BW to consider that value of Controlling Area which is relevant for the value of Profit Centre selected by User on BPS Web Interface.

    Am I right?<Br><Br>

    Cheers

    Abhijit

    <Br>* It's a good habit to reward someone with points in SDN if you think his/her response was helpful to you

    </FONT>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.