Show TOC

 Revaluating Planning Functions (with Analysis Web Item)Locate this document in the navigation structure


You want to build a planning application with which you can enter turnover amounts for certain account numbers and revaluate them using a factor that can be set. If you select a row in the table, only the amount in this row will be revaluated. If you do not select any rows, all values will be revaluated. The planning application is to look roughly as follows on execution:

This example serves in particular to clarify the interaction between a planning function and an Analysis Web item. Special properties here are:

  • Variable handling in the planning function
  • Row selection in the Analysis Web item

In Planning Modeler, you have created an aggregation level containing the following InfoObjects: unit  Currency Key, time characteristics Quarter and Calendar Year, key figure Amount, characteristics Version, Account Number, Cost Center.

The planning function and the query are to use the same data of this aggregation level.


Planning Modeler: Creating Planning Functions, Variables, and Filters

  1. Choose the Planning Functions tab page and create a planning function of type Revaluate with technical name REVALUATE and description Revaluate for your aggregation level.
  2. On the To the Parameters tab page, use input help for the revaluation factor to create variable REVAL_FACTOR with description Revaluation Factor. The variable needs to be specified in detail as follows: The variable will be a required variable and will be input ready. It will be of type Number, but will not contain a standard default value.
  3. Choose the Filter tab page and create a filter with technical name ACCOUNT_FILT and description Revaluation Selection for your aggregation level.

    Select the characteristics one after another and choose the input help icon in the column after Characteristic Restrictions. The dialog box for specifying characteristic restrictions appears. Specify the required restrictions (in our example, Version = VERSION 1, Quarter = QUARTER 1, Calendar Year = 2007; Cost Center = 100002, Currency = Euro; for Account Number, all values are taken over), choose Add, and save the selections by clicking OK.

    Choose Show Extended Settings and make sure that the Version characteristic cannot be changed on execution. (It must be possible to change the Amount key figure).


    More information about creating planning functions, variables, and filters: Planning Modeler

BEx Query Designer: Creating Queries

  1. In BEx Query Designer, create a query Revaluate (technical name: QUERY_REVALUATION) for your aggregation level.
  2. Drag the ACCOUNT_FILT filter to the Characteristic Restrictions area for filter values. This restricts all characteristics to single values.

    Drag the Account Number characteristic to the area for default values. 

  3. Specify that the Account Number characteristic is in the rows. The values for this come from the master data.

    Specify that the Amount key figure is in the columns. The values for this can be changed; on the Planning tab page, choose the Data Can be Changed Using User Input or Planning Functions option.

  4. Save your query definition.

BEx Web Application Designer: Creating Web Templates

  1. In BEx Web Application Designer, create a Web template with technical name REVALUATION.
  2. Create the following data providers:
    • DP_PLAN_DATA of type Query View Data Provider, based on query QUERY_REVALUATION
    • DP_FILT_REVALUATION_FUNCTION of type Filter The data binding should come from the ACCOUNT_FILT filter. 
  3. Create the following Web items:
    • INPUT_FIELD_REVALUATION_FACTOR. Specify 10 as the default value (Internal Display → Text: 10).
    • BUTTON_GROUP_ REVALUATION. Using Internal Display, create pushbutton1 with label Revaluation and, as Action, use the Command Wizard to assign the following commands (INSTRUCTION):

Table of Commands

Command Parameter

Data provider-specific command: SET_SELECTION_STATE BY BINDING (Set Filter Values Using Different Sources)

  • Command target: target data provider DP_FILT_REVALUATION_FUNCTION
  • Data binding: selection binding using the Account Number (ZD_ACCNT) characteristic, where the value of theWeb Item Selection binding type should come from the ANALYSIS_ITEM_1 Web item, characteristic Account Number (ZD_ACCNT).

Planning-specific command EXEC_PLANNING_FUNCTION_SIMPLE (Execute Planning Function [Simple])

  • Data binding: Reference to data providers of type Filter DP_FILT_REVALUATE_FUNCTION, where the value from variable REVAL_FACTOR of connection type Web Item with Manual Input (ITEM_INPUT) should come from INPUT_FIELD_REVALUATION_FACTOR.
  • Command-specific parameter: planning function REVALUATE
  • ANALYSIS_ITEM_1. Data provider DP_PLAN_DATA is assigned to the analysis grid as the (source) data provider.

    Choose Behavior → Row Selection → Multiple (MULTIPLE).


    In this case, it must be possible to select multiple rows and to execute the revaluation command on all selected rows. This means that It is not possible to provide the command together with the row selection. The command must be provided using pushbuttons instead.

  1. Create a CONTAINER_LAYOUT_ITEM_1 (Web Items → Enhanced → Container).

    Divide the container into columns, choose the With Tray display option, and enter label Revaluation under Tray Settings.

    Add the following Web items to the container:

    • 1. Row, 1st column: INPUT_FIELD_REVALUATION_FACTOR

      1. Row, 2nd column BUTTON_GROUP_ REVALUATION

    • 2. Row, 1st column (with option Colspan=2, that is, with a merge of columns 1 and 2): ANALYSIS_ITEM_1

    The graphic below illustrates the layout of the REVALUATION Web template:

The table below contains the XHTML source text of the REVALUATION Web template:

XHTML Source Text of the REVALUATION Web Template

<bi:bisp  xmlns="" xmlns:bi="" xmlns:jsp="" >     <html >         <head >             <title >BEx Web Application</title>             <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />         </head>         <body >             <bi:QUERY_VIEW_DATA_PROVIDER name="DP_PLAN_DATA" >                 <bi:INITIAL_STATE type="CHOICE" value="QUERY" >                     <bi:QUERY value="QUERY_REVALUATION" text="QUERY_REVALUATION" />                 </bi:INITIAL_STATE>             </bi:QUERY_VIEW_DATA_PROVIDER>             <bi:SELECTOR_DATA_PROVIDER name="DP_FILT_REVALUATION_FUNCTION" >                 <bi:SELECTOR_INITIAL_STATE type="CHOICE" value="SELECTION_OBJECT" >                     <bi:SELECTION_OBJECT value="ACCOUNT_FILT" />                 </bi:SELECTOR_INITIAL_STATE>             </bi:SELECTOR_DATA_PROVIDER>             <bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" />             <bi:CONTAINER_LAYOUT_ITEM name="CONTAINER_LAYOUT_ITEM_1" designwidth="250" designheight="30" >                 <bi:WIDTH value="250" />                 <bi:HEIGHT value="30" />                 <bi:WITH_TRAY type="CHOICE" value="X" text="" >                     <bi:TRAY_SETTINGS type="COMPOSITE" >                         <bi:CAPTION value="Umwertung" />                     </bi:TRAY_SETTINGS>                 </bi:WITH_TRAY>                 <bi:ROW_LIST type="ORDEREDLIST" >                     <bi:ROW type="ORDEREDLIST" index="1" >                         <bi:COLUMN type="COMPOSITE" index="1" >                             <bi:CHILD_ITEM_REF value="INPUT_FIELD_REVALUATION_FACTOR" />                         </bi:COLUMN>                         <bi:COLUMN type="COMPOSITE" index="2" >                             <bi:CHILD_ITEM_REF value="BUTTON_GROUP_REVALUATION" />                         </bi:COLUMN>                     </bi:ROW>                     <bi:ROW type="ORDEREDLIST" index="2" >                         <bi:COLUMN type="COMPOSITE" index="1" >                             <bi:CHILD_ITEM_REF value="ANALYSIS_ITEM_1" />                             <bi:COLSPAN value="2" />                         </bi:COLUMN>                     </bi:ROW>                 </bi:ROW_LIST>                 <bi:INPUT_FIELD_ITEM name="INPUT_FIELD_REVALUATION_FACTOR" designheight="70" designwidth="40" >                     <bi:WIDTH value="40" />                     <bi:TEXT_CONTENT value="10" />                     <bi:TEXT_ALIGNMENT value="END" />                 </bi:INPUT_FIELD_ITEM>                 <bi:BUTTON_GROUP_ITEM name="BUTTON_GROUP_REVALUATION" designheight="70" designwidth="50" >                     <bi:WIDTH value="50" />                     <bi:BUTTON_LIST type="ORDEREDLIST" >                         <bi:BUTTON type="COMPOSITE" index="1" >                             <bi:CAPTION value="Umwertung" />                             <bi:ACTION type="CHOICE" value="INSTRUCTION" >                                 <bi:INSTRUCTION >                                     <bi:SET_SELECTION_STATE_BY_BINDING >                                         <bi:TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >                                             <bi:TARGET_DATA_PROVIDER_REF index="1" value="DP_FILT_REVALUATION_FUNCTION" />                                         </bi:TARGET_DATA_PROVIDER_REF_LIST>                                         <bi:SELECTION_BINDINGS type="UNORDEREDLIST" >                                             <bi:SELECTION_BINDING type="COMPOSITE" index="1" >                                                 <bi:CHARACTERISTIC value="ZD_ACCNT" text="Account number" />                                                 <bi:SELECTION_BINDING_TYPE type="CHOICE" value="ITEM_CHARACTERISTIC" >                                                     <bi:ITEM_CHARACTERISTIC type="COMPOSITE" >                                                         <bi:ITEM_REF value="ANALYSIS_ITEM_1" />                                                         <bi:CHARACTERISTIC value="ZD_ACCNT" text="Account number" />                                                     </bi:ITEM_CHARACTERISTIC>                                                 </bi:SELECTION_BINDING_TYPE>                                             </bi:SELECTION_BINDING>                                         </bi:SELECTION_BINDINGS>                                     </bi:SET_SELECTION_STATE_BY_BINDING>                                     <bi:EXEC_PLANNING_FUNCTION_SIMPLE >                                         <bi:SELECTOR_DATA_PROVIDER_REF value="DP_FILT_REVALUATION_FUNCTION" />                                         <bi:PLANNING_FUNCTION value="REVALUATE" text="Umwerten" />                                         <bi:VARIABLE_VALUES type="ORDEREDLIST" >                                             <bi:VARIABLE_VALUE type="COMPOSITE" index="1" >                                                 <bi:VARIABLE value="REVAL_FACTOR" text="" />                                                 <bi:VARIABLE_TYPE type="CHOICE" value="ITEM_INPUT" >                                                     <bi:ITEM_INPUT type="COMPOSITE" >                                                         <bi:ITEM_REF value="INPUT_FIELD_REVALUATION_FACTOR" />                                                     </bi:ITEM_INPUT>                                                 </bi:VARIABLE_TYPE>                                             </bi:VARIABLE_VALUE>                                         </bi:VARIABLE_VALUES>                                     </bi:EXEC_PLANNING_FUNCTION_SIMPLE>                                 </bi:INSTRUCTION>                             </bi:ACTION>                         </bi:BUTTON>                     </bi:BUTTON_LIST>                 </bi:BUTTON_GROUP_ITEM>                 <bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_1" designwidth="400" designheight="200" >                     <bi:DATA_PROVIDER_REF value="DP_PLAN_DATA" />                     <bi:SELECT_ROWS type="CHOICE" value="MULTIPLE" />                 </bi:ANALYSIS_ITEM>             </bi:CONTAINER_LAYOUT_ITEM> <!-- insert data providers, items and other template content here -->         </body>     </html> </bi:bisp>

Execution on the Web

  1. Execute the Web template on the Web.
  2. For testing, add parameter &debug=X to the URL.

    If you have set this parameter, the selection is shown in the Executing Planning Functionsection.

  3. Enter amounts for one or more account numbers, change the revaluation factor if necessary (default value = 10), select the required rows, and choose Revaluation.

    Enter 100 in the first row for example, keep revaluation factor 10 and choose Revaluation. The query displays an amount of 110 in both the selected row and in the overall result (as long as you have not entered any other values).