Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

The Example Transfer Price Targets App

The Solutions Framework contains an example transfer price targets app, that is always up to date with the latest changes. Use this app to create an initial Transfer Price Targets app, or to compare an existing Transfer Price Targets app to the latest example.

To start configuration of the Transfer Price Targets app:

  1. Select the Design module.
  2. In the Apps category, expand Data Collection.
  3. Expand Data Table Input.
  4. Expand Existing Apps.
  5. Click on Transfer Price Targets to open it.
  6. Click the Customize button.
  7. Click Save.

Modifying the transfer price targets app

Transfer Price Targets allows the user to define targets for transfer price adjustments for a specific item in the system. An item can be defined by up to four dimensions (ENTITIES and optionally DETAILS, SEGMENTS and CONTROLS). For example, you may use ENTITIES and DETAILS to define a product lines for each entity.

For each target, a counterparty (entity) and offset account are defined. The counterparty will receive the transfer pricing adjustment define in the item, which will be placed in the specified adjustment account.

Pre-selection

This section checks that configuration is correct for using transfer price targets:

  • System attribute ASLTPEntityRoot specifies a valid symbol
  • System attributes ASLTPCounterParties and ASLTPOffsetAccounts are set to a valid list of symbols
  • System attributes ASLTPProfitabilityD3Target, ASLTPProfitabilityD5Target, and ASLTPProfitabilityD7Target are each set to valid symbol

If configuration is correct the user is prompted for time period. This time period is used to filter the query in the main data table definition.

Variables created in pre-selection and their use:

Variable Type Use

ColIdx

OBJECT

Used to hold the index of each column in the table. A property is added for each column that matches the name of the column.

columnNameList

STRING[]

Holds the list of columns in the table, including temporary columns.

controlsSpec

STRING

Holds the specification for symbol selection for the CONTROLS dimension

counterPartyList

RANGE

Holds the list of valid counterparty symbols retrieved from system attribute ASLTPCounterParties. The list is updated to include #99 specification for each symbol.

detailsSpec

STRING

Holds the specification for symbol selection for the DETAILS dimension

duplicateIdx

NUM

Used to report the index of a duplicate target.

leftTitle

STRING

Used to set the text for the LeftTitleText function in the view.

methodList

STRING[]

Holds the list of valid transfer price methods available for selection. By default, this list contains: Cost Plus, CUP, Operation Margin and Resale Minus.

Modify this list if not all methods are being used in your system.

offsetAccountList

RANGE

Holds the list of valid offset accounts retrieved from system attribute ASLTPOffsetAccounts.

row

STRING[]

Holds the values of the row being processed.

rowIndex

NUM

The index of the row being processed.

segmentsSpec

STRING

Holds the specification for symbol selection for the SEGMENTS dimension

selectedTimeperiod

STRING

The time period selected by the user.

status

NUM

Used to return the status result of the SetDataTableCell function.

uniqueKey

STRING

Holds the unique key for the row being processed.

uniqueKeyList

STRING[]

Holds the unique key for each row and used for validation of duplicate rows.

validateDimension

OBJECT

Used to setup the validations for the columns that contain symbols.

validateDimensions

OBJECT[]

Holds the dimension validations. This is populated in post-refresh.

Selection

This form is used to prompt the user to select a time period.

Post-selection

Left title text is set up to display the selected time period in the Transfer Price Targets table view.

Data Table Definitions

The app contains a single data table definition for the APP_PROFITABILITYTARGETS table and will require modification if the columns are different from the default script. Import and export specs are specified and enabled in the view to allow the user to export targets to a comma-separated values (csv) file and import targets also import targets from a (csv) file.

The columns for DETAILS, SEGMENTS and CONTROLS use the detailsSpec, segmentsSpec and controlsSpec variables to restrict the symbol selections available.

Additional temporary columns are added to the table as follows:

  • ROWNUM – used to indicate the row number in the table, used for feedback to the user in messages
  • STATUSCOLOR – used to indicate if the row has a validation error
  • STATUS – a summary status value, can be “” / “Invalid” / “Duplicate”
  • STATUSMESSAGE – give additional details about the validation error

The additional configuration section contains a time period filter. This will limit the targets to manage to the time period selected by the user.

Table Views

A single table view is included for the data table. Modifications will be required if the columns in the data table are different from the default supplied in the example app.

Note: If you are not using one or more of the dimensions (DETAILS / SEGMENTS / CONTROLS), you can make these columns read-only in the transfer price targets app, but be sure to set the value for these columns to the target defined in the appropriate Target attribute:

  • ASLTPProfitabilityD3Target – DETAILS
  • ASLTPProfitabilityD5Target – SEGMENTS
  • ASLTPProfitabilityD7Target- CONTROLS

You can also move these columns to the far right; however, you cannot remove them as they are part of the primary key and removing them will not allow new rows to be added.

If you removed the DETAILS, SEGMENTS or CONTROSL from the underlying table these columns will not appear.

For the DETAILS, SEGMENTS and CONTROLS columns, the description should be updated to what they represent in business terms, such as Product, Cost Center or Business Unit, if they are being used. Also, the description for the related validate dimension objects should also be updated. These are set in post-refresh.

The ROWNUM, STATUSCOLOR, STATUS, STATUSMESSAGE and TIMEPERIOD columns are protected as they should not be modified by the user.

It is expected that the amounts entered for the targets are percentages entered as decimals, except for the actual target for the CUP method which is expected to be the actual unit price target. For the CUP method the min and max values are percentage variances to the target unit price.

The additional configuration section adds the left title text, configures the STATUSCOLOR column and adds the validate toolbar icon. No modifications should be required.

View Actions

View actions are included to allow the user to perform an action via the toolbar or row contenxt menu.

RowValidate

This row context action allows the user to force validation of a specific row. This is useful in cases where a row is duplicated, and then the source row is updated to force validation of the new row.

RunValidations

This toolbar context allows the user to force validation of all rows. The action performed is identical to what happens when the user clicks submit.

Dynamic Actions

Dynamic actions are included to handle when an allocation is added, deleted, or duplicated.

Add

The add procedure handles a new transfer price target being added. If any of the DETAILS, SEGMENTS or CONTROLS columns are not being used they should be set to the symbol defined by the appropriate target attribute.

The row number is set for the row and the values are validated. If the new row is valid (it is not a duplicate) the unique key list is updated with the row’s key. Otherwise, it is updated with a unique error key for processing.

Edit

The edit procedure handles when a transfer price target is modified. The row will be validated, and a new unique key will be determined, and the status updated appropriately. The unique key list will be updated according to whether the updated row is valid or not.

Delete

The delete procedure handles when a transfer price target is deleted. The unique key associated with the deleted row will be removed (set to underscore to maintain index order).

Duplicate

The row number is set for the new row and the values are validated. Since the new row was copied from another row, it will initially have the status of Duplicate.

Reset

The rest procedure handles when a transfer price target is reset. A reset is required when the row contains a value that the system does not recognize. For example, if you imported a file that contained the method “Cost-plus”, instead of “Cost Plus”, this would require a reset to be executed on the row.

The row is validated, and the unique key list is updated appropriately.

Post-Refresh

Post-refresh is executed before the table appears and any time the user performs a refresh.

The first-time post-refresh executes:

  • The column indexes are populated
  • The dimension validations are configured
    • These should be adjusted for the columns used in the table
    • These should also be adjusted so the description matches the column description configured in the view

Each time post-refresh executes a new list of unique keys is generated and each row is validated.

Import Spec – Main

This import spec is used to import transfer price targets from a csv file. The spec should only be modified if the columns in the table differ from the default script provided. Import is handled by a standard code library that allows the user to:

  1. Select the file to be imported
  2. Choose to append or replace the existing targets

Export Spec – Main

This export spec is used to export transfer price targets to a csv file. The spec should only be modified if the columns in the table differ from the default script provided.

Export is handled by a standard code library that allows the user to specify the file to be created or updated.

Calculations

Calculations are used to perform any repeated processing of the table or a row.

ValdiateRow

This calculation is called by each dynamic action, post-refresh and during validation to update the status of the row being processed. It calculates the unique key for the row and validates:

  • That the current row is not a duplicate of another row
  • That each dimension column contains a leaf symbol
  • That the method is valid

The STATUS, STATUSCOLOR, and STATUSMESSAGE columns are updated appropriately.

SetUniqueKey

This calculation is called by ValidateRow to generate the unique key for a row. The unique key consists of the values of the columns that make up the primary key separated by underscores. This procedure needs to be modified if the primary key differs from the default script.

ValidatePostImport

This calculation is executed after the user imports targets from a file. It processes the imported rows to:

  1. Set the row number
  2. Validate the row

If the table was cleared during the import, it updates the unique key list for the deleted rows.

Validations

This procedure executes ValidateRow for each row in the table. It is executed when the user:

  1. Click the Validate icon in the toolbar
  2. When the user clicks Submit, or causes a submit via refresh or closing the table

If any validation errors occur, submit is canceled and a message appears. The message allows the user to view the validation errors in a table.

Publishing the transfer price targets app

The transfer price targets app should be published to the Targets and Adjustments category.

To publish the transfer price targets app:

  1. Select the Design module.
  2. In the Administration category, select Apps Publisher.
  3. From the list of Apps, select Transfer Price Targets.
  4. From the list of User Groups, select the user groups that will require access to the transfer price targets app.
  5. From the list of Categories, select LTPRDC01 - Targets and Adjustments.
  6. The app should now be accessible from the Data Collection category of the Transfer Pricing module.

Published:

The Example Transfer Price Targets App

The Solutions Framework contains an example transfer price targets app, that is always up to date with the latest changes. Use this app to create an initial Transfer Price Targets app, or to compare an existing Transfer Price Targets app to the latest example.

To start configuration of the Transfer Price Targets app:

  1. Select the Design module.
  2. In the Apps category, expand Data Collection.
  3. Expand Data Table Input.
  4. Expand Existing Apps.
  5. Click on Transfer Price Targets to open it.
  6. Click the Customize button.
  7. Click Save.

Modifying the transfer price targets app

Transfer Price Targets allows the user to define targets for transfer price adjustments for a specific item in the system. An item can be defined by up to four dimensions (ENTITIES and optionally DETAILS, SEGMENTS and CONTROLS). For example, you may use ENTITIES and DETAILS to define a product lines for each entity.

For each target, a counterparty (entity) and offset account are defined. The counterparty will receive the transfer pricing adjustment define in the item, which will be placed in the specified adjustment account.

Pre-selection

This section checks that configuration is correct for using transfer price targets:

  • System attribute ASLTPEntityRoot specifies a valid symbol
  • System attributes ASLTPCounterParties and ASLTPOffsetAccounts are set to a valid list of symbols
  • System attributes ASLTPProfitabilityD3Target, ASLTPProfitabilityD5Target, and ASLTPProfitabilityD7Target are each set to valid symbol

If configuration is correct the user is prompted for time period. This time period is used to filter the query in the main data table definition.

Variables created in pre-selection and their use:

Variable Type Use

ColIdx

OBJECT

Used to hold the index of each column in the table. A property is added for each column that matches the name of the column.

columnNameList

STRING[]

Holds the list of columns in the table, including temporary columns.

controlsSpec

STRING

Holds the specification for symbol selection for the CONTROLS dimension

counterPartyList

RANGE

Holds the list of valid counterparty symbols retrieved from system attribute ASLTPCounterParties. The list is updated to include #99 specification for each symbol.

detailsSpec

STRING

Holds the specification for symbol selection for the DETAILS dimension

duplicateIdx

NUM

Used to report the index of a duplicate target.

leftTitle

STRING

Used to set the text for the LeftTitleText function in the view.

methodList

STRING[]

Holds the list of valid transfer price methods available for selection. By default, this list contains: Cost Plus, CUP, Operation Margin and Resale Minus.

Modify this list if not all methods are being used in your system.

offsetAccountList

RANGE

Holds the list of valid offset accounts retrieved from system attribute ASLTPOffsetAccounts.

row

STRING[]

Holds the values of the row being processed.

rowIndex

NUM

The index of the row being processed.

segmentsSpec

STRING

Holds the specification for symbol selection for the SEGMENTS dimension

selectedTimeperiod

STRING

The time period selected by the user.

status

NUM

Used to return the status result of the SetDataTableCell function.

uniqueKey

STRING

Holds the unique key for the row being processed.

uniqueKeyList

STRING[]

Holds the unique key for each row and used for validation of duplicate rows.

validateDimension

OBJECT

Used to setup the validations for the columns that contain symbols.

validateDimensions

OBJECT[]

Holds the dimension validations. This is populated in post-refresh.

Selection

This form is used to prompt the user to select a time period.

Post-selection

Left title text is set up to display the selected time period in the Transfer Price Targets table view.

Data Table Definitions

The app contains a single data table definition for the APP_PROFITABILITYTARGETS table and will require modification if the columns are different from the default script. Import and export specs are specified and enabled in the view to allow the user to export targets to a comma-separated values (csv) file and import targets also import targets from a (csv) file.

The columns for DETAILS, SEGMENTS and CONTROLS use the detailsSpec, segmentsSpec and controlsSpec variables to restrict the symbol selections available.

Additional temporary columns are added to the table as follows:

  • ROWNUM – used to indicate the row number in the table, used for feedback to the user in messages
  • STATUSCOLOR – used to indicate if the row has a validation error
  • STATUS – a summary status value, can be “” / “Invalid” / “Duplicate”
  • STATUSMESSAGE – give additional details about the validation error

The additional configuration section contains a time period filter. This will limit the targets to manage to the time period selected by the user.

Table Views

A single table view is included for the data table. Modifications will be required if the columns in the data table are different from the default supplied in the example app.

Note: If you are not using one or more of the dimensions (DETAILS / SEGMENTS / CONTROLS), you can make these columns read-only in the transfer price targets app, but be sure to set the value for these columns to the target defined in the appropriate Target attribute:

  • ASLTPProfitabilityD3Target – DETAILS
  • ASLTPProfitabilityD5Target – SEGMENTS
  • ASLTPProfitabilityD7Target- CONTROLS

You can also move these columns to the far right; however, you cannot remove them as they are part of the primary key and removing them will not allow new rows to be added.

If you removed the DETAILS, SEGMENTS or CONTROSL from the underlying table these columns will not appear.

For the DETAILS, SEGMENTS and CONTROLS columns, the description should be updated to what they represent in business terms, such as Product, Cost Center or Business Unit, if they are being used. Also, the description for the related validate dimension objects should also be updated. These are set in post-refresh.

The ROWNUM, STATUSCOLOR, STATUS, STATUSMESSAGE and TIMEPERIOD columns are protected as they should not be modified by the user.

It is expected that the amounts entered for the targets are percentages entered as decimals, except for the actual target for the CUP method which is expected to be the actual unit price target. For the CUP method the min and max values are percentage variances to the target unit price.

The additional configuration section adds the left title text, configures the STATUSCOLOR column and adds the validate toolbar icon. No modifications should be required.

View Actions

View actions are included to allow the user to perform an action via the toolbar or row contenxt menu.

RowValidate

This row context action allows the user to force validation of a specific row. This is useful in cases where a row is duplicated, and then the source row is updated to force validation of the new row.

RunValidations

This toolbar context allows the user to force validation of all rows. The action performed is identical to what happens when the user clicks submit.

Dynamic Actions

Dynamic actions are included to handle when an allocation is added, deleted, or duplicated.

Add

The add procedure handles a new transfer price target being added. If any of the DETAILS, SEGMENTS or CONTROLS columns are not being used they should be set to the symbol defined by the appropriate target attribute.

The row number is set for the row and the values are validated. If the new row is valid (it is not a duplicate) the unique key list is updated with the row’s key. Otherwise, it is updated with a unique error key for processing.

Edit

The edit procedure handles when a transfer price target is modified. The row will be validated, and a new unique key will be determined, and the status updated appropriately. The unique key list will be updated according to whether the updated row is valid or not.

Delete

The delete procedure handles when a transfer price target is deleted. The unique key associated with the deleted row will be removed (set to underscore to maintain index order).

Duplicate

The row number is set for the new row and the values are validated. Since the new row was copied from another row, it will initially have the status of Duplicate.

Reset

The rest procedure handles when a transfer price target is reset. A reset is required when the row contains a value that the system does not recognize. For example, if you imported a file that contained the method “Cost-plus”, instead of “Cost Plus”, this would require a reset to be executed on the row.

The row is validated, and the unique key list is updated appropriately.

Post-Refresh

Post-refresh is executed before the table appears and any time the user performs a refresh.

The first-time post-refresh executes:

  • The column indexes are populated
  • The dimension validations are configured
    • These should be adjusted for the columns used in the table
    • These should also be adjusted so the description matches the column description configured in the view

Each time post-refresh executes a new list of unique keys is generated and each row is validated.

Import Spec – Main

This import spec is used to import transfer price targets from a csv file. The spec should only be modified if the columns in the table differ from the default script provided. Import is handled by a standard code library that allows the user to:

  1. Select the file to be imported
  2. Choose to append or replace the existing targets

Export Spec – Main

This export spec is used to export transfer price targets to a csv file. The spec should only be modified if the columns in the table differ from the default script provided.

Export is handled by a standard code library that allows the user to specify the file to be created or updated.

Calculations

Calculations are used to perform any repeated processing of the table or a row.

ValdiateRow

This calculation is called by each dynamic action, post-refresh and during validation to update the status of the row being processed. It calculates the unique key for the row and validates:

  • That the current row is not a duplicate of another row
  • That each dimension column contains a leaf symbol
  • That the method is valid

The STATUS, STATUSCOLOR, and STATUSMESSAGE columns are updated appropriately.

SetUniqueKey

This calculation is called by ValidateRow to generate the unique key for a row. The unique key consists of the values of the columns that make up the primary key separated by underscores. This procedure needs to be modified if the primary key differs from the default script.

ValidatePostImport

This calculation is executed after the user imports targets from a file. It processes the imported rows to:

  1. Set the row number
  2. Validate the row

If the table was cleared during the import, it updates the unique key list for the deleted rows.

Validations

This procedure executes ValidateRow for each row in the table. It is executed when the user:

  1. Click the Validate icon in the toolbar
  2. When the user clicks Submit, or causes a submit via refresh or closing the table

If any validation errors occur, submit is canceled and a message appears. The message allows the user to view the validation errors in a table.

Publishing the transfer price targets app

The transfer price targets app should be published to the Targets and Adjustments category.

To publish the transfer price targets app:

  1. Select the Design module.
  2. In the Administration category, select Apps Publisher.
  3. From the list of Apps, select Transfer Price Targets.
  4. From the list of User Groups, select the user groups that will require access to the transfer price targets app.
  5. From the list of Categories, select LTPRDC01 - Targets and Adjustments.
  6. The app should now be accessible from the Data Collection category of the Transfer Pricing module.

For an optimal Community experience, Please view on Desktop