How To Create and Use Custom Sources in Accounting:
1) Create the backend function in APPS schema which will be used by the custom source.
CREATE or replace FUNCTION abc_test_function(xx in number) return number
as
begin
insert into log_test values(xx);
return xx;
end;
Note:
a) this must be a function, not a procedure
b) you can add debugging into this procedure to help you trace/correct any errors, in
this example there is an insert into log_test
c) the inputs to the function will be the sources listed in the ‘Parameters’ section
below
d) the output will be the single value you want the custom source to return
e) you may include any normal programming logic within the function code such as
if statements, case statements, loops etc
2) Create the custom source, as shown below:
3) Create an ADR that uses the custom source, as shown below:
4) On the JLD screen, decide which JLT will use this ADR to derive the account.
NOTE: if the ADR is not visible in the screen above, that means the event class
INVOICES has not been assigned the ‘Transaction Distribution GL Account’ source
which the Custom source uses. All sources used in the ADR must be assigned to the
event class.
BUG 8243759 - CANNOT ADD NEW CUSTOM CODE TO XLA SOURCES FORM
XLAABDSS
This is response from development on the issue:
The Customer does not need to add a newly created custom source in the
"Sources" form. The "Sources" form is only for Oracle-seeded sources, not
Customer-seeded custom sources
As per the Customer update: "problem is that once I create a custom source I
should be able to use it in the ADR. So to use it in the ADR I first need to
add it to the list of sources right? "
.
The answer to this question is NO. Custom sources are never added to the
standard sources screen, they only exist in the backend database and can be
used directly within an ADR. After it has been added, please re-validate the
AAD with "uncompiled=no" and run Create Accounting.