Show TOC

 Using Path Replacement in CommandsLocate this document in the navigation structure

Use

You want to create a Web template in which the user can filter according to an interval for the calendar month. The end of the interval is to be selected from a dropdown box.

Procedure
  1. Create a new Web template with two data providers. Both data providers are initialized with the same query.
  2. Insert an analysis Web item into the Web template and assign the first data provider to this Web item.
  3. Insert a dropdown box Web item into the Web template and assign the second data provider to this Web item.
  4. Select Characteristic Value/Structure Element (CHARACTERISTIC_SELECTION) as the data binding type for the dropdown box.
  5. Select 0CALMONTH as the characteristic.
  6. To determine the correct path for the dynamic replacement, insert the Data Provider - Information Web item from the Miscellaneous Web item group into the Web template, and assign the second data provider to this Web item.
  7. Save the Web template.
  8. Execute the Web template and select a value from the dropdown box. Display the source text for the generated HTML page and search for the <BICS_VIEW> tag. This XML provides information about the status of the data provider. Dynamic filters are under the tag <SELECTION_STATE>.
  9. In the Web Application Designer, for the dropdown box Web item, select Command via Command Wizard for the Additional Actionoption.For the execution time, choose After Default Action (AFTER).
  10. Call the command wizard using the Command (INSTRUCTION)parameter, select the Set Filter Values for a Characteristic (SET_SELECTION_STATE_SIMPLE) command, and enter the first data provider as Data Provided Affected (TARGET_DATA_PROVIDER_REF). Proceed as follows for the remaining command parameters:
    1. Under Characteristic (CHARACTERISTIC), select 0CALMONTH.
    2. Under Operator (RANGE_SELECTION_OPERATOR), select the Interval Selection(INTERVAL_SELECTION) operator. For Low Member (INTERVAL_SELECTION_LOW_MEMBER) of the operator, enter a fixed value (such as 200301); for High Member (INTERVAL_SELECTION_HIGH_MEMBER), enter any value (this is replaced later).
  11. Exit the command wizard and switch to the XHTML view in the Web Application Designer.
  12. In the XHTML view, search for where you specified the High Member (INTERVALL_SELECTION_HIGH_MEMBER) for the interval selection. Delete the attribute value (value="xxxxxx" ) and enter the path attribute (path=" DATA_PROVIDER:DP_2?/BICS_VIEW/SELECTION_STATE/SELECTION/CHARACTERISTICS/CHARACTERISTIC[@name='0CALMONTH']/SELECTIONS/SELECTION/MEMBER/@name").
  13. Save the Web template and execute it again.
Result

You have created a Web application in which the user can select the high member value of the filter from the dropdown box. The result is displayed in the table.

Example

The following code is an example of the code for the Web template created:

<bi:bisp  xmlns="http://www.w3.org/TR/REC-html40" xmlns:bi="http://xml.sap.com/2005/01/bi/wad/bisp" xmlns:jsp="http://java.sun.com/JSP/Page" >

<html >

 <head >

<title >NetWeaver BI Web Application</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body >

<bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" />

 <bi:QUERY_VIEW_DATA_PROVIDER name="DP_1" >

<bi:INITIAL_STATE type="CHOICE" value="QUERY" >

<bi:QUERY value="0D_DX_M01_Q0006" text="Type" />

</bi:INITIAL_STATE>

</bi:QUERY_VIEW_DATA_PROVIDER>

<bi:QUERY_VIEW_DATA_PROVIDER name="DP_2" >

<bi:INITIAL_STATE type="CHOICE" value="QUERY" >

<bi:QUERY value="0D_DX_M01_Q0006" text="Type" />

</bi:INITIAL_STATE>

</bi:QUERY_VIEW_DATA_PROVIDER>

<p >

<bi:DROPDOWN_ITEM name="DROPDOWN_ITEM_1" designheight="70" designwidth="200" >

<bi:DATA_BINDING_TYPE type="CHOICE" value="CHARACTERISTIC_SELECTION" >

<bi:CHARACTERISTIC_SELECTION type="COMPOSITE" >

<bi:DATA_PROVIDER_REF value="DP_2" />

<bi:CHARACTERISTIC value="0CALMONTH" text="" />

<bi:ACTION_WITH_DEFAULT type="CHOICE" value="INSTRUCTION_WITH_DEFAULT" >

<bi:INSTRUCTION_WITH_DEFAULT type="COMPOSITE" >

<bi:EXECUTION_TIME value="AFTER" />

<bi:INSTRUCTION >

 <bi:SET_SELECTION_STATE_SIMPLE >

<bi:TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >

<bi:TARGET_DATA_PROVIDER_REF index="1" value="DP_1" />

 </bi:TARGET_DATA_PROVIDER_REF_LIST>

<bi:CHARACTERISTIC value="0CALMONTH" text="" />

<bi:RANGE_SELECTION_OPERATOR type="CHOICE" value="INTERVAL_SELECTION" >

<bi:INTERVAL_SELECTION type="COMPOSITE" >

<bi:INTERVAL_SELECTION_LOW_MEMBER type="CHOICE" value="MEMBER_NAME" >

 <bi:MEMBER_NAME value="200301" />

</bi:INTERVAL_SELECTION_LOW_MEMBER>

<bi:INTERVAL_SELECTION_HIGH_MEMBER type="CHOICE" value="MEMBER_NAME" >

<bi:MEMBER_NAME path="DATA_PROVIDER:DP_2?/BICS_VIEW/SELECTION_STATE/SELECTION/CHARACTERISTICS/CHARACTERISTIC[@name='0CALMONTH']/SELECTIONS/SELECTION/MEMBER/@name"/>

 </bi:INTERVAL_SELECTION_HIGH_MEMBER>

</bi:INTERVAL_SELECTION>

</bi:RANGE_SELECTION_OPERATOR>

 </bi:SET_SELECTION_STATE_SIMPLE>

</bi:INSTRUCTION>

</bi:INSTRUCTION_WITH_DEFAULT>

</bi:ACTION_WITH_DEFAULT>

</bi:CHARACTERISTIC_SELECTION>

</bi:DATA_BINDING_TYPE>

</bi:DROPDOWN_ITEM>

<br />

<br />

<p >

<bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_1" designwidth="400" designheight="200" >

<bi:DATA_PROVIDER_REF value="DP_1" />

</bi:ANALYSIS_ITEM>

<br />

<br />

<p >

<bi:DATA_PROVIDER_INFO_ITEM name="DATA_PROVIDER_INFO_ITEM_1" designheight="120" designwidth="300" >

<bi:DATA_PROVIDER_REF value="DP_2" />

</bi:DATA_PROVIDER_INFO_ITEM>

<br />

<br />

<!-- insert data providers, items and other template content here -->

</p>

</p>

</p>

</body>

</html>

</bi:bisp>