Layouts Types in SAP Business Warehousing

After following this post you will get an idea about the way of using Layouts Types in SAP Business Warehousing.After completing this post,you will be able to:

Understand the different types of planning layouts and choose the right type
Efficiently let the system create header and key combinations
Use dynamic data columns and key columns
Create totals in rows and columns
Attach documents in layouts
Use the additional design options in the layout builder

On the first screen of the layout builder you can choose between three different types of layouts by setting a radio button:

  1. key figures in data columns (default)
  2. key figures in key columns
  3. key figures in data columns, rows individually defined.

So far we only have used the first option (type 1). In this case the system fills the key the key columns from the selection (taking user settings such as for subtotals into account). Thus – depending from the package chosen – the number of entries in the layout can vary. The user also can add new records provided that not every possible record is already presented/used in the layout. The structure and number of the data columns is fixed.

When choosing any of the other layout types the structure of the key column is fixed such as in the case of the data columns. When designing a layout with any of these types each line in the key column can be defined individually. Characteristics can be place in the key columns and the columns are defined by choosing the characteristic values for each of this line. Most features/options that are available for the data columns are available for the key columns as well.

Type 2 and type 3 only differ in the use of the key figures. In type 2 the key figures are used in the data columns, in type 3 the key figures are used in the key columns. 






Second Screen for Layout Builder

The appearance of the second screen of the layout builder depends on the definition of the type of the layout.Depending on where the key figure is used you can set the field "no units", "scale" and "decimals". If the key figures are used in the data columns you can use this fields in the data columns, if the key figures are used in the key columns you specify those fields for the key columns.

You can also create empty row by either entering positions where lines are missing (e.g. entering positions 1, 2, 4 – the system will generate an empty row in row 3) or by just entering a position number and nothing else. You can use this feature to do calculations in Excel (the formulas will not be overwritten!) or to format you layout.


Additional Options in the Layout Builder

When using the default settings the system will try to only bring up existing data:
If you have chosen layout type 1 (see above slides) then the system will only show existing header combinations and will present those combinations in the key column that already exist. New lines can be entered by hand.If you have chosen layout type 2 or 3 then the system will also only show existing header combinations but will populate every cell, that is needed because of the definition of the layout but where no data can be found on the data base with a 0.

When you expand the sub-screen for additional settings you can make the system generate characteristic combinations automatically: 

generate every header combination that lies in the selections (in ANY type of layout!)
generate all possible lines in a layout of type 1.
This feature is very helpful when using layouts of type 1 as the users do not have to enter new lines in the layout but can directly see which are the possible entries. All cell in the generated lines will come up with 0‘s.

Hint: be careful with the selection when using this option! The number of lines in a layout of type 1 can be calculated by multiplying the number of characteristic values for each characteristic in the key column. If for example you use the characteristics customer and product in the key columns and have 100 values each you would obtain 10,000 combinations. The same is true for the header combinations – even if they are not shown in the layout directly it nevertheless takes time to generate them. Thus you should:


Variables in Layouts

You can use variables as well to define characteristics values for those characteristics you have placed in the data columns (or in the key columns provided you have chosen type 2 or type 3). Remember that a characteristic in a data column has to be restricted to a single value. From there follows a slightly different behavior for time characteristics and non time characteristics.

Non time characteristics: The variable value must contain exactly one single value. In order to display the value (short, medium or long text or key) in the heading just enter the name of the variable in capital letters in the heading. 

Time characteristic: If a time characteristic contains more than one value then the system will use the lowest value as default. If you want to use the other values contained in the variable in the data column you have to enter an offset for each column. To display the proper text again you have to use the name of the variable in capital letters – when using an offset for the variable you have too use an offset in the text as well (e.g. in the variable VARPER contains the values 001.2010 and 002.2010 then VARPER in replaced by 001.2010 and VARPER+1 is replaced by 002.2010). Note that for example the offset 1 will return the next time value, starting from the lowest value in the variable. This value is not necessarily the next higher value contained in the variable.

You can use any variable from the planning area in a planning layout (with the restrictions mentioned above). If at the time of execution a variable value is not contained in the selection then the data column will be dynamically switched to a comparison column.If you need a data column for every value in the variable you can use the feature dynamic data columns


Dynamic Data Columns and Key Columns

The data columns usually have to be defined one by one when creating the layout. A value for each characteristic has to be assigned at that time or a variable has to be used if the characteristic value is not yet known. But in some cases even the number of data columns is not yet known at design time (e.g. rolling forecast with a fixed end) or even if they are known it is a lot of work to enter all this columns by hand.

When using the option "dynamic data columns" the system can generate data columns from the selection in the planning level/package. As the feature can be used in the very same way for key columns (provided you have chosen type 2 or type 3) we will concentrate on data columns. You can also use characteristics that are restricted in the package as dynamic characteristics.

On the first screen of the layout builder you can choose one characteristic as a dynamic characteristic. When you choose on characteristic as dynamic as number of restrictions possibly apply to other characteristics. If you use compound characteristics the upper characteristic will be automatically placed in the header. You will see an icon in the “reasons” field in the table on the first screen of the layout builder.

In the table used for defining the data columns there is an additional column called "dyn." ("dynamic column"). If you click the check box for one of the data columns the system will automatically place the name of the characteristic in the column where you have to specify the characteristic value for this data column.When executing the layout with a planning package the system uses the current selection (planning level/package) for the dynamic characteristic.



Related Posts

Using Variables in SAP Business Warehousing

Variables in SAP Business Warehousing are used at the planning level.

Planning Level A variable may be selected against a given characteristic available in the level. Instead of entering a characteristic value click on the variable icon. Then the list of variables for that characteristic is presented in a pop-up. One may now be selected and it will be transferred to the "from" field of the selection. No "to" value may be entered. If you wish to no longer use the variable in the selection click on the icon once again and it will blank the "from" field leaving the selections available to be used for characteristic values.

Note that this is only possible within the planning level – not within the planning package. If you were to have flagged the "selection in package" box for a given characteristic and then go to create or change a package you will see that the variable icon is greyed out.

Manual Planning Layouts: Where a given characteristic is selected in the first screen of the manual planning layout wizard to appear in the Data columns a variable may be selected. When in the configuration of data columns click on the variable icon. Then a pop-up appears allowing the selection of a variable and (in the case of time characteristics only) an offset. 

The usage of so-called "dynamic" columns and how variables may be employed there is explained in the unit of this course concerning advanced manual planning.

Planning Levels : In the selection tab where you make restrictions when configuring the level

You can choose to select a variable instead of characteristic value(s)
Manual Planning Layouts
When creating or changing a layout using the manual planning layout wizard (in the data columns and/or lead columns tab within the second screen)

You can choose to select a variable instead of a characteristic value
You can also use the variable value in the column/row heading

Parameter Groups of Planning Functions (not Formulas):

Conditions - Instead of entering a characteristic value click on the variable icon. Then the list of variables for that characteristic is presented in a pop-up. One may now be selected and it will be transferred to the "from" field of the selection. No "to" value may be entered. If you wish to no longer use the variable in the selection place the cursor in a field for the "from" value, click on the icon once again and it will blank the "from" field leaving the selections available to be used for characteristic values.

Fields to be Changed - Instead of entering a characteristic value click on the variable icon. Then the list of variables for that characteristic is presented in a pop-up. One may now be selected and it will be transferred to the "from" field of the selection. Depending on the function type there may be a "to" field so you can enter a range of values. A variable may likewise be selected here. If you wish to no longer use the variable in the selection place the cursor in the respective field, click on the icon once again and it will blank the field leaving the selection available to be used for characteristic values.

Parameter Groups of Planning Functions (not Formulas)

In the entry conditions make restrictions when configuring the conditions

You can choose to select a variable instead of characteristic value(s) Likewise for the values of the fields to be changed

You can choose to select a variable instead of a characteristic value

Parameter Groups (Formula Editor) of Formula Planning Functions Within the formula editor using the simple programming language to set up a formula to manipulate transaction data

You may use an expression employing the function "VARV" to work with a variable value rather than a fixed value. If the variable contains more than one value, you can use the "VARI" and "VARC" functions Formulas also use variables known as "local" or "auxiliary" variables. The variables which we set up in the planning area are known as "global" variables to distinguish them.

Variables in Planning Folders

Planning Folders: You may hide the display of variables using the "Close Variables" push button (or "Hide Variable Values" icon). You may show them again using the "Display Variables" push button (or "Show Variable Values" icon).

At any point during the execution of the folder you may change the variable value to work with and press "Refresh" to apply the change. You do not need to include variables in layouts or functions, which you do not want to change, into a planning folder.

Since the system does not display layout header areas in planning folders with output layout and since it is not possible to use the "Change header combination" for this mass type, you can create a similar function with variables. In this case, however, you have to consider that variables influence the characteristic selection of a package, but the system only displays a part of the package with the "Change header combination" function (for folders without output area). This may effect the performance and the planning functions on the same level. Caution: in layouts where the header area is not completely restricted to single values, the system always uses the "first" header characteristics for which there is data available. No other characteristic combinations are accessible in the "with separate output area" folders.

Therefore, restrict the header area of such folders in a unique manner.In most cases, it is useful to activate the "Restriction of values required" flag in variables which you want to use in planning folders. Then you can be sure that functions and layouts in the planning workbench.  





Adding Variables to Planning Folder

When editing the planning folder the variables to be used are simply included by dragging and dropping the required variables into the work area. To ensure that all those variables that are used in the layouts of the folder are contained in the folder, choose Go to → Global Settings. The system then lets you add missing variables to the folder. It also advises you if there are "surplus variables" which you can then choose to remove.




Related Posts

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.

Advantages
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

SAP BW Generic Functions and Planning

SAP Business warehouse Fields to Be Changed

Definition: Characteristics or – using the generic entry "key figure name" –  key figures whose values you wish to change. The exact values of those fields are defined in the parameter groups of the planning function, not in the function itself. 

Performance: The more fields are changed, the slower the function will become.

SAP Business warehouse Fields for Conditions 

Definition: Characteristics for which deviating processing have to be specified based on the values of the characteristic.The exact values of those fields are defined in the parameter groups of the planning function, not in the function itself. 

Performance:The more fields are used in conditions, the slower the function becomes.Replace conditions with restrictions in the planning package. This will reduce the size of the package and at the same time avoid costly checks of conditions.

Reference Data

Definition: Characteristics or – using the generic entry "key figure name" – key figures that are used to relate the new values to existing values.The exact values of those fields are defined in the parameter groups of the planning function, not in the function itself. 

Performance: If the reference data is not contained in the planning package, an additional database selection is necessary.If no other user needs access to the reference data, include the reference data in the planning package. No other user will be able to work with this data until it has been unlocked by the user.

Basic Planning Functions

The copy function is used to get data from a source inside the planning area and to copy it to a destination in the selected planning package.You typically use this function for the following purposes: 

Copy plan or actual data from a reference version into the current plan version as a starting point for planning
Copy actual data into the current forecast period
Get targets for organizations and Balanced Scorecards.




Delete Function

The delete function is used to remove data from the selected planning package.The records are not directly deleted from the Info Cube. The system rather creates additional records with offsetting values. The original and offsetting record will finally be deleted, when the Info Cube is being compressed. For performance reasons it is therefore recommended to compress the Info Cube on a regular basis (schedule a nightly job). There is a special delete function to remove records that are invalid according to the characteristic relationships. This function will be explained in detail in the unit about characteristic relationships.

Revaluation Function

You typically use this function:
to create different plan versions
to revalue plan data with a specific percentage



Re post Function

You typically use this function for the following purposes:

Organizational changes
Change characteristics assignment
There's a special re post function to realign historical data according to the characteristic relationships. 

Adding Functions to Planning Folder

Planning functions can be included in the planning folder. These functions are constantly available when executing a planning folder, independent of which input and output layouts are active.The second option is to include planning functions under the input layouts. In this case, the function would be only available if the corresponding layout is displayed. For each function, you can define when the function is executed:

Push button: The user executes the function by clicking on a button.

Execute before layout display: The function is executed before the planning layout is displayed. If the function changes data which is displayed in the layout, the changes are immediately visible in the layout.

Execute before layout change: The function is executed when you exit the planning layout. If the function changes data which is displayed in the layout, the changes are not immediately visible after opening the layout.




Undo and Trace of Function Execution

Executing planning functions causes data of the planning package to be changed, generated again or deleted. When testing newly created functions and the corresponding parameter groups (in particular the Customizing phase) data changes may occur unintentionally.To undo unintentional changes if necessary you have the following options within the BW-BPS planning environment:

You can exit the planning session without saving. This means that all changes (both to data as well as to the planning objects, such as planning levels and functions) which you have made since saving the last time will be lost.

You can deliberately undo the data changes which were caused by the last execution of a planning function. All remaining changes that you have executed during the current planning session are not affected. You will find more information on these options in this section.

Prerequisites

In order to be able to undo changes to data you must not have performed the following activities since executing the function that is to be reversed.

You have not executed any further planning functions.
You have not navigated to any other element (such as, for example, displaying a planning area or changing a parameter group) within the planning environment.
You have not saved the data.

How to undo changes:
In the planning workbench .choose Edit 
Undo Planning Function.
In planning folders choose Edit
Undo Planning Function.
In web interfaces click on the Undo Button.

The system does not take manual changes that have been made in the mean time into account. The data is restored in the form in which it was before executing a planning function – independent of whether manual changes were made in the mean time.

Trace Mode for Planning Functions

The trace mode allows you to obtain detailed information about which data objects were changed in which way when executing a planning function. This function is especially useful when you set up new planning functions and parameter groups and want to check whether the function has the desired effect on the data set. How to trace a function:
From the context menu of the parameter group, choose Execute with Trace.

Trace Output

On the right hand side of the screen, switch to the Trace tab strip.The top part of the output shows a row for each combination that has been processed by the function. All fields that have not been changed are displayed.An icon next to a combination indicates if messages have been recorded. The lower part of the screen shows the Before and After picture for the fields were in the "fields to be changed".




Related Posts

Customizing of Planning Functions in SAP BW

Planning functions in SAP BW change the transaction data in a planning package. Each planning function is assigned to just one planning level. There are various types of planning function (for example, copy, distribute, delete, formula). Parameter groups are created for a planning function. Those fields that are to be changed are determined when a planning function is defined. The values of those fields are determined when a parameter group is defined.All Planning Functions are generic, which means, that the business logic has to be given by the person, which customizes it.

Generally speaking you create an input mask, defining the planning function, by addressing fields to the "fields to be changed" and "fields for Conditions". Then, within the parameter group you will then have to fill in the concrete rule in the input mask you created within the planning function itself.After that, the planning function is executed by double-clicking the planning package and the parameter group on the one hand for an open layout, on the other hand with closed layout. In the last case you will see the buffer message.


How to Construct a Planning Function

If you want to construct a planning function first be aware, that all planning functions are generic and that the business logic has to be realized by customizing the planning function.The upper slide gives you an idea of how to construct a planning function, using the Copy Function as an example.Please  keep in mind, that constructing a planning function you must always imagine, what will happen in the data table of the Info Cube connected to the planning area.

Generally speaking, a planning function contains three elements:
  1. - type of planning function
  2. - input mask for concrete rule
  3. - concrete rule.

The creation of a planning function contains two elements: creating the planning function itself and creating a parameter group.The planning function contains the selection of the type of planning function and the creation of an input mask and the parameter group contains the input of the concrete rule for execution.Navigation for executing the function is: double-click at the whished planning package, then double-click at the parameter group, then double-click at the layout. It would also work the other way round: double-click at the whished planning package 




  1. First step constructing a planning function is to determine the business logic.
  2. Second step is to decide, which type of a planning function will fit to the needs.
  3. Third step is to create an input mask for the concrete rule.


To do this, on has to decide, which data sets in the data table of the Info Cube shall be selected for the execution of the planning function.Since the planning function is only used to create an abstract input mask, we only have to select fields into the Fields for Conditions.In the upper example the field fiscal year is to be selected into the Fields for Conditions, because the Business Logic says that only data for fiscal year 2007 shall be selected.So the Fields of Conditions answer the question: Which data sets shall be taken as a basis for the execution of the planning function?

For the creation of an input mask one also has to ask himself one further question: “Which fields in the fact table will get a new characteristic value or new data for the key figure when the planning function is executed”.

Exactly these fields have to be put in the Fields to be Changed.Having addressed the Fields for Conditions and Fields to be Changed, the input mask is created. You can´t see it in the planning function itself, but within the parameter group.




Within the parameter group you will first see the empty input mask. Here you will fill in your Business Logic as a concrete rule and afterwards execute the parameter group for the selected segments from your planning package.


Planning Functions – Data Selection

 Selection of transaction data is determined by the package (definition of planning function is not taken into account). Selection of reference data is determined by the planning function

  1. "from" selection of a copy function
  2. "right sides" of FOX formulas…
  3. Reference data will not be locked.



Related Posts

SAP BW Modeling Locking of Plan Data

Control of write access to plan data

In a planning project it is crucial that write access to the data is closely controlled. There are several different mechanisms that can control access to plan data. These are fixed locks/permissions that are customized during the project phase by the project team and maintained by the administrator and dynamic locks that are automatically set by the system.The first are necessary to generally control which data a given user is allowed to change. This can be done by maintaining authorizations and/or data slices (see slide in this chapter). The latter are necessary as no two users are allowed to change  the same set of data at any given time.

Locking of Plan Data

  1. When a user is working on plan data and changing it the databbwill be locked against changes by other users.
  2. All records that are used in the aggregation process for ablevel not containing all characteristics influence the value on that level – all records have to be locked
  3. Two selections lock each other if they use the same characteristic values and the same key figures. It does not matter if a record for the selections exists or not.
  4. Characteristics that are not in the level will be locked with ‘*’ (“everything”).

Whenever a user accesses plan data (in change mode) this set of data will be locked against changes by other users. The locks will be held as long as the user is using this set of data, i.e. as long as the data is kept in the planning buffer. Thus the locks are only released if the user leaves planning (web interface, planning folder or planning framework).

If you enter the plan data at a highly aggregated level (i.e. a planning level that does not contain all characteristics of the planning Info Cube) then the system has to aggregate the key figure values over all the characteristics that are not in the planning level. All records that are used in the aggregation influence the result (i.e. the sum) and thus the value that the user sees, as well as the value that the system uses for calculating the delta records after data is changed. Thus all these records influence the result of the planning (and delta records) and have to be locked against changes.

Whenever you analyze whether two selections lock each others you must – because of the rule above – always go down to record level, considering all characteristics in the Info Cube. Two selections will lock each other if they have at least one record in common. This record does not have to exist on the data base yet.

Locking Issues in Projects

Locking is a key issue in large projects – design a concept as early as possible and test it!
Performance/Memory: the more characteristics you have in the Info Cube and the more users you have the more memory and time the system needs to handle the locking .
In manual planning all data in the layout is locked – also the comparison columns! (This is different with planning functions – they can read data purely as reference data that is not locked).
To check the locks that are set in the system at a given time use report UPC_ENQUEUE_READ.
If a user wants to release the locks that he is setting then he has to release the data – i.e. leave the planning application.

When the system locks data it saves the selection on the server. When another user wants to access data the system will check against every characteristic whether the user can access the data or whether it is locked.

Thus every additional characteristic increases the memory needed to save the selection and the time needed to check for common values. If you have a look at the characteristics in the Info Cube you will see that many values are the same for all or at least many users (like the fiscal year variant, the planning year, …) and some are different for every user (such as a cost center in cost center planning). You can set up the system in such a way that it ignores all these characteristics that are equal for all/many users for the locking. This saves memory space and run time. 

Controlling Write Access: Data Slices

The user locks set by the system are dynamic – the user has permission to change the data but cannot do so at the same time as another user is working on the data. In a project you also have to set more "permanent" locks that are valid for every user (or a certain number of users). 

Data slices are a tool to lock certain selections against changes. They can be switched on and off when needed. When using variables you can make them more flexible and even user-dependent (using variables).

A general locking concept for plan data is necessary, e.g.:

  1. Actual data should not be overwritten.
  2. Certain plan versions should not be changed anymore after a certain date.

Data slices in BW-BPS
 
  1. Are defined for an entire area
  2. Lock all entries in a selection against changes (manual planning or planning functions).
  3. You can use variables in the data slices.
  4. Toggle for switching data slices on and off.

Planning Profiles

Planning profiles and planning folders are independent from each other.Nevertheless profiles restrict the number of entries in the trees a user can see when creating a planning folder.

Profiles restrict the number of objects in the planning workbench a user works with:

Number of planning areas, planning levels etc. in the planning framework.
Number of variables a user can set.
A user can use one profile at a time.





Architecture and Data Buffer

The  SAP BW-BPS uses a buffering mechanism for transaction data as well as for customizing. When  You change transaction data or any customizing the system keeps these changes in the buffer so you can work without pressing the save button after every change. This buffer is unique within each system mode (and thus user-dependent). 

To fully understand the mechanism we introduce the term "detail application". What is a detail application? In short a detail application is anything that is presented in the right screen of the bps0. Thus for example the layout builder is a detail application as is the execution of a manual planning or a planning function.

Whenever you select some data or use a customizing object by starting one of this detail applications (no matter from which front end) the system first checks whether the requested data is already in the planning buffer. If it is already contained in there the system will use the version from the buffer, otherwise the system will select the data from the data base and keep it in the buffer.

The system writes the data back to the buffer whenever you leave one detail application and call the next one ("Commit event"). This model is used in all of the front ends. Thus if you are working in a manual planning layout and press a button for executing a planning function the system will first write the changed transaction data to the buffer, the planning function will get this data from the planning buffer, change the data and write it back to the buffer. After that the manual planning will select the changed data from the buffer and present it on the screen.

You can only leave a detail application if the data (transaction data or customizing) is in a consistent state. If there are any errors the system cannot leave the detail application and write the data to the buffer. You have to correct the errors or press the cancel button. This action only cancels the current detail application: all the data of previous detail application is already "booked" in the buffer.

If you are satisfied with your work you can press "save" at any time. This will save the data in the data base but will keep the data in the buffer (and thus will keep the lock entries). The system will only release the data from the buffer when you leave the planning application. There are two different ways of saving: 

  1. Save Model ,which only saves the structures you customized in the Planning Framework (only available in the menu in the frame work).
  2. Save All, which saves the Customizing and the planned data (the SAP save button).
  3. If you are not satisfied with your work you can leave the planning application without saving. Then no changes will be written to the data base.
  4. BPS never directly changes the data records in a transactional Info Cube but writes back delta records. These delta records are calculated when writing data back to the buffer and are kept in there as well.
  5. The system also buffers master data such as characteristic values or hierarchies in order to increase the performance.



Related Posts

Planning Folders in SAP Business Warehousing

Planning folders are used as the end user front end in the BPS. Planning folders are not only used to deliver the end user fixed layout/package combinations and thus facilitating the manual planning but can be used to build up entire planning applications. 

Major screen elements are:
 
an area for variables
an area for planning functions
an area for planning layouts and graphics
Planning folders are used to group together objects you have already created in the planning framework and thus make the navigation more easy for the end users.The layouts used in the planning folder can be used for data input as well as for analyzing the results of the data input. For doing this analysis layouts that are only ready for output are used.

Types of Planning Folders

When creating a new planning folder you have to select from a range of possible types of planning
folders: 

with or without separate Input/Output areas, web enabled,
with or without separate Input/Output areas, not web enabled,
 folders (not executable).
The non executable folders are used to group the executable planning folders in a list (just as a file folder). It makes it easier for the end user to find the right planning folder if there are many of them. When using a planning folder in the web (web enabled planning folder) the header combination must be unique as from the planning folder a Web Interface is generated and the Web Interfaces do not support multiple header combinations. When choosing this option the system checks the header combinations when you create the planning folder. You can also generate a web interface from a non web enabled planning folder but in this case it is not guarantied that the header combination is unique and the web interface can be used. If you want to simulate the navigation through the header combinations then you can use variables for the characteristics in the header.

In a planning folder you can have one input layout. you can decide whether you want to have a second layout underneath the input layout as an output layout. These planning folders are called "folders with separate Input/Output area". In planning folders that use one input layout only (and no output layout) you can use layouts with Excel or with SAP ALV as input grid. The settings from the planning framework will be used. When using planning folders with input and output layout you can only use SAP ALV because of technical restrictions. If you use a layout that is defined using Excel in the framework then the system will switch this setting for the current folder.

If you need more than one input layout in a planning folder then you can switch between then by using push buttons (just like with tab strips). The layouts used in one planning folder (input layouts as well as output layouts) can be contained in any planning level or planning area – thus planning folder can be used to easily bring together information from different areas or levels.Example for planning folders with input and output area: you want enter data at product level but want to see the results at product group level at once. Thus you use an input layout from a planning level containing product only and display the results in an output layout from a planning level containing product group.


When entering the customizing of the planning folders on the left side of the screen you will see the well-known double tree from the planning framework containing all customizing objects created in there.If you have set a planning profile in the framework you will only see the objects that are in your profile.

You place a layout in a planning folder by

selecting the proper level
choosing a planning package by double clicking
double clicking on a layout and dragging and dropping it onto the chosen area (input or output area – if available)
specifying the description on the popup that will show up after drag and drop.
If you drop several layout/package combinations to the same area the system will create buttons so you can switch between the layouts (as with tab strips).





Menu Options for Customizing of Planning Folders

Jump to planning framework: you can directly jump from the customizing for the planning folder to the framework and edit the objects there. For example you can switch a layout from Excel to SAP ALV. After saving and pressing "Exit" in the framework you jump back to the customizing of the planning folders and can used the changed object.

Switch layout appearance: if you want to see your data as a graphic instead of a layout you can set the type of graphic here. Note that you can only output layouts as graphic. If you want to see the values of an input layout as graphic as well include the layout as well as output layout and switch the type to graphical display.

We will explain the use of variables and planning functions in planning folders in the chapters for variables and planning functions.  









Executing a Planning Folder

When using the BPS with a planning folder you get a starting screen containing all planning folders grouped by the (non executable) folders.The symbols tell you whether a folder is a non executable one, a planning folder with one layout or a planning folder with input/output area.You can set a planning folder as standard folder in this screen. This folder is always pre-selected (user-dependent) and can be started directly be calling the transaction UPSX.You can display the detailed information and the description of the planning folders.

When double clicking you open the chosen folder.
By using authorizations you can limit which planning folder an end user can use (and see in the list).

Using a Planning Folder

When executing a planning folder you have the same options as in the framework (except for the header combinations).If you are using a planning folder that allows multiple header combinations then you have an additional push button for extending/collapsing the header.Note that in planning folders also the buffer is used. The data is only saved if you press the save button.If you leave the planning folder all locks are released. If you move from one layout to another within the same folder the locks are not released! 

Related Posts

Manual Planning Basics for SAP BW

Creating a Planning Layout

Manual planning is used to manually enter or change plan data. It is also used to visually analyze data, for example doing a plan/actual comparison. The amount of data used in manual planning should be limited – for working on mass data you should use planning functions (planning sequences).

An input sheet in manual planning is called a planning layout and is always defined within a planning level. When you want to use manual planning and want to create planning layouts you first have to create the entry "Manual Planning" in the planning framework by using the context menu.
The planning level defines the level of aggregation of the data used in the planning layout. The selection of the data used in the layout is done by choosing a planning package. Thus the layout is a view on some data set defined by the planning level and the planning package.
In the GUI you can use two different front end tool or grids for displaying layouts – Microsoft Excel or SAP ALV Grid.
A layout is built in the layout builder. The layout builder is designed as a wizard containing three screens. The first two screens are used to design the front end independent settings, the third screen is used to set front end specific settings. You can move back and forth between the three screens.The principle ideas and general setup of a layout is quite similar to BEx queries in reporting.

As already described the planning level describes the level of aggregation and also determines which characteristics have to be used in the layout (every characteristic in the level has to be used in the layout). There are three areas in the layout – the so called header area, the key columns and the data columns:

Header Area: The header area contains general selections that are the same for all cells/input fields in the layout. If – for example – within one layout you want to plan data for the next year only you can put the year in the header area.

Key Columns (or lead columns): The key columns define what will be shown in the rows of the layout – if, for example, you place the characteristic product in the key columns then the system will show one line in the layout for each product.

Data Columns: Here you define which columns you want to see in the layout. You can place different key figures in different columns (such as one column for sales volume and one column for revenue) as well as characteristics. If you want to see your revenue by period you can create one data column for each period all using the key figure revenue.






 In the first screen of the layout builder you determine where each characteristic is to be used by setting radio buttons. As every layout should be executable with every package only those characteristics can be used in the data columns that are not restricted in the planning package. The restriction can be seen in the above example – for product and product line you cannot choose the radio button for data column.The symbol to the right explains you that this restriction is because of the selection in the package. Later we will see that there are also other cases where such a restriction applies. When clicking on the symbol you will get more information.You can also set which type of text should be used in the layout for the characteristic values ("short", "medium", "long").

On the second screen of the layout builder you will see one tab strip for each of the areas in the layouts. The content of these tab strips depends on the settings on the first screen.For the header area you can choose the sort order in which the characteristics will be shown. If you do not want to see a characteristic at all you can hide it.

On the tab for the key columns you can specify the sort order of the columns and also how the characteristic value should be displayed. You can choose "Text", "Key", "Key/text" and "Text/key". Note that if you have chosen "Text" only (and not in combination with the technical key) you will not be able to add new lines in the layout. A text is not necessarily unique so the system cannot derive the technical key from the entered texts.

On the tab for the data columns you can create new data columns. In a data column you can specify a number of settings:

Position: the sort order – this field can be used for easily rearranging the sort order of the data Columns.

Comparison Column: This flag switches a column input off. In the above example we make the columns with the actual version input off. Note: all data selected in a layout will be locked, also such data that is contained in a comparison column. Thus this setting is only a local setting in the layout. For reference columns you can also choose characteristic values that are not in the planning level.

No Units: If you do not want units/currencies to be displayed in the layout you can set this flag.

Heading: Here you enter the actual heading for the data column. If you do not enter anything the system will automatically use the name of the key figure in the column as a heading.

Characteristics: each characteristic that was placed in the data columns on the first screen of the layout builder will have one column in this table. In our example you specify which version is to be used in which column.

Scale/Decimals: You can set a scaling factor as well as the number of decimals. If you do not set anything here the standard settings for the key figure will be used (maintain these settings in the BW Admin Workbench).






Executing a Planning Layout

You execute the manual planning by double clicking on the planning package and the planning layout.The already existing data will be selected from the database (or the planning buffer if it is already contained in there) and will be displayed in the layout. You can now change the data or add new data. When planning with Excel the system will provided 20 empty lines to enter new records (if new records are possible). If you want to enter more than 20 new lines you have to press "check", "insert" or "save" (see next slide) and the system will provide with more empty lines.If you navigate away from the layout (by choosing another detail application) the data will be written to the buffer. If you press save in the SAP menu the data (and the customizing!) will be saved.


Multiple Header Combinations

As you have seen a characteristic in the header has exactly one value within a planning screen. What if in the selection you have more than one characteristic value?

The system will access the database/buffer once with the entire selection (including all values for the characteristic in the header). Then it will determine what is the first header combination and will present it in the planning layout. 

You can move to the next/previous header combination using the arrow buttons in the menu or you can use the third button for going directly to a specific combination – even if it does not exist yet.

Hint: Restrict the number of header combinations as all the data and not only the data you see when the layout comes up is selected from the database! When calling a layout with a selection that is not unique for the header combination the system will present the first header combination for which data could be found. If there is no such combination, i.e. if there is no data yet then the system prompts the user for the first header combination.


In the settings for the lead columns you can choose whether you want to see: 

Subtotals for every characteristic in the key column – if you only have one characteristic in the key columns then the subtotal is the total itself, 

A total over all records in the layout – this option is only available if you have more than one characteristic in the key column (see above),
a hierarchical display for the subtotals.Note that the last option is only a display option and does not need or use a proper hierarchy. This  feature is used to make a comparison between subtotals more easy as lines can be suppressed.

The above popup is available in the layout builder as well as during execution of the manual planning. The settings you save in the layout builder will be used when starting the layout. The settings can be changed when executing the manual planning. Note that permanent changes can only be done in the layout builder.





Related Posts