How to integrate BW query iViews with a WebDynpro application

By adding a few lines of JavaScript code to your BW Web template, you can integrate BW query iViews with your WebDynpro application in your SAP Enterprise Portal. Raising portal events is also shown in the code so you can pass data between the different iViews. See the code below.
<!--BW HTML data source object tags: --> >object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="SET_PROPERTIES"/>
         <param name="TEMPLATE_ID" value="ZZ_WEB_PREFS_COMP_CODE"/>
         <param name="USE_PERSONALIZATION" value="X"/>
         <param name="VARIABLE_SCREEN" value="X"/>
         <param name="MENU_BOOKMARK" value=""/>
         <param name="MENU_PERSONALIZE" value="X"/>

         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="SET_DATA_PROVIDER"/>
         <param name="NAME" value="DATAPROVIDER_1"/>
         <param name="QUERY" value="ZZ_WEBP_PREFS_COMP_CODE"/>
         <param name="INFOCUBE" value="ZCOMPCODE"/>
         DATA_PROVIDER:             DATAPROVIDER_1

        a.button:hover {
                 background-color : FF9900;
       a.button {   
                display : block;
                width : 53px;
                height : 20px;
                text-align : center;
                font-family : Arial;

    Requires Free Membership to View

font-style : normal ; font-size : 8pt; font-weight : normal; color : black; text-decoration : none; background-color : FFCC66; padding : 1px; border-top : solid #000000 1px; border-right : solid #000000 1px; border-left : solid #000000 1px; border-bottom : solid #000000 1px } </style> <SCRIPT> function doEventing() { { // var l_length = document.forms[0].elements.length; // alert("l_length=" + l_length); var l_num_recs = (document.forms[0].elements.length-3/2)+1; // alert("l_num_recs=" + l_num_recs); var l_start_element = document.forms[0].elements.length - l_num_recs; // alert("l_start_element=" + l_start_element); var l_list = ""; for(jj= l_start_element; jj<= l_num_recs; ++jj) { if(document.forms[0].elements[jj].checked) { var l_value = document.forms[0].elements[jj].value; l_list = l_list + l_value + ","; } } var value = l_list; // alert("value=" + value); if (top.opener) { top.opener.EPCM.raiseEvent("urn:com.chep.portfolio.plus:BWEvents", "CCDEVENT",value, null); top.close(); } else { EPCMPROXY.raiseEvent("urn:com.chep.portfolio.plus:BWEvents", "CCDEVENT",value, null); } // alert("Event raised"); } } </SCRIPT> <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control"> <title>BW Web Application</title> <link href="/sap/bw/Mime/Customer/StyleSheets/BIReports30_ie6.css" type="text/css" rel="stylesheet"/> </head> <body> <!--BW HTML items object tags: --> <P> <object> <param name="OWNER" value="SAP_BW"/> <param name="CMD" value="GET_ITEM"/> <param name="NAME" value="CHECKBOXES_1"/> <param name="ITEM_ID" value="ZZ_WEB_CHECKBOXES_ITEM"/> <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/> <param name="CAPTION" value="Selection for Company Code:"/> <param name="IOBJNM" value="ZCOMPCODE"/> <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1"/> ITEM: CHECKBOXES_1 </object>   <tr> <A class=button href="Javascript:doEventing()"<Submit</A> </tr></P> </body> </html>

This was first published in April 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.