Problem solve Get help with specific problems with your technologies, process and projects.

How to integrate BW query iViews with a WebDynpro application

Learn how to integrate BW query iViews with a WebDynpro application in this user-submitted tip for SAP Enterprise Portal.

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: --> &gtobject>
         &ltparam name="OWNER" value="SAP_BW"/>
         &ltparam name="CMD" value="SET_PROPERTIES"/>
         &ltparam name="TEMPLATE_ID" value="ZZ_WEB_PREFS_COMP_CODE"/>
         &ltparam name="USE_PERSONALIZATION" value="X"/>
         &ltparam name="VARIABLE_SCREEN" value="X"/>
         &ltparam name="MENU_BOOKMARK" value=""/>
         &ltparam name="MENU_PERSONALIZE" value="X"/>

         &ltparam name="OWNER" value="SAP_BW"/>
         &ltparam name="CMD" value="SET_DATA_PROVIDER"/>
         &ltparam name="NAME" value="DATAPROVIDER_1"/>
         &ltparam name="QUERY" value="ZZ_WEBP_PREFS_COMP_CODE"/>
         &ltparam 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;
                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
      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)
                    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("", "CCDEVENT",value, null);
           } else {
              EPCMPROXY.raiseEvent("", "CCDEVENT",value, null);
//           alert("Event raised");
    &ltMETA NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
    &lttitle&gtBW Web Application</title>
    &ltlink href="/sap/bw/Mime/Customer/StyleSheets/BIReports30_ie6.css" type="text/css" rel="stylesheet"/>
<!--BW HTML items object tags: -->
         &ltparam name="OWNER" value="SAP_BW"/>
         &ltparam name="CMD" value="GET_ITEM"/>
         &ltparam name="NAME" value="CHECKBOXES_1"/>
         &ltparam name="ITEM_ID" value="ZZ_WEB_CHECKBOXES_ITEM"/>
         &ltparam name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
         &ltparam name="CAPTION" value="Selection for Company Code:"/>
         &ltparam name="IOBJNM" value="ZCOMPCODE"/>
         &ltparam name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1"/>
         ITEM:            CHECKBOXES_1
&ltA class=button href="Javascript:doEventing()"&ltSubmit</A>
This was last published in April 2006

Dig Deeper on SAP NetWeaver

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.