The Manage Allocations App
The Solutions Framework contains an example manage allocations app, that is always up to date with the latest changes. Use this app to create an initial Manage Allocations app, or to compare an existing Manage Allocations app to the latest example.
To start configuration of the Manage Allocations app:
- Select the Design module.
- In the Apps category, expand Data Collection.
- Expand Data Table Input.
- Expand Existing Apps.
- Click on Manage Allocations to open it.
- Click the Customize button.
- Click Save.
Modifying the manage allocations app
Manage Allocations allows the user to define allocations to be executed within the system. Allocations are used to spread data from a source to a target based on a pattern or rate.
For example, an allocation may spread IT costs to all departments based on the number of computers in a department. Manage Allocations is implemented as a data table input app and can be modified in the Apps category of the Design tab of the client. Allocation definitions are stored in the APP_ALLOC table. The definitions of the areas are stored in the LVAPP_AREAS table. The EditProcedure function is used to provide a custom cell editor for the definition of areas to avoid having one symbol column per dimension per area. The ALLOC and AREA code libraries are used to handle the editing and storing of area definitions.
Note: In order to use the Manage Allocations app, allocation target symbols must first be created. For more information, see “Managing Allocation Targets” in the Solutions Framework Administrators Guide.
Pre-selection
This section checks that allocation symbols have been created prior to running the app. By default, this checks the symbol specified in the system attribute ASAllocRuleParent in the dimension defined in the system attribute ASAllocRuleDim.
- For Close, this is by default the CORP_Alloc symbol in the DATAVIEWS dimension
- For Transfer Pricing, this is by default the LTP_Alloc symbol in the CONTROLS dimension
This section will also check whether the system type that the app is being run on is Tax (Longview Transfer Pricing) or Close and set the following logic and variables as required:
- The list of categories an allocation can be assigned to.
Note: If you are using parallel allocation execution, you can use categories to group dependant allocations together using categories.
- The list of columns to exclude when a row is duplicated.
- If a TIMEPERIOD column exists in the APP_ALLOC table, the app is set up for time period specific allocations.
Post-selection
If a TIMEPERIOD column exists in the APP_ALLOC table, the left title text is set up to display the selected timeperiod in the Manage Allocations table view.
Data Table Definitions
The app contains two data table definitions: Areas and Alloc. Areas queries the standard LVAPP_AREAS table and should not be modified. Alloc queries the customer specific APP_ALLOC table and will require modification if the columns are different from the default supplied in the starter kit.
Note: In the Alloc data table definition, the TIMEPERIOD column should be selected. It will be deselected by default.
The additional configuration section contains a time period filter. This will limit the allocations to manage to the time period selected, and only applies to Longview Transfer Pricing implementations that contain a TIMEPERIOD column in the APP_ALLOC table.
Table Views
A single table view is included for the Alloc data table. Modifications will be required if the columns in the Alloc data table are different from the default supplied in the starter kit.
Note: In the Alloc table view, the TIMEPERIOD column should be deselected.
The additional configuration section contains the EditProcedure settings for each of the area columns, and the columns that are excluded when a row is duplicated. It also defines the number of decimals for ID and PROCESSORDER to be 0.
View Actions
A view action is included to run the Allocation Proof app. Running the Allocation proof app allows you to view what the results of the allocation will look like before running the allocation.
The Allocation Proof app was introduced in version 10.3(Build 967). If you have upgraded from an earlier version, the following view action must be created in order to be able to run the allocation proof app:
Name | AllocationProof |
---|---|
Action Location |
Row |
Views to add actions to |
Alloc |
Action text |
Run Allocation Proof |
Action icon |
<Leave blank> |
Action tooltip text |
<Leave blank> |
Row restriction expression |
<Leave blank> |
Action |
Run PROCEDURE “ALLOC\RunAllocationProof.lvpro” |
Dynamic Actions
Dynamic actions are included to handle when an allocation is added, deleted or duplicated.
Add
The add procedure handles a new allocation being added.
The following steps are performed:
- The next allocation ID is determined.
- The ID column is updated with the allocation ID.
- The allocation ID is passed on to the Edit procedure via the AREA_RELID variable.
- The markup percentage and allocation percentage are initialized to 0 and 100 respectively.
- Procedure Edit is executed.
Duplicate
The duplicate procedure handles when an allocation is duplicated.
The following steps are performed:
- The next allocation ID is determined.
- The ID column is updated with the allocation ID.
- The allocation ID is stored in variable AREA_TargetID.
- The allocation ID of the source allocation is retrieved to the variable AREA_RELID.
- The areas are duplicated by calling procedure AREA\Duplicate.
Delete
The delete procedure handles an allocation being deleted.
The following steps are performed:
- Retrieve the allocation ID and set the AREA_RELID.
- Delete the areas configured for the allocation by calling procedure AREA\DeleteRow.
ProcessingOrder
The ProcessingOrder procedure dynamically validates the value input for Processing Order.
The following steps are performed:
- The value for processing order is validated to ensure it is not a negative number.
- If the processing order is a positive number, it is rounded to zero decimal places.
MarkupValidation
The MarkupValidation procedure dynamically validates the value input for Markup %.
The following steps are performed:
- The value for Markup % is rounded to two decimal places.
AllocPctValidation
The AllocPctValidation procedure dynamically validates the value input for Allocation %:
The following steps are performed:
- The value for processing order is validated to ensure it is not a negative number and that it is not greater than 100.
- If the processing order is a positive number and not greater than 100, it is rounded to two decimal places.
Edit Actions
Edit actions provide custom editors for the area columns of the allocations.
Set Area
The set area procedure is not called directly by the user, but called by each edit procedure to update the area displayed in the allocation table. This procedure uses the column index passed in via the colIdx variable to set the value displayed in the allocation table. The area is displayed as comma separated list of symbols with a semicolon to separate dimensions.
Set Source
The set source procedure initializes variables required to edit the source for an allocation. Once the source is updated any required modifications to the source exceptions are applied. Source exceptions are modified when an exception is no longer valid (source changes to a leaf, a source exception is not contained within the selected source parent).
The following variables must be set:
AREA_Type = ALLOCSOURCE
For each dimension
- ALLOC_<Dimension> = List of symbol specifications to determine valid selections.
- Any dimensions not specified will allow the user to select from all symbols
- If a single symbol is specified, no symbol selector will display on the form for that dimension.
Set Target
The set target procedure initializes variables required to edit the target for an allocation. Once the target is updated any required modifications to the target exceptions are applied. Target exceptions are modified when an exception is no longer valid (target changes to a leaf, a target exception is not contained within the selected target parent).
The following variables must be set:
AREA_Type = ALLOCTARGET
For each dimension
- ALLOC_<Dimension> = List of symbol specifications to determine valid selections.
- Any dimensions not specified will allow the user to select from all symbols.
- If a single symbol is specified, no symbol selector will display on the form for that dimension.
Set Pattern
The set pattern procedure initializes variables required to edit the pattern for an allocation.
The following variables must be set:
AREA_Type = ALLOCPATTERN
For each dimension
- ALLOC_<Dimension> = List of symbol specifications to determine valid selections.
- Any dimensions not specified will allow the user to select from all symbols.
- If a single symbol is specified, no symbol selector will display on the form for that dimension.
Set Source Exceptions
The set source exceptions procedure initializes variables required to edit the source exceptions for an allocation. Any dimension in the source for which a parent symbol is selected will allow for exceptions to be specified.
The following variables must be set:
AREA_Type = ALLOCSOURCEEX
Set Target Exceptions
The set target exceptions procedure initializes variables required to edit the target exceptions for an allocation. Any dimension in the target for which a parent symbol is selected will allow for exceptions to be specified.
The following variables must be set:
AREA_Type = ALLOCTARGETEX
Set Source Offset
The set source offset procedure initializes variables required to edit the source offset for an allocation.
The following variables must be set:
AREA_Type = ALLOCSOURCEOF
For each dimension
- ALLOC_<Dimension> = List of symbol specifications to determine valid selections.
- Any dimensions not specified will allow the user to select from all symbols.
- If a single symbol is specified, no symbol selector will display on the form for that dimension.
Note: The valid selections for the offset should normally be a combination of the source and target.
Edit
The Edit procedure allows the user to step through the initial setup of an allocation via a series of forms when a row is added.
Description
The first step of the edit procedure is the description form. The description form is used to set general columns within the allocation definition. Modifications will be required to this procedure and the form for any differences between the default columns.
The columns specified via the Description form are:
- CATEGORY
- DESCRIPTION
- MARKUPPCT
- ALLOCTYPE
- ALLOCPCT
- PROCESSORDER
- USESOURCEOF
- NOTES
Source
The next step is setting the source by calling the SetSource procedure. This procedure is also called when the edit button is clicked in the source field. Once the source is set, the source offset and pattern are also initialized with the symbols selected for the source.
Source Exceptions
The next step is setting the source exceptions by calling the SetSourceExceptions procedure. This procedure is also called when the edit button is clicked in the source exceptions field. Source exceptions are used to include specific symbols from within a hierarchy when the source is a parent. For example, you may want to allocation all selling expenses, except for commissions. Source exceptions are optional and not required for every allocation.
Target
The next step is setting the target by calling the SetTarget procedure. This procedure is also called when the edit button is clicked in the target field.
Once the target is set the following adjustments are made:
- The pattern is updated to use the entity selected for the target.
- The source offset is updated to use the allocation symbol and currency selected for the target.
Note: For Longview Close and Plan, the edit procedure assumes the DATAVIEWS dimension contains the target allocation symbols. For Longview Transfer Pricing, the edit procedure assumes the CONTROLS dimension contains the target allocation symbols.
Target Exceptions
The next step is setting the target exceptions by calling the SetTargetExceptions procedure. This procedure is also called when the edit button is clicked in the target exceptions field. Target exceptions cannot be set for an allocation of type “Rate”. Target exceptions are used to exclude specific symbols within a hierarchy if the target is a parent. For example, you may want to exclude the source entity from receiving any of the allocated selling expenses. Target exceptions are optional and not required for every allocation.
Pattern
The next step is setting the pattern by calling the SetPattern procedure. This procedure is also called when the edit button is clicked in the pattern field. The pattern is used to define how the source is allocated to that target. Patterns are not required for Direct Charge allocation types.
Source Offset
The final step is setting the source offset by calling the SetSourceOffset procedure. This procedure is also called when the edit button is clicked in the source offset field. The source offset is used to zero out the source value allocated so that allocated values to not change the original consolidated values. The source offset cannot be set when “Use Source Offset” is unchecked for an allocation.
Post-Refresh
In the post refresh section, the allocation code library is initialized. The library is initialized here because the areas data table must be created prior to the initialization process.
Calculations
The following calculation procedures are run:
Calculation | Run when… | Purpose |
---|---|---|
UpdateAreas |
Data is refreshed |
Populate all the area columns in the manage allocations app with data from the LVAPP_AREAS table. This applies to the following columns:
|
WriteAll |
Before data is submitted |
Populate the LVAPP_AREAS table with data from the following area columns:
|
Validations
The validations procedure that will run all the standard allocation validations and provide a datatable output of any validations that did not pass. If there are any custom validations required, this procedure would need to be modified accordingly.
Forms
The description form is used to capture the general columns of the allocation definition. Modification will be required if the columns in the Allocations data table are different from the default supplied in the starter kit.
Publishing the manage allocations app
The manage allocations app should be published to the Calculations category.
To publish the manage allocations app:
- Select the Design module.
- In the Administration category, select Apps Publisher.
- From the list of Apps, select Manage Allocations.
- From the list of User Groups, select the user groups that will require access to the manage allocations app.
- From the list of Categories, select MTCECALC - Maintenance - Calculations.
- The app should now be accessible from the Administration category of the Tax, Close, Plan or Transfer Pricing modules.