2 Replies Latest reply: Oct 28, 2012 10:21 PM by siakhooi-2029222 RSS

    override auto accounting result

      we have auto accounting rule to determine the revenue account for each invoice line.

      now we have new type of sales that we would like to have different way to determine the revenue account. we have brainstorm on other options in auto accounting, such as standard line, transaction type, site, or sales person, but all of them have their own pro and con that we are afraid to choose either of them.

      any other way like, PLSQL API or workflow that we can customized, that we can simply override the auto accounting result for some criteria?
        • 1. Re: override auto accounting result
          Kevin Zhang
          I know this is an old thread ... I am facing the same challenge as below:

          EBS 11.5.10

          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
               AFTER INSERT
          ON ra_interface_distributions_all
          FOR EACH ROW

               PRAGMA autonomous_transaction;

               dbms_output.put_line('Start KE_ARCHIVE_RIDA');

               INSERT INTO rida_archive
          VALUES (
          .... --- I have skipped most of columns


               dbms_output.put_line('End KE_ARCHIVE_RIDA');
               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


          • 2. Re: override auto accounting result
            is there any API that we can call, and get the result of the autoaccounting?

            or, is there any workflow that we can customize?