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:
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
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
Drag the Account Number characteristic to the area for default values.
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.
BEx Web Application Designer: Creating Web Templates
Table of Commands
Command | Parameter |
---|---|
Data provider-specific command: SET_SELECTION_STATE BY BINDING (Set Filter Values Using Different Sources) |
|
Planning-specific command EXEC_PLANNING_FUNCTION_SIMPLE (Execute Planning Function [Simple]) |
|
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.
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, 2nd column BUTTON_GROUP_ REVALUATION
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="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 >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
If you have set this parameter, the selection is shown in the Executing Planning Functionsection.
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).