6 Replies Latest reply: Jun 8, 2005 6:58 PM by Heike Guder RSS

BEx Web - Web cockpits in BW3.5

Laurent Querella
Currently Being Moderated

Hi,

 

My previous question on BEx Web multiple tabs has been answered.

However, the provided solution does not work when one wishes to get a cockpit like Glen Leslie's. The latter is using the Web Template web item feature of BW3.5 with additional java coding.

I would like to build such a cockpit with a structure like:

- MyHeader

- Web template web item = multiple tabs

- MyFooter

 

If I embed the former solution as a web template web item, the switch between tabs does not work anymore.

 

Glen, if you hear me, please help me...

 

Others are welcome!

 

Cheers.

 

LauQ.

  • Re: BEx Web - Web cockpits in BW3.5
    Currently Being Moderated

    Hi again,

     

    I do not understand your problem?

     

    You can integrate further WebTemplates with the WebItem "WebTemplate name" in the existing template.

     

    I think following coding solves your answer...

     

    rgds Jens

     

            1.   Coding for the cockpit structure  #####

     

    <object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="SET_PROPERTIES"/>

             <param name="TEMPLATE_ID" value=""/>

             TEMPLATE PROPERTIES

    </object>

     

     

    <HTML>

    <!-- BW data source object tags -->

    <object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="SET_DATA_PROVIDER"/>

             <param name="NAME" value="DATAPROVIDER_2"/>

             <param name="DATA_PROVIDER_ID" value=""/>

             DATA_PROVIDER:             DATAPROVIDER_2

    </object>

     

    <object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="SET_DATA_PROVIDER"/>

             <param name="NAME" value="DATAPROVIDER_1"/>

             <param name="DATA_PROVIDER_ID" value=""/>

             DATA_PROVIDER:             DATAPROVIDER_1

    </object>

    <HEAD>

    <TITLE>BW Web Application</TITLE>

    <link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>

    <script type="text/javascript">

    <!--

    /* function goto_tab: Show all items, starting with tabname, Hide all other items */

    function goto_tab(tabname) {

    SAPBWOpenURL(SAP_BW_URL_Get()'&item=TAB*&multi=X&hidden=X&cmd_1=item%3d'tabname+'*%26hidden%3d %26multi%3dX');

    }

    /* DHTML function to set correct span-Tag visible

    For each Tab in Tab-Header (head_TAB) check, if item TABx is visible

    If Item is visible set Header as selected

    Otherwise set corresponding span-Tag to not visible */

    function set_actual_tab() {

    i=0;

    do {

    i++;

    if (document.getElementById('head_TAB'+i) != null) {

    /* Check if Object tag is hidden */

    var prop = SAPBWGetItemProp('TAB'+i);

    var hidden=true;

    if (prop != null){

    for(j=1;j<prop.length;j++){

    if (prop[j][0] == "HIDDEN") hidden = (prop[j][1]=='X');

    }

    }

    if (hidden) {

    document.getElementById("TAB"+i).setAttribute('style', 'display:none;visibility:false;',false);

    }

    else {

    document.getElementById("head_TAB"+i).setAttribute('className', 'SAPBEXTbsTABsel',false);

    }

    }

    } while (document.getElementById('head_TAB'+i) != null)

    }

    -->

    </script>

    </HEAD>

    <BODY>

    <P><object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="GET_ITEM"/>

             <param name="NAME" value="HEADER"/>

             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

             <param name="GENERATE_CAPTION" value=""/>

             <param name="USE_ONLY_BODY" value=""/>

             <param name="NAME_PREFIX" value="HEADER"/>

             ITEM:            HEADER

    </object></P>

    <table cellspacing="0" cellpadding="5" border="0" id="tabheader">

    <tr>

    <td class="SAPBEXTbsTab" id="head_TAB1"><A href="javascript:goto_tab('TAB1')">Query</A>

    </td>

    <td class="SAPBEXTbsTab" id="head_TAB2"><A href="javascript:goto_tab('TAB2')">Query View</A>

    </td>

    <td class="SAPBEXTbsTab" id="head_TAB3"><A href="javascript:goto_tab('TAB3')">Template</A>

    </td>

    <td class="SAPBEXTbsTab" id="head_TAB4"><A href="javascript:goto_tab('TAB4')">BEx Web Analyzer</A>

    </td>

    </tr>

    </table>

    <table width="100%" class="SAPBEXTbsBdyEdg" cellspacing="0" cellpadding="5" border="0">

    <tr>

    <td valign="top" >

    <P>

    <span id="TAB1">

    <object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="GET_ITEM"/>

             <param name="NAME" value="TAB1"/>

             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>

             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>

             <param name="GENERATE_CAPTION" value=""/>

             <param name="BORDER_STYLE" value="NO_BORDER"/>

             ITEM:            TAB1

    </object>

    </span>

    <span id="TAB2" ><object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="GET_ITEM"/>

             <param name="NAME" value="TAB2"/>

             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>

             <param name="DATA_PROVIDER" value="DATAPROVIDER_2"/>

             <param name="HIDDEN" value="X"/>

             <param name="GENERATE_CAPTION" value=""/>

             <param name="BORDER_STYLE" value="NO_BORDER"/>

             ITEM:            TAB2

    </object>

    </span></P>

    <P><SPAN id="TAB3"><object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="GET_ITEM"/>

             <param name="NAME" value="TAB3"/>

             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

             <param name="HIDDEN" value="X"/>

             <param name="GENERATE_CAPTION" value=""/>

             <param name="USE_ONLY_BODY" value=""/>

             <param name="NAME_PREFIX" value="TAB3"/>

             ITEM:            TAB3

    </object>

    </SPAN></P>

    <P><SPAN id="TAB4"><object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="GET_ITEM"/>

             <param name="NAME" value="TAB4"/>

             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

             <param name="HIDDEN" value="X"/>

             <param name="GENERATE_CAPTION" value=""/>

             <param name="USE_ONLY_BODY" value=""/>

             <param name="TEMPLATE_ID" value="0ANALYZER"/>

             <param name="BORDER_STYLE" value="NO_BORDER"/>

             ITEM:            TAB4

    </object></SPAN></P>

    </td>

    </tr>

    </table>

    <script type="text/javascript">

    <!--

    /* This function call is needed to set the correct state */

    set_actual_tab();

    -->

    </script>

    <P><object>

             <param name="OWNER" value="SAP_BW"/>

             <param name="CMD" value="GET_ITEM"/>

             <param name="NAME" value="FOOTER"/>

             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

             <param name="GENERATE_CAPTION" value=""/>

             <param name="USE_ONLY_BODY" value=""/>

             <param name="NAME_PREFIX" value="FOOTER"/>

             ITEM:            FOOTER

    </object></P>

    </BODY>

    </HTML>

    • Re: BEx Web - Web cockpits in BW3.5
      Laurent Querella
      Currently Being Moderated

      Thanks a lot Jens,

       

      In the meantime I had heavily tested and now I think I'm quite comfortable with this stuff.

       

      Best regards.

       

      LauQ.

      • Re: BEx Web - Web cockpits in BW3.5
        Faisal Haneef
        Currently Being Moderated

        Hi Jens,

         

        Maybe you can help me, I am trying to do something similar but without haveing a header or footer. A main report with four tabs that each call a web template item.

         

        I copied your example but with the first two tabs that contained tables I replaced them with a web template item.  This works however, on navigation the items don't always get hidded.  Can you help me with this.

         

        Thanks in advance.

         

        Faisal

         

        ps I have included my code.

         

        <object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="SET_PROPERTIES"/>

                 <param name="TEMPLATE_ID" value="FH_MAIN_REPORT"/>

                 TEMPLATE PROPERTIES

        </object>

         

         

        <HTML>

        <!-- BW data source object tags -->

         

        <HEAD>

        <TITLE>BW Web Application</TITLE>

        <link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>

        <script type="text/javascript">

        <!--

        /* function goto_tab: Show all items, starting with tabname, Hide all other items */

        function goto_tab(tabname) {

        SAPBWOpenURL(SAP_BW_URL_Get()'&item=TAB*&multi=X&hidden=X&cmd_1=item%3d'tabname+'*%26hidden%3d %26multi%3dX');

        }

        /* DHTML function to set correct span-Tag visible

        For each Tab in Tab-Header (head_TAB) check, if item TABx is visible

        If Item is visible set Header as selected

        Otherwise set corresponding span-Tag to not visible */

        function set_actual_tab() {

        i=0;

        do {

        i++;

        if (document.getElementById('head_TAB'+i) != null) {

        /* Check if Object tag is hidden */

        var prop = SAPBWGetItemProp('TAB'+i);

        var hidden=true;

        if (prop != null){

        for(j=1;j<prop.length;j++){

        if (prop[j][0] == "HIDDEN") hidden = (prop[j][1]=='X');

        }

        }

        if (hidden) {

        document.getElementById("TAB"+i).setAttribute('style', 'display:none;visibility:false;',false);

        }

        else {

        document.getElementById("head_TAB"+i).setAttribute('className', 'SAPBEXTbsTABsel',false);

        }

        }

        } while (document.getElementById('head_TAB'+i) != null)

        }

        -->

        </script>

        </HEAD>

        <BODY>

        <P><object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="GET_ITEM"/>

                 <param name="NAME" value="HEADER"/>

                 <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

                 <param name="USE_ONLY_BODY" value=""/>

                 <param name="NAME_PREFIX" value="HEADER"/>

                 <param name="GENERATE_CAPTION" value=""/>

                 ITEM:            HEADER

        </object></P>

        <table cellspacing="0" cellpadding="5" border="0" id="tabheader">

        <tr>

        <td class="SAPBEXTbsTab" id="head_TAB1"><A href="javascript:goto_tab('TAB1')">Query</A>

        </td>

        <td class="SAPBEXTbsTab" id="head_TAB2"><A href="javascript:goto_tab('TAB2')">Query View</A>

        </td>

        <td class="SAPBEXTbsTab" id="head_TAB3"><A href="javascript:goto_tab('TAB3')">Template</A>

        </td>

        <td class="SAPBEXTbsTab" id="head_TAB4"><A href="javascript:goto_tab('TAB4')">BEx Web Analyzer</A>

        </td>

        </tr>

        </table>

        <table width="100%" class="SAPBEXTbsBdyEdg" cellspacing="0" cellpadding="5" border="0">

        <tr>

        <td valign="top" >

        <P><SPAN id="TAB3"><object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="GET_ITEM"/>

                 <param name="NAME" value="TAB1"/>

                 <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

                 <param name="TEMPLATE_ID" value="FH_DLA_WIP_HISTORY"/>

                 <param name="NAME_PREFIX" value="TAB1"/>

                 <param name="GENERATE_CAPTION" value=""/>

                 <param name="BORDER_STYLE" value="NO_BORDER"/>

                 ITEM:            TAB1

        </object><object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="GET_ITEM"/>

                 <param name="NAME" value="TAB2"/>

                 <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

                 <param name="HIDDEN" value="X"/>

                 <param name="TEMPLATE_ID" value="FH_DLA_ET_MWIP"/>

                 <param name="NAME_PREFIX" value="TAB2"/>

                 <param name="GENERATE_CAPTION" value=""/>

                 <param name="BORDER_STYLE" value="NO_BORDER"/>

                 ITEM:            TAB2

        </object><object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="GET_ITEM"/>

                 <param name="NAME" value="TAB3"/>

                 <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

                 <param name="HIDDEN" value="X"/>

                 <param name="USE_ONLY_BODY" value=""/>

                 <param name="TEMPLATE_ID" value="FH_DLA_ET_FP"/>

                 <param name="NAME_PREFIX" value="TAB3"/>

                 <param name="GENERATE_CAPTION" value=""/>

                 ITEM:            TAB3

        </object>

        </SPAN></P>

        <P><SPAN id="TAB4"><object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="GET_ITEM"/>

                 <param name="NAME" value="TAB4"/>

                 <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

                 <param name="HIDDEN" value="X"/>

                 <param name="USE_ONLY_BODY" value=""/>

                 <param name="TEMPLATE_ID" value="FH_DLA_REALISATION"/>

                 <param name="NAME_PREFIX" value="TAB4"/>

                 <param name="GENERATE_CAPTION" value=""/>

                 <param name="BORDER_STYLE" value="NO_BORDER"/>

                 ITEM:            TAB4

        </object></SPAN></P>

        </td>

        </tr>

        </table>

        <script type="text/javascript">

        <!--

        /* This function call is needed to set the correct state */

        set_actual_tab();

        -->

        </script>

        <P><object>

                 <param name="OWNER" value="SAP_BW"/>

                 <param name="CMD" value="GET_ITEM"/>

                 <param name="NAME" value="FOOTER"/>

                 <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

                 <param name="USE_ONLY_BODY" value=""/>

                 <param name="NAME_PREFIX" value="FOOTER"/>

                 <param name="GENERATE_CAPTION" value=""/>

                 ITEM:            FOOTER

        </object></P>

        </BODY>

        </HTML>

         

Actions