You want to build a planning application with which you can copy the values from the source version to the target version. It must be possible to set the source and target versions using dropdown boxes. On execution, the planning application is to look as follows:
This example serves in particular to clarify the interaction between a planning function and two Dropdown Box Web items. Selections can also be restricted without using variables.
In the planning modeler, you have created an aggregation level that contains the following InfoObjects: unit Currency Key, time characteristics Quarter and Calendar Year, key figure Amount, characteristics Version, Account Number, Cost Center. This aggregation level is also used in the examples below (Revaluating Planning Functions (with Analysis Web Item) and Documentation (with Analysis Web Item)).
The only thing that is important in this example is that the aggregation level contains the Version characteristic. This characteristic must have a master data-supported filter selection; you can specify this setting in the InfoObject maintenance: tab page Business Explorer, setting Filter Value Selection Query Execution, value Values in Master Data Table. In this example, the Version characteristic should display the values B01, B02, B03, and B04 in the dropdown boxes.
...
1. Choose the Planning Functions tab page and create a planning function of the type Copy with technical name VERSION_COPY and description Version Copy for your aggregation level.
2. Choose To Characteristic Use and specify that it should be possible to change the Version characteristic.
3. Choose To the Parameters and specify that the Amount key figure is to be copied.
4. The source and target versions should each be restricted using a variable (VERSION_FROM and VERSION_TO). You can navigate to the creation dialog using the Before and After Values of the Copy Process table, for example. Both variables are to be specified in detail as follows: The variables should be individual values, required variables, and input ready, but should not have a standard default value.
5. Choose the Filter tab page and create a filter with technical name VERSION_FILT and the Version Selection description for your aggregation level.
Select the Version characteristic and choose the icon for input help in the column after Characteristic Restrictions. The dialog box for specifying the characteristic restriction appears. In the list of values, select all values (B01 to B04 in our example), choose Insert, and save the relevant selection by choosing OK.
Choose Show Extended Settings and set the indicator for the Changeable During Execution option; do not enter a default value.
More information about creating planning functions, variables, and filters: Modeling Planning Scenarios
...
1. In the BEx Web Application Designer, create a Web template with technical name VERSION_COPY.
2. Create the following data providers of the type Filter:
○ DP_FILT_FROM
○ DP_FILT_TO
For both filters, the data binding should come from the VERSION_FILT filter.
3. Create the following Web items:
○ DROPDOWN_ITEM_FROM: Choose the data binding type Characteristic/Structure Member. Specify the characteristic selection: data provider DP_FILT_FROM, characteristic VERSION.
○ DROPDOWN_ITEM_TO: Choose the data binding type Characteristic/Structure Member. Specify the characteristic selection: data provider DP_FILT_TO, characteristic VERSION, affected data provider DP_FILT_COPY_FUNCTION.
○ TEXT_ITEM_SOURCE for the source version (data binding: text connection, simple text, text source version)
○ TEXT_ITEM_TARGET for the target version (data binding: text connection, simple text, text target version)
○ BUTTON_GROUP_COPY_FUNCTION: Using Internal Display, create pushbutton 1 with label Copy and, as Action, use the command wizard to assign the following command (INSTRUCTION):
Table of Commands
Command |
Parameters |
Planning-specific command EXEC_PLANNING_FUNCTION_SIMPLE (Execute Planning Function [Simple]) |
● Data binding: reference to data provider of type Filter DP_FILT_TO and two variables (1 VERSION_FROM, 2 VERSION_TO) ● Command-specific parameter: planning function VERSION_COPY |
4. Create a CONTAINER_LAYOUT_ITEM_1 (Web Items → Enhanced → Container).
Choose the With Tray display option and enter label Version Copy under Tray Settings.
In the container (Internal Display → Layout Type: GRID → Row List), arrange the Web items in the following order:
Row 1: TEXT_ITEM_SOURCE
Row 2: DROPDOWN_ITEM_FROM
Row 3: TEXT_ITEM_TARGET
Row 4: DROPDOWN_ITEM_TO
Row 5: BUTTON_GROUP_COPY_FUNCTION
The following figure illustrates the layout of the VERSION_COPY Web template:
The table below contains the XHTML source text of the VERSION_COPY Web template:
XHTML Source Text of the VERSION_COPY 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" > |
...
1. Execute the Web template on the Web.
2. For testing, extend the URL to include parameter &debug=X.
If you have set this parameter, the selection is shown in the Executing Planning Function section.
3. Choose the required versions using the dropdown boxes and copy the data between the versions.