how to build script logic.pdf
TRANSCRIPT
-
1
-
2
-
3
-
Fox = Formula Extension.
Fox Formulas offer an enhanced formula language for defining planning
functions. In addition to standard mathematical operations and functions, Fox
offers:
Statements for accessing data records Methods for information retrieval (e.g. variable values) Predefined business functions (e.g. linear digression) Loop statements:
Different types of Foreach loops
Do loops.
Programming variables String operations Calling external (ABAP) function modules.
A formula editor is available that provides help functionality, check functionality,
patterns, and examples.
BW-BPS uses the same Formula syntax. All new features in formulas in BI
Integrated Planning are also available in BW-BPS and all features in formulas
that were available in BW-BPS are now available in BI Integrated Planning.
4
-
There are four new predefined functions in Fox formulas:
The string operations concatenate and replace. The currency translation CURC. Here you can specify the exchange date,
the exchange rate type, the source currency and the target currency.
The rounding ROUND where you can specify the key figure and the decimal places.
5
-
There are several new loop statements.
In addition to the standard do loop, you can also use the statement do n times where n is a natural number. You therefore no longer need to create a counter
that checks the number of executions of the do loop.
There are several flavors of the foreach statement. In order to clarify how the
statements work, let us assume that we are looping over the characteristic
0COUNTRY and we are using the variable COUNTRY:
Foreach COUNTRY: The loop goes through all characteristic values for 0COUNTRY contained in the (existing!) records in the current block (for
blocks see below). In each loop, the variable COUNTRY is replaced by the
one of these values.
Foreach COUNTRY in Refdata: The formula determines the reference data from the right sides of the statements of the formula. The system then goes
through all the values of 0COUNTRY in the reference data and replaces
COUNTRY in each loop accordingly.
Foreach COUNTRY in Selection: The system reads the selection (from the filter for example) for 0COUNTRY and goes through all characteristic
values in this selection. The execution of the formula does not depend on
which records exist or which records are contained in the current block.
Foreach COUNTRY in Variable: This version behaves similarly to the one above. The characteristic values for the country are not read from the
selection but from the specified variable.
6
-
You can now call ABAP function modules from formulas. The interface of the
function module cannot contain any structured data type such as structures or
tables. Simple data types are supported.
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
A planning function can (potentially) use two types of plan data: The data that is
to be changed by the planning function and the data that the planning function
uses as additional information upon execution. We call the first set of data
transaction data and the latter one reference data. Transaction data: A planning function can only change data that is stored in a
real-time InfoCube. The logical level of aggregation of the data records is
defined by the aggregation level (in the planning modeler) upon which the
planning function is defined. The transaction data is locked upon execution of
the planning function. The selection of the actual data can be restricted in
various ways, depending on the mode of execution:
A filter defined in the planning modeler can be used in all front ends (when executing a planning function via a button in a Web application or an Excel
Workbook), in the planning modeler, and in the planning sequences.
The result of a query can be used for filtering via data binding in the web and the Excel Workbooks.
If the planning function contains conditions, these are used to further restrict the data selection.
Note: The definition of the planning function and that of the data selection (filter
or query) must match. You cannot change data that is not contained in the data
selection. This means for example that you cannot copy data into a planning
version that is not contained in the filter/query used for the planning function.
16
-
Reference data: The system determines which reference data is necessary
from the set up of the planning function itself. Reference data is not locked
when the planning function is executed. Any InfoCube can be used for
reference data. Using a MultiProvider, BI Planning can therefore also access
reference data from Data Store Objects for example.
Example: You want to copy data from one version to another, say from version
0 to version 1. Version 0 does not need to be in the filter/query, and the system
automatically reads the data in version 0 as reference data. Version 1 must be
contained in the filter/query when executing the planning function and will be
locked.
When you execute a planning function, the changed data is written to the plan
buffer. The data is only transferred to the InfoCube if the user actively saves the
data.
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32