This content has been marked as final. Show 2 replies
I know this is an old thread ... I am facing the same challenge as below:
AR Auto Accouting
Our GL acccount have 7 segments.
For Type "Receivable" and "Revenue" auto accounting, we like to change the logic for *2nd segment* (we call it Division). We need look at descriptive flexfeld of item cateogry value of item to determine value of 2nd segment. Since the logic is so complex, we can't ue AutoAccouting configuration for 2nd segment. However, for the rest of segments (1st, 3rd, 4th, 5th, 6th, 7th), we still want use AutoAccounting configuration we have done (e.g. 4th segment is a constant).
Anyone can give me some suggestion how to achieve this?
I always find out the following fact. Can someone confirm it?
In 11.5.10, when "AutoInvoice Master Program" run with AutoAccouting is configured, the program only inserts data to ra_interface_lines_all table and it DID NOT insert data to RA_INTERFACE_DISTRIBUTIONS_ALL table at all. Instead, the AutoInvoice program is directly written data to base table RA_CUST_TRX_LINE_GL_DIST_ALL.
Below is my method to approve about statement (AutoInvoice program doesn't use RA_INTERFACE_DISTRIBUTIONS_ALL table when AutAccouting is enabled)
-- create a temp table
CREATE TABLE rida_archive AS SELECT * FROM ra_interface_distributions_all WHERE 1 = 0;
-- trigger to do the archive
CREATE OR REPLACE TRIGGER KE_ARCHIVE_RIDA
FOR EACH ROW
INSERT INTO rida_archive
.... --- I have skipped most of columns
WHEN OTHERS THEN
dbms_output.put_line(' Error Code: '||SQLCODE||'; Error Msg: '||SQLERRM);
To test it out:
1. Create a sales order and ship conform the line and make sure line is invoice interfaced
2. Confirm line appears in ra_interface_lines_all
3. Run AutoInvoice Master Program
4. The invoice successfully created
5. Select count(1) from rida_archive and it returns 0 row