Variables in SAP BW and BPS

Variables in SAP BW may be used instead of Info Object values in various places throughout the BW-BPS planning environment.

Reduction in amount of customizing effort of the planning elements
Flexibility to allow individual characteristic selection per user
Simplification in structure of planning layouts to be built
Dynamic adjustment of customizing possible through user-exit function module

You use variables to reduce the scope of customizing work in the planning environment. You achieve this by restricting characteristics to one desired value or value range using variables in a central place within a planning area. The setting of the characteristic value which you make in this way, then becomes automatically effective in all places within the planning area where the selection for the corresponding characteristic is referred to the variable you have defined.

Variables are maintained and valid in planning areas even in multi-planning areas. You can define any number of variables for every characteristic of the planning area.The scope of the variable is limited to the planning area it is defined for. Therefore, a variable with the same technical name can have different settings and values for different planning areas. There is no reference. However, an exit variable can be used to automatically reference a variable in a different planning area. Variables, which you define in the context of a planning area, can be used everywhere within a planning area, where a selection condition can be entered for this characteristic:

  1. In the planning level,
  2. In parameter groups of user-defined planning functions, for which the characteristics can be included in the list of fields to be changed or fields for conditions, for example copying, reposting,
  3. In the formula editor of a formula function using the keyword VARV which means variable value,
  4. In manual planning in the column and row definitions,
  5. In data slices.
  6. In planning packages, the option of characteristic value restriction by variable

Defining Variables

The user can enter variables for characteristic values and also for hierarchy node.The cells for variables with the type hierarchy are locked in table selection conditions so that manual entries cannot be made. This is to ensure that values can be entered for the hierarchy characteristic but that they do not appear in the hierarchy itself. To enter characteristic values for the type hierarchy, use the F4 input help.In addition to this, it can also be interested from the end user's point of view to enter a value for the revaluation parameter that differs to the predefined fixed value. To do this the end user can now enter a variable of type numerical value to set their own revaluation value.

Types of Variables

CHAR: Characteristic Value
From the available characteristics in the Info Cube select one or more characteristics for the variable definition
HIERARCHY: Hierarchy Node

From the available characteristics in the Info Cube select a single characteristic
Next select from the pop-up list a BW hierarchy that this characteristic bears
Later you will select the hierarchy node value(s) to include

 ATTRIBUTE: Attributes

From the available characteristics in the Info Cube select a single ("basic") characteristic
Next select one or more attributes belonging to this basic characteristic
Later you will select the value(s) of the attribute to include (according to the replacement type 

NUMBER: Numeric Values
A starting numeric value(s) may be entered (after selection of replacement type

Variables are defined under the tab "Variables" when either creating or changing a Planning Area
Characteristic Value: You can fill several characteristics with one variable, e.g. country and local currency. Variables with several characteristics do not take characteristic relationships into account – you have to fill them properly .

Attributes: The attributes displayed and selectable from the list need not be navigation attributes but they must themselves exist in the Info Cube.

Replacement Types

You can define any number of variables for every characteristic of the planning area.Selecting the replacement type when setting up a variable determines the way in which the values of variables should be defined.For every variable, you determine in addition to the reference characteristic, the replacement type: 

Fixed value: Entry of a selection of values or value ranges for the variables, which are used standardized in the entire planning area for the replacement of variables.
Example of a single fixed value might be to represent "Current Period" for the Characteristic 0FISCPER.The variable could be used variously as a restriction in the planning level or within a planning layout and thus minimize maintenance.

User-specific value: Here you can define for which user the variable values should be valid. Doing so, you can assume that the individual processors, who are responsible for individual regions, are only offered the plan figures which fall within their area of responsibility without having to define packages for every user. Thus this variable could be used to represent, say, a Cost Center that a given user is responsible for. The variable could be used as a restriction in the planning level, limiting the access a given user has (to his own Cost Center)This obviates the need to create multiple planning packages.

Exit: With this replacement type, you enter one of the function modules you created, which determines the characteristic value to be used dynamically when the characteristic is accessed when executing a planning function. On this basis, the system can compile the content of the planning package and transfer it to the planning function for processing. See the F1 help on the function module name for details and an example.

Alternatively, a button may be selected to take the administrator direct to the Function Builder.This will allow the variable to use a characteristic value to be determined dynamically (at run time).

Authorizations: Here, the variable is replaced by the authorization entered for the characteristic in BW.This replacement type is not used with variables of type HIERARCHY, ATTRIBUTE, and NUMBER.

Variables of Type Exit   When to use

Exit always returns characteristic values in internal format! You cannot set a hierarchy (name, date, version…) with the variable. Be careful with pop ups in the exit – they do not work in the web! The Exit is usually called several time – try to buffer results and limit access to data base.

The default system behavior is that the Exit is only called once for filling the drop down box in the Web (several times when selecting data etc.). If you are in a Web Interface and the exit returns other values than in the first call (e.g. the value depends on another variable that has been changed in the mean time) you will not see the values in the drop down box (solution – reenter the Web Interface or modification in the generated coding). The default behavior can be changed so the exit is called on each refresh. 

When reading values of other variables be careful about the order of the calls. Use variables with two characteristics if necessary.

For examples have a look at:
Function group UPFX
How-to paper: "Variables of Type Exit"
Function UPRY_ACT_FISCPER (Current Fiscal Period)
Function UPRY_ACT_FISCPER3 (Current Posting Period)
Function UPRY_ACT_FISCYEAR (Current Fiscal Year)

Variables: User Interaction

Restriction of selection required by user: This determines whether the user must select an active value (active combination) from the values defined in the variable, with which he is currently working in the planning session. If the indicator is set, the user must always select an active value (active combination).If the indicator is not set, all the values contained in the variable are available to the user. A restriction is not required but can also be made in this case.

If several characteristics are assigned to a variable (or the variable has the type 'hierarchy'), then the system sets the indicator automatically. The indicator is then not ready for input in this case. Input allowed by user: This determines whether the user can enter the values for the variable himself.

If the indicator is set, the user can enter values for the variable himself. Therefore, the values must not be centrally maintained by the system administrator. Values, which the administrator enters in the variable maintenance for a used, can be overwritten later by the user. If the indicator is not set, all values must be defined centrally in the variable maintenance.The indicator is only relevant for the replacement type 'user-specific values'.

  1. The variable values are buffered by the system after the first call (except type exit).
  2. Buffering can be influenced
  3. During one planning step the values can be requested several times (e.g. starting a planning folder).
  4. Variables of type authorization
  5. Be careful when using them on multi-planning areas since there could be different authorizations for the underlying Info Cubes. 
  6. Variable does not differentiate between authorization for change and display.
  7. Planning only accepts selection conditions of type equal (EQ) or interval (BT), not wild cards like '*' or '?' in the selection. 
  8. It is not possible to exclude certain values from the selection.
  9. A conversion to single values takes place based on master data.
  10. Hierarchy nodes are converted into single values Possible side effects:
  11. The super user has huge selection tables.
  12. Conversion needs some time.
  13. If the variable values are not used in F4, where single values are required the system does superfluous work
  14. A Variable of type exit should be considered to find an alternative for wild cards.
Related Posts

No comments :

Post a Comment