Entering content frame

This graphic is explained in the accompanying text Example Scenario for the Parameter NO_OUTPUT Locate the document in its SAP Library structure

In the example scenario, you use a frameset with a display area and a control frame. You want to influence the display area from the control frame. For each structure element of the data provider, the scaling factor should be set to 1,000. Since, potentially, there could be some structure elements, it could happen that the sequence of commands becomes to large due to the length limitations for URLs. For this reason, the commands (SET_VALUE_PROPERTIES) are sent individually to the display template; the parameter NOT_OUTPUT is used during this process so that the data are read only after the last command.

The following describes the example scenario for the involved Web templates:

Web Template NOT_OUTPUT_EXAMPLE_FRAMESET

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"   "http://www.w3.org/TR/html4/frameset.dtd">

<html>

<head>

<title>No Output Example Frameset Template</title>

</head>

<frameset rows="20%,80%">

 

  <frame src="<SAP_BW_URL cmd='LDOC'  TEMPLATE_ID='NO_OUTPUT_FRAME_TOP'>" name="Top">

  <frame src="<SAP_BW_URL cmd='LDOC'  TEMPLATE_ID='NO_OUTPUT_FRAME_DISPLAY'>" name="display">

 

 

  <noframes>

     Browser doesn’t support frames

  <noframes>

</frameset>

</html>

The frameset template loads the Web template NO_OUTPUT_FRAME_TOP into the upper frame and the Web template NO_OUTPUT_FRAME_DISPLAY into the lower frame.

Caution

Note that this example can only be edited in text mode due to the use of framesets in the Web Application Designer. For more information, see Enhanced Editing in Text Mode.

Web Template NO_OUTPUT_FRAME_DISPLAY

<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_1"/>

         DATA_PROVIDER:             DATAPROVIDER_1

</object>

 

<object>

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

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

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

         TEMPLATE PROPERTIES

</object>

 

<HEAD>

<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">

<TITLE>BW Web Application</TITLE>

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

</HEAD>

<BODY>

<P><object>

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

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

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

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

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

         ITEM:            TABLE_1

</object></P>

<P id="keyfigures" style="DISPLAY: none; VISIBILITY: hidden"><object>

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

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

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

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

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

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

         <param name="IOBJNM"value="BHEFB4AILNIG728R8DP3ET51R"/>

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

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

         ITEM:            DROPDOWNBOX_1

</object></P>

</BODY>

</HTML>

In addition to containing the table for data display, the Web template contains the Web item Dropdown Box, with which the structure elements can be selected. This Web item possesses the attribute SHOW_LABEL=” “, ONLY_VALUES=X and GENERATE_CAPTION=” “. This leads to generation of <Oprtion> tags only. The Web item can be found within a <P> tag that is switched to hidden. In order to address the <P> tag, an ID is also assigned.

 

Web Template NO_OUTPUT_FRAME_TOP

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

       "http://www.w3.org/TR/html4/loose.dtd">

<html>

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

<object>

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

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

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

         TEMPLATE PROPERTIES

</object>

 

<head>

<title> BW Web Application </title>

<script>

<!--

  function set_scaling() {

/* Get the optionnode */

       optionnode = parent.display.document.getElementById('keyfigures').firstChild;

/* While node exist */

       while (optionnode!= null) {

/* Check whether correct node type */

             if ((optionnode.nodeType == '1') && (optionnode.nodeName == 'OPTION')  ) {

                 kyf = optionnode.getAttribute('value');

                  if (kyf!= '!ALL') {

/* For keyfigure fire URL with NO_OUTPUT */

                       url = parent.display.SAP_BW_URL_Get()  + '&CMD=SET_VALUE_PROPERTIES&data_provider=DATAPROVIDER_1&STRUCTURE_MEMBER_1=' + kyf + '&SCALING_FACTOR=3&NO_OUTPUT=X';

                       parent.display.SAPBWOpenURL(url);

                  }

            

             }

             optionnode = optionnode.nextSibling;

       }

/* Fire URL without NO_OUTPUT */

       url = parent.display.SAP_BW_URL_Get();

       parent.display.SAPBWOpenURL(url);

  }

-->

</script>

</head>

<body>

<A href="javascript:set_scaling()">Set Scaling factor</A>

</body>

</html>

The complete JavaScript logic is contained in this Web template. If you click on the link Set Scaling Factor link in the Web application, the JavaScript function set_scaling is called. This JavaScript function processes the generated <Option> tags of the Web item from the Web template NO_OUTPUT_FRAME_DISPLAY. If a corret tag is found, the tag attribute „value“ is read. The Unique-ID (UID) of the structure element is found here that is used to change the scaling factor of the structure element with the help of the Web API command SET_VALUE_PROPERTIES. The NO_OUTPUT parameter is used so that the data are not yet read. Once all of the key figures have been processed, a command is sent to the server again without setting the parameter NO_OUTPUT this time. The data is read and returned.

 

 

 

 

Leaving content frame