!--a11y-->
Planning Functions and Planning Function
Types 
Planning functions are used for system-supported editing and generation of data within BI Integrated Planning.
A planning function describes the ways in which the transaction data for an aggregation level can be changed. The following are set for this:
· The name of the aggregation level
· The type of planning function
· How characteristics are used
· The parameter values
The planning function type defines the parameters with which the processing can be controlled (such as conversion factor or currency translation type). When using the planning function type on a concrete aggregation level, these parameters are set. Each of these applications is a planning function that is saved as a separate object.
The BI system offers you a number of predefined planning function types:
· Unit conversion
· Generating combinations
· Formula
· Copy
· Delete
· Delete invalid combinations
· Repost
· Repost (characteristic relationships)
· Revaluate
· Distribute with reference data
· Distribute by key
· Currency translation
You can also implement your own planning function types. For more information, see Implementing Your Own Planning Function Types.
In the Planning Modeler and Planning Wizard, you create your planning functions (as well as the prerequisite objects of the planning model).
In the Data Warehousing Workbench, the planning function objects are displayed in the functional areas Business Content and Transport Connection in the Planning folder.
You have created the following objects in the Planning Modeler or Planning Wizard:
· Aggregation levelson which planning functions are created (see Aggregation Levels). Planning functions can be created and executed on each active aggregation level.
· Filters that are required at the time the planning function is executed. A filter determines for which data the planning function is executed. The planning functions locks the data defined in the filter in the real-time enabled InfoCubes that are part of the aggregation levels. The filter must be defined on the same aggregation level as the planning function (see Filter)
For a planning function, the type of planning function and the aggregation level must be defined on which the planning function is to work. Furthermore, the characteristic use, the conditions and the sets of parameters can be changed.
The features will be explained in the following with an example of how to create a planning function of type Repost.
The following table shows the data for the InfoProvider before the planning function is executed:
Before Executing the Planning Function
Product |
Product Group |
Version |
Year |
Sales |
P1 |
PG1 |
V1 |
2007 |
10 |
P2 |
PG1 |
V1 |
2007 |
20 |
...
All records in the version „V1” are to be reposted to “V2”. You can achieve this by reposting all key figures. The following table shows the situation after execution of the planning function:
After Executing the Planning Function
Product |
Product Group |
Version |
Year |
Sales |
P1 |
PG1 |
V1 |
2007 |
0 |
P2 |
PG1 |
V1 |
2007 |
0 |
P1 |
PG1 |
V2 |
2007 |
10 |
P2 |
PG1 |
V2 |
2007 |
20 |
After the reposting, there are records containing only zeros (zero-records) in “V1” and the required records appear in "V2".
The planning function type defines which options are available for the use of characteristics and which parameters the planning function has. All parameters of the planning function type together define the parameter set.
With characteristic usage, the characteristics of the aggregation level are divided into Characteristics to Be Changed and Block Characteristics (that is characteristics that are not used). In this way, you set which characteristic values the planning function changes when it processes a data record. Block characteristics remain constant.

When you create a planning function of type Repost for the case described above, you first check which characteristic values should be changed and set the to be changed indicator accordingly. Since you want to repost the data from version „V1“ to version „V2“, you set the indicator for the characteristic Version as Changed (in this case this means the same as will be reposted).
You can select block characteristics as condition characteristics as well.
The next step is to specify the detailed information. With most planning functions, all transaction data is processed with the same set of parameters. In this case, a block characteristic was not selected as a condition characteristic; only one parameter set has to be entered.

The parameter set for the planning function type Repost includes a table for selecting the key figures that are to be reposted and a table in which you can enter the From-To Value Pairs on the characteristics to be reposted. In the key figure selection, you set the indicator for Select All Key Figures. In the From- and To Values for Reposting table, you make an entry using Create Row that has the value “V1” under From and “V2” under To. Now the planning function for reposting is done.
If you want to execute different records from the transaction data with different sets of parameters, you have to work with conditions. You have to select at least one block characteristic as condition characteristic.

If it is to be possible to increase the planned production for products in product group PG1 by 5% and the products of product group PG2 by 10%, choose the product group as the condition characteristic.
In the parameters you can then create multiple pairs of conditions and parameter sets. For each pair, use a filter to specify the selection of the condition characteristics. You can then change the associated set of parameters for each pair.

From a technical viewpoint, the method that the planning function actually executes is called more than once. The data that was selected with the filter is divided into blocks. Each combination of characteristic values of the block characteristics that occurs forms a separate block (thus the name Block Characteristics). With planning function types that work with reference data, there are also additional blocks (such as the type Copy). The actual method is then called once for each block with a table of records. The table includes those records of data that correspond to the characteristic combination of the block in the block characteristics.
For each block, the system checks whether there is a pair of condition and parameter set so that the block fits the condition. Thus the block is tested against the conditions along the sequence of pairs. The first pair in which the block matches the condition is used, that is, the method of the planning function type is executed with the block and the set of parameters that fits the condition. The remaining pairs are not taken into account. The method is thus only executed once for each block.
The usual variable types for the BI system are available in many planning function types (see Variables).
Almost all planning function types do not read zero-records and do not write zero delta records to the buffer. Exceptions to this are Copy and Generate Combinations: these two read zero-records and write zero delta records.
You are in the Planning Functions tab page of the Planning Modeler. In the Planning Function Selection screen area, you can display, create, copy, delete, change, check, and save Planning Functions.
...
1. To create a planning function, choose Create. The Create Planning Function dialog box appears.
2. Choose the planning function type.
3. Enter a technical name and a description for the planning function.
4. Select the aggregation level on which the planning function is to work.
5. Choose For Characteristic Usage and determine which characteristics are to be changed and used in conditions, as needed.
6. Choose For Parameters. In the Conditions with Parameters screen area, you can create, delete and copy conditions. On the Selected Conditions tab pages, you can use the input help symbol to select the conditions values to which the condition is to apply. On the Associated Parameter Set tab page, you can maintain the parameter sets.
During the check, values must be specified for existing mandatory entry variables for which values have not been selected in the current session. An entry screen appears in those cases.
Planning functions can also be saved when they are not consistent.
Planning functions can be executed directly from a Web application or a BEx workbook. However, first you have to enable it in the respective design tool.
In order to be able to execute a planning function in the Planning Modeler, you must first include it in a planning sequence (see Planning Sequences).
In the Planning Wizard, a temporary planning sequence is generated in the last step that contains exactly one planning function.
Before the planning function is executed, the system checks whether the planning function is consistent.
Process of a Planning Function: Distributing by Key