How to...



How to…

Create Multiple Selections with a Selection List Item in Web Reporting

Business Information Warehouse

[pic]

ASAP “How to…” Paper

[pic]

Applicable Releases: BW 2.0B, 2.1C

May 2001

Business Scenario

You want to use a selection list in a Web Reporting template to choose filter values. In contrast to standard selection, you want to be able to select more than one value to be sent to the BW server as filter values.

The Result

You obtain a Web report with an output table. There is a selection list for filtering by the 'plant' characteristic. You can choose more than one value. As soon as you click on the 'Apply Filter Values' button, the output of the table is modified in line with the filter. The graphic below shows the report before you apply the filter.

[pic]

Below you can see the results of the filter. The filter values chosen are displayed in the first line of the selection list. The results table has been modified in line with the filter. Note that the filter has not collapsed the plant list. You can only collapse the plant list by using the FILTER_COLLAPS=’ ‘ command in the command URL (see the coding example in 3.2).

[pic]

The Step By Step Solution

1 Generate the Web template for your report

|Generate a workbook and save a corresponding query view. |[pic] |

|Start the Web Publisher and position an item as a table. |[pic] |

|Now position another item as a selection list. This item |[pic] |

|should be displayed without a title. The underlying | |

|characteristic is 0PLANT. You must also activate the option | |

|'Display Only Values'. | |

|Generate a Web template containing both items. You can do |[pic] |

|this with a wizard, or manually. | |

|Check out [pic] the Web template and modify it as specified | |

|in section 3.2. | |

|Then check the template in again [pic]. | |

|Start the template in the browser. There is now a selection |[pic] |

|list that allows you to make multiple value selections. | |

2 Coding Example for a Web Template

The segments of the following template coding that are in blue must be added manually after the template has been generated using the Publisher wizard.

function Submit_Form_1() {

var url = "";

for (var i = 0, j = 1; i < document.form_1.select_1.options.length; i++)

{

if (document.form_1.select_1.options[i].selected) {

url = url +

"&filter_iobjnm_" +

j +

"=0PLANT" +

"&filter_value_" +

j++ +

"=" +

document.form_1.select_1.options[i].value;

}

}

document.form_1.action=url

}

DATA_PROVIDER :Initial

ITEM :Sel_List_01

ITEM :Tab_01

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download