December 20, 2010

Caution! - Custom Sources

Originally posted 30 Augustus 2009 on oraclecs.com

Sources are created by registering your Transaction Objects and clicking the Create and Assign Sources button in the Accounting Event Class Options window (see this article). We call these Standard Sources.

Next to that you can also create Custom Sources under Subledger Accounting Setups > Accounting Methods Builder > Sources > Custom Sources

As the name implies, these are Sources which aren’t standard, so which aren’t inherited directly from the Transaction Objects.

When you define a Custom Source, you enter a PL/SQL function and optionally one or more input parameters. The Custom Source will then be available within the list of Standard Sources. So you can use the Custom Source wherever you like and it will return the output from your PL/SQL function.
Incredibly powerful, isn’t it? Yes, but power often also has a sharp edge:

Let’s say my Transaction Object contains a column Contract Type and a column Product Number, while the business rule is that the combination of contract type and product number determines the product code used for accounting.
To derive this product code value, I make use of a Mapping Set. So I need a combination of two Sources (contract type and product number) to serve as input for my Mapping Set.

The wrong approach:
I can define a Custom Source in which I use the two input parameters, and my PL/SQL function will then return the combination of both Sources into a single string. This Custom Source serves as input for my Mapping Set to derive the product code.
What’s bad about this solution is that when I run Create Accounting, my PL/SQL will be executed for every single accounting entry line that’s generated. This negatively impacts performance.

The right approach:
Instead I should add a separate column to my Transaction Object view in which I join Contract Type and Product Number into a single string. This additional column (i.e. Source) I can then use as direct input for my Mapping Set. The Accounting Program will fetch the values from the Transaction Objects in bulk, which is why this solution outperforms the Custom Sources approach.

Conclusion:
Never use a Custom Source when implementing FAH (Financials Accounting Hub), as you can simply alter your Transaction Objects to directly include any values you need.
When you’re a regular SLA (Subledger Accounting) customer though, you are not allowed to make changes to the seeded Transaction Objects. Custom Source functionality can then be used in case the seeded Standard Sources are insufficient.

Tip: If you can't find the Custom Source, then the first thing to check is if the Standard Source(s) which are used as input parameter(s) in your Custom Source belong to the same Event Class as the Event Class under which you are trying to use the Custom Source.

Note 790945.1 [Frequently Asked Questions about Custom Sources] contains further information and examples on Custom Sources. But remember: as a FAH customer, you shouldn’t even use Custom Sources.

0 reacties:

Post a Comment

Related Posts Plugin for WordPress, Blogger...