Custom Sources and Mapping Sets in SLA
When integrating SLA with your application, custom sources and mapping sets are often required to be defined and used. These objects can then be used with account derivation rules to derive appropriate accounts.
Custom sources are implemented using functions with parameters. The parameters are defined using the standard sources provided by Oracle. Parameter to the function can also be a constant of type Char, Date or Number.
A custom source can return either Alphanumeric value or Date or a Number. When it is alphanumeric, it can either return a free text or it can return one of the segment value for accounting flex-field. It can also return a value for a lookup type or a value from value-set.
Suppose we want to derive customer name using an invoice identifier. We will define a custom source as follows:
To implement this function, the logic will be as follows:
FUNCTION get_cust_name(p_customer_trx_id NUMBER) RETURN VARCHAR2 IS BEGIN RETURN l_customer_name; END
Mapping set is a like a transformation matrix which maps input to an output. So it is a mapping between inputs and outputs. For example, we want to define following transformation:
A => Asset Account
L => Liability account
E => Expense Account
These can be defined in a mapping set. When input of ‘A’ is given to this mapping set, it will retrieve ‘Asset Account’. The inputs can be restricted to values from a value-set or from lookup codes of a lookup type but it is not mandatory. You can define any arbitrary values as input and output. Similarly, output can be restricted to a segment of accounting flex-field or a value-set but again that is not mandatory.
Mapping sets are used with account derivation rules. When used there, you need to make sure that inputs will be from the one specified in the mapping set.
When a mapping set is to be used with an account derivation rule, the output of the mapping set has to be restricted to either a flex-field segment or a value-set. This because account derivation rule output type is restricted to a flex-field, a flex-field segment or a value-set.
The underlying tables to hold the custom sources and mapping sets are described below:
XLA_SOURCES_B and XLA_SOURCES_TL: These tables hold both standard and custom sources. For custom sources, the source_type_code = ‘D’ and for standard sources, the source_type_code = ‘S’;
XLA_SOURCE_PARAMS: This table holds the parameters defined for custom sources.
XLA_MAPPING_SETS_B and XLA_MAPPING_SETS_TL: These table hold definition of mapping sets.
XLA_MAPPING_SET_VALUES: These table hold the line level details (mapping set values) of the mapping sets.
Note: Custom Sources are not downloaded as part of the ‘ Export Application Accounting Definitions’ program. Hence, to migrate the custom sources from one instance to another, you have to create them manually or write a script.