Start of Content Area

Procedure documentation Copying Planning Functions (with Dropdown Box Web Item)  Locate the document in its SAP Library structure

Use

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 graphic is explained in the accompanying text

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.

Prerequisites

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.

Procedure

Planning Modeler: Creating Planning Functions, Variables, and Filters

...

       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.

Note

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

BEx Web Application Designer: Creating Web Templates

...

       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:

This graphic is explained in the accompanying text

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" >
    <html >
        <head >
            <title >
BEx Web Application</title>
            <meta 
http-equiv="Content-Typecontent="text/html; charset=utf-8" />
        </head>
        <body >
            
<bi:SELECTOR_DATA_PROVIDER name="DP_FILT_FROM>
                <bi:SELECTOR_INITIAL_STATE 
type="CHOICEvalue="SELECTION_OBJECT>
                    <bi:SELECTION_OBJECT 
value="VERSION_FILT/>
                </bi:SELECTOR_INITIAL_STATE>
            </bi:SELECTOR_DATA_PROVIDER>
            <bi:SELECTOR_DATA_PROVIDER 
name="DP_FILT_TO>
                <bi:SELECTOR_INITIAL_STATE 
type="CHOICEvalue="SELECTION_OBJECT>
                    <bi:SELECTION_OBJECT 
value="VERSION_FILT/>
                </bi:SELECTOR_INITIAL_STATE>
            </bi:SELECTOR_DATA_PROVIDER>
            <bi:TEMPLATE_PARAMETERS 
name="TEMPLATE_PARAMETERS/>
<!-- insert data providers, items and other template content here -->
            
<bi:CONTAINER_LAYOUT_ITEM name="CONTAINER_LAYOUT_ITEM_1designwidth="10designheight="10>
                <bi:WIDTH 
value="10/>
                <bi:HEIGHT 
value="10/>
                <bi:WITH_TRAY 
type="CHOICEvalue="Xtext="" >
                    <bi:TRAY_SETTINGS 
type="COMPOSITE>
                        <bi:CAPTION 
value="Versionskopie/>
                    </bi:TRAY_SETTINGS>
                </bi:WITH_TRAY>
                <bi:ROW_LIST 
type="ORDEREDLIST>
                    <bi:ROW 
type="ORDEREDLISTindex="1>
                        <bi:COLUMN 
type="COMPOSITEindex="2>
                            <bi:CHILD_ITEM_REF 
value="DROPDOWN_ITEM_FROM/>
                            <bi:VALIGN 
value="CENTER/>
                        </bi:COLUMN>
                        <bi:COLUMN 
type="COMPOSITEindex="4>
                            <bi:CHILD_ITEM_REF 
value="DROPDOWN_ITEM_TO/>
                            <bi:VALIGN 
value="CENTER/>
                        </bi:COLUMN>
                        <bi:COLUMN 
type="COMPOSITEindex="5>
                            <bi:CHILD_ITEM_REF 
value="BUTTON_GROUP_COPY_FUNCTION/>
                        </bi:COLUMN>
                        <bi:COLUMN 
type="COMPOSITEindex="1>
                            <bi:CHILD_ITEM_REF 
value="TEXT_ITEM_SOURCE/>
                            <bi:VALIGN 
value="CENTER/>
                        </bi:COLUMN>
                        <bi:COLUMN 
type="COMPOSITEindex="3>
                            <bi:CHILD_ITEM_REF 
value="TEXT_ITEM_TARGET/>
                            <bi:VALIGN 
value="CENTER/>
                        </bi:COLUMN>
                    </bi:ROW>
                </bi:ROW_LIST>
                <bi:DROPDOWN_ITEM 
name="DROPDOWN_ITEM_FROMdesignheight="23designwidth="150>
                    <bi:WIDTH 
value="150/>
                    <bi:HEIGHT 
value="23/>
                    <bi:DATA_BINDING_TYPE 
type="CHOICEvalue="CHARACTERISTIC_SELECTION>
                        <bi:CHARACTERISTIC_SELECTION 
type="COMPOSITE>
                            <bi:DATA_PROVIDER_REF 
value="DP_FILT_FROM/>
                            <bi:CHARACTERISTIC 
value="0VERSIONtext="Version/>
                            <bi:ALL_VALUES_ENTRY_INCLUDED 
value="" />
                        </bi:CHARACTERISTIC_SELECTION>
                    </bi:DATA_BINDING_TYPE>
                </bi:DROPDOWN_ITEM>
                <bi:TEXT_ITEM 
name="TEXT_ITEM_TARGETdesignheight="70designwidth="200>
                    <bi:TEXT_BINDING 
type="CHOICEvalue="TEXT_CONTENT>
                        <bi:TEXT_CONTENT 
value="Zielversion/>
                    </bi:TEXT_BINDING>
                </bi:TEXT_ITEM>
                <bi:TEXT_ITEM 
name="TEXT_ITEM_SOURCEdesignheight="70designwidth="200>
                    <bi:TEXT_BINDING 
type="CHOICEvalue="TEXT_CONTENT>
                        <bi:TEXT_CONTENT 
value="Quellversion/>
                    </bi:TEXT_BINDING>
                </bi:TEXT_ITEM>
                <bi:DROPDOWN_ITEM 
name="DROPDOWN_ITEM_TOdesignheight="23designwidth="150>
                    <bi:WIDTH 
value="150/>
                    <bi:HEIGHT 
value="23/>
                    <bi:DATA_BINDING_TYPE 
type="CHOICEvalue="CHARACTERISTIC_SELECTION>
                        <bi:CHARACTERISTIC_SELECTION 
type="COMPOSITE>
                            <bi:DATA_PROVIDER_REF 
value="DP_FILT_TO/>
                            <bi:CHARACTERISTIC 
value="0VERSIONtext="Version/>
                            <bi:ALL_VALUES_ENTRY_INCLUDED 
value="" />
                            <bi:LINKED_DATA_PROVIDER_REF_LIST 
type="ORDEREDLIST>
                                <bi:LINKED_DATA_PROVIDER_REF 
index="1value="DP_FILT_COPY_FUNCTION/>
                            </bi:LINKED_DATA_PROVIDER_REF_LIST>
                        </bi:CHARACTERISTIC_SELECTION>
                    </bi:DATA_BINDING_TYPE>
                </bi:DROPDOWN_ITEM>
                <bi:BUTTON_GROUP_ITEM 
name="BUTTON_GROUP_COPY_FUNCTIONdesignheight="23designwidth="150>
                    <bi:WIDTH 
value="150/>
                    <bi:HEIGHT 
value="23/>
                    <bi:BUTTON_LIST 
type="ORDEREDLIST>
                        <bi:BUTTON 
type="COMPOSITEindex="1>
                            <bi:CAPTION 
value="Kopie/>
                            <bi:ACTION 
type="CHOICEvalue="INSTRUCTION>
                                <bi:INSTRUCTION >
                                    <bi:EXEC_PLANNING_FUNCTION_SIMPLE >
                                        <bi:SELECTOR_DATA_PROVIDER_REF 
value="DP_FILT_TO/>
                                        <bi:PLANNING_FUNCTION 
value="VERSION_COPYtext="Versionskopie/>
                                        <bi:VARIABLE_VALUES 
type="ORDEREDLIST>
                                            <bi:VARIABLE_VALUE 
type="COMPOSITEindex="1>
                                                <bi:VARIABLE 
value="VERSION_FROMtext="VERSION_FROM/>
                                                <bi:VARIABLE_TYPE 
type="CHOICEvalue="SELECTION_BINDING_TYPE>
                                                    <bi:SELECTION_BINDING_TYPE 
type="CHOICEvalue="DATA_PROVIDER_CHARACTERISTIC>
                                                        <bi:DATA_PROVIDER_CHARACTERISTIC 
type="COMPOSITE>
                                                            <bi:DATA_PROVIDER_REF 
value="DP_FILT_FROM/>
                                                            <bi:CHARACTERISTIC 
value="0VERSIONtext="Version/>
                                                        </bi:DATA_PROVIDER_CHARACTERISTIC>
                                                    </bi:SELECTION_BINDING_TYPE>
                                                </bi:VARIABLE_TYPE>
                                            </bi:VARIABLE_VALUE>
                                            <bi:VARIABLE_VALUE 
type="COMPOSITEindex="2>
                                                <bi:VARIABLE 
value="VERSION_TOtext="VERSION_TO/>
                                                <bi:VARIABLE_TYPE 
type="CHOICEvalue="SELECTION_BINDING_TYPE>
                                                    <bi:SELECTION_BINDING_TYPE 
type="CHOICEvalue="DATA_PROVIDER_CHARACTERISTIC>
                                                        <bi:DATA_PROVIDER_CHARACTERISTIC 
type="COMPOSITE>
                                                            <bi:DATA_PROVIDER_REF 
value="DP_FILT_TO/>
                                                            <bi:CHARACTERISTIC 
value="0VERSIONtext="Version/>
                                                        </bi:DATA_PROVIDER_CHARACTERISTIC>
                                                    </bi:SELECTION_BINDING_TYPE>
                                                </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:CONTAINER_LAYOUT_ITEM>
        
</body>
    </html>
</bi:bisp>


Execution on the Web

...

       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.

 

End of Content Area