Sunday, December 16, 2007

AutoInvoice splitting one order into two invoices, or AutoInvoice generating one invoice for multiple orders:
AutoInvoice uses grouping rules to group invoices, credit memos and debit memos. Grouping rules contain various transaction attributes (columns in RA_INTERFACE_LINES_ALL table) that must be identical for the same transaction.
There are 2 kinds of attributes: mandatory and optional. You can only add or drop optional attributes.
Check the grouping rule that you are using. You may have defined an optional attribute that is different for two lines of the same invoice, and is, therefore, causing a second invoice to be generated. Check both optional and mandatory attributes of the two lines.
If AutoInvoice is generating one invoice for multiple orders, then you may not have defined sales order as an optional attribute.
How AutoInvoice grouping works

Setting for the 'Log file message level':
For day to day business needs and to improve performance, set this to 0. If AutoInvoice errors out, set the message level to 3 to get detail messages in the log to help debug the problem.

Message Level 0 gives the following entries in the log file:
* Product Version
* Program Name
* AutoInvoice Start Time
* AutoInvoice Concurrent Request Arguments
* Error and Warning Messages
* AutoInvoice End Time
* AutoInvoice Logical Steps

Message Level 1 gives you all of the above entries plus:
* Time- Stamped function labels

Message Level 2 gives you all of the above entries plus:
* Sizes of Allocated Arrays
* Dynamic SQL Statements
* Number of Rows Updated, Inserted and Deleted

Message Level 3 gives you all of the above entries plus:
* Method IV SQL Array Values

If the errors are regarding Autoaccounting, message level can be set to 10 or above to get more detailed Autoaccounting messages in the log.

How to apply a credit memo (from a legacy system) against an invoice using AutoInvoice: To link the credit to an invoice there are 2 options:
1) Populate REFERENCE_LINE_ID on RA_INTERFACE_LINES_ALL with the CUSTOMER_TRX_LINE_ID of the invoice. or
2) Populate REFERENCE_LINE_ATTRIBUTE1 to 15 with the INTERFACE_LINE_ATTRIBUTE1 to 15 of the invoice.

You also need to populate REFERENCE_LINE_CONTEXT with INTERFACE_LINE_CONTEXT of the invoice. INTERFACE_LINE_CONTEXT and INTERFACE_LINE_ATTRIBUTE1 to 15 are stored in RA_CUSTOMER_TRX_LINES_ALL.

To create an on-account credit (i.e. not linked to an invoice) do not populate REFERENCE_LINE_ID, REFERENCE_LINE_ATTRIBUTES or REFERENCE_LINE_CONTEXT.

Can Adjustments be imported through AutoInvoice?
No. Only Invoices, Credit Memos, Debit Memos, and On-account Credits can be imported through AutoInvoice. The adjustments can be imported by using Adjustment API's. This API allows users to create, approve, update, and reverse adjustments for invoices using simple calls to PL/SQL functions.

How is the Tax code derived in AutoInvoice?
AutoInvoice first looks at the transaction type setup (Menu: Setup>Transactions>Transaction Types) and the TAX_EXEMPT_FLAG column in RA_INTERFACE_LINES_ALL. If the 'Calculate Tax' box is checked on the transaction type OR the TAX_EXEMPT_FLAG column is 'R'(for Required), it tries to derive the Tax code.

To get the tax code, AutoInvoice looks at the following places in the following order, stopping at the first place where it finds a tax code:
- Ship-to site
- Bill-to site
- Customer
- Item

Can changes be made to existing Invoices via AutoInvoice ?
No. You can only create credit memos and apply them to existing invoices if they are still open (or if Allow Overapplication is checked for that Transaction Type). You cannot update existing invoices.
Once a transaction in AR has any activity against it you cannot update it manually. Activity is defined as cash applied, credit memo applied, adjustment, posting to GL and, printing.
How To Update An Already Created Invoice Through AutoInvoice Program

What should be verified when I get the 'Please Correct Revenue (or Receivable or Freight or Tax) Account Assignment'?
Autoaccounting is used to determine the accounts when the distribution table is not populated. When AutoInvoice gives this error, it generally gives the account with the missing segment(s).

Menu: Setup>Transactions>Autoaccounting
Query the account mentioned in the above error and note the setup for that missing segment.

If it is based on:
- Transaction Type - Menu: Setup>Transaction>Transaction Types, and verify that all accounts are populated.
- Salesperson - Menu: Setup>Transactions>Salespersons, and verify that all accounts are populated.
- Standard Lines - For an Inventory Item navigate to Menu: Setup>Transactions>Items>Inventory items, and verify that the 'Sales Account' is populated in the 'Invoicing' alternate region. For a Memo Line, navigate to Setup =>Transactions =>Memo Lines, and make sure that 'Revenue Account' is populated.
- Taxes - Menu: Setup>Tax>Codes and verify that account is populated in 'Tax' column under the 'Accounting' alternate region. Additionally the following can be checked: Setup of Cross Validation Rules. Run Cross validation Listing Report in GL to identify the cross validation rule stopping the import of this line.


Once the transactions have been imported successfully into AR using AutoInvoice, how can they be purged from the interface tables?
If the system option 'Purge Interface Tables' is set to Yes, data that has been validated and successfully imported in AR will be purged automatically. If the purge option is set to No, you can submit the AutoInvoice Purge Program from the Run AutoInvoice form to purge the interface tables. This program will only purge rows that have been processed successfully.

Navigation to check the 'Purge Interface Tables' option:
- Menu: Setup>System>System Options
- Alternate region 'Trans and customers'
- 'Purge Interface Tables' checkbox

Navigation to submit the AutoInvoice purge program:
- Menu: Interface>AutoInvoice
- Request name: AutoInvoice Purge Program

How often can you run AutoInvoice?
AutoInvoice can be run as many times as you like. It can run at anytime of the day, month, year. You need to set the rules for the running of this process based on your company's business needs. You can also schedule to run AutoInvoice automatically at regular intervals.

In multi-org environment, can I run AutoInvoice simultaneously?
Yes, you may, there are no incompatibilities setup for AutoInvoice against itself.
You can setup an incompatibility as follows:
Under System Administrator responsibility,
Menu: Define>Concurrent>Program
Click on Incompatibilities
You will see the RAXMTR to be incompatible with itself and thus not allow AutoInvoice to be run simultaneously.
Also when you have only one org, AutoInvoice can be run in parallel for different batch sources.

How do I check the Set Up for AutoInvoice?
1) Note:226429.1 /Note:204790.1
The Receivables Set Up Details Report (ARSSETUP.rdf) identifies all critical Set Up steps done in Receivable before performing an important process like running AutoInvoice. All the vital information are be available in one place by running this report instead of searching for it in various places.
2) Note:202260.1 This pl/sql test will provide detailed data on the Oracle Receivables set up. The output will be spooled to an HTML file.
References AutoInvoice Setup White Paper
Oracle Support Diagnostic Release Announcement


How can I prevent partial transactions from being created, when program error occurs.
To prevent partial transaction from being created when program error occurs, apply the following patches: Patch 2127349 for Release 11 and Release 11i.

How can the errors in the interface tables lines be corrected?
The errors in the interface tables can be corrected with the help of the AutoInvoice Validation Report and the AutoInvoice Errors window which displays records that failed AutoInvoice validation. Depending on the error you may need to make changes either in Receivables, or to your feeder program or to the imported records in the interface tables.

Menu: Interfaces>Control>AutoInvoice>Interface Lines

Interface Lines Window - This window lets you see all of the interface lines that have been processed but rejected by AutoInvoice. You can view and edit data in this window.

Menu: Interfaces>Control>AutoInvoice>Interface Exceptions

Interface Errors Window - This window lets you see all of the errors generated by AutoInvoice. This window is read-only, but you can drill down to view errors in more detail, and modify data in these windows.

How does the GL date get derived?
For invoices without Rules: AutoInvoice first uses the GL date in the interface table (RA_INTERFACE_LINES_ALL), if one exists.

If one does not exist then it is derived as follows:
If the Derive Date box is checked for your batch source (Menu: Setup>Transactions>Sources, query your batch source, alternate region Accounting), AutoInvoice first uses the ship date in the interface table. If the ship date does not exist, AutoInvoice uses the sales order date. If the sales order date does not exist, AutoInvoice uses the date entered in the Submit Request window when AutoInvoice was run.

If the Derive Date box is not checked for your batch source, AutoInvoice uses the date entered in the Submit Request window when AutoInvoice was run.

For Invoices with Rules: AutoInvoice first uses the GL date in the interface table (RA_INTERFACE_LINES_ALL), if one exists.

If the Invoicing Rule is 'Bill In Advance', AutoInvoice uses the Rule Start Date for the GL date.

If the Invoicing Rule is 'Bill in Arrears' and the invoice line has an accounting rule of type 'Accounting, Fixed Duration' and a period of 'Specific Date', AutoInvoice computes an end date using the earliest accounting rule date.

For all other Accounting rules, AutoInvoice computes an ending date for each invoice line, and then takes the earliest date of these lines and uses it as the GL date of the invoice.

If your invoice does not use a fixed rule accounting duration and the rule start date is not provided in the interface table, GL date is derived as follows:

If the Derive Date box is checked in batch source options, AutoInvoice first uses the ship date. If the ship date does not exist, AutoInvoice uses the sales order date. If the sales order date does not exist, AutoInvoice uses the date entered in the Submit Request window.

If the Derive Date box is not checked, AutoInvoice uses the date entered in the Submit Request window.
References: AUTOINVOICE - Date Derivation
AutoInvoice Date Derivation White Paper


AutoInvoice is taking too long to run. How can I improve its performance? Although there are many reasons which can contribute towards poor AutoInvoice performance, the most common ones are as follows:

a) Indexes have not been defined for the Line Transaction Flexfield on RA_INTERACE_LINES_ALL. See Notes under Reference for details.
b) Old application or AutoInvoice code: Make sure you are on the latest patchset and have applied the latest performance patch for AutoInvoice, if any, for your application release.
c) Custom indexes or triggers: If any custom indexes or triggers have been defined, drop them to see if performance improves.
d) Missing or disabled indexes or triggers on AR tables: Check the Technical Reference Manual to verify you have all the indexes and triggers on the AR tables.
e) Run Gather Schema Statistics from the SYSADMIN responsibility

OPTIMIZING AND SCHEDULING AUTOINVOICE

The Import program (RAXTRX) does not get spawned when I run AutoInvoice. What could be the reason?
In this case the Master Program (RAXMTR) may complete without error but will not spawn the Import Program (RAXTRX). The log file for RAXMTR will show the 'No data Found' message.

AutoInvoice executes a statement similar to the following to select records for importing:

SELECT COUNT(*)
FROM RA_INTERFACE_LINES
WHERE NVL(INTERFACE_STATUS, '~') != 'P'
AND (REQUEST_ID IS NULL)
AND BATCH_SOURCE_NAME = 'POS Batches'
AND LINK_TO_LINE_ATTRIBUTE1 IS NULL
AND LINK_TO_LINE_ATTRIBUTE2 IS NULL . .

AND LINK_TO_LINE_ATTRIBUTE15 IS NULL

In the above example: 'POS Batches' is the Batch Source name. In your case, there may be no records returned by the above statement, and hence the 'NO Data Found' message. You can verify if there are records in the interface table (RA_INTERFACE_LINES_ALL) to be imported by running the following statement:

Select BATCH_SOURCE_NAME, INTERFACE_STATUS, REQUEST_ID
from RA_INTERFACE_LINES_ALL
where BATCH_SOURCE_NAME='&batch_source_name';

The INTERFACE_STATUS should not be P and the REQUEST_ID column should be NULL.

Moreover, also verify if the necessary attributes (ATTRIBUTE1-ATTRIBUTE15) are NULL.

If you have interfaced orders from Order Entry, the records may not have been populated into the interface table. Check the log of the Receivables Interface process for any error messages even if the process completed successfully.

How to get closed invoices into AR using AI process?
The AutoInvoice program will only let you process open invoices. It cannot be used to bring in invoices for historical purposes.

How to allow duplicate value in INTERFACE_LINE_ATTRIBUTE1 in AutoInvoice?
Line Transaction Flexfield has an associated unique Context field. The combination of the segments plus Context has to be unique.
AutoInvoice Setup White Paper
Line Transaction Flexfields


How do you default the batch source on the AutoInvoice submission screen?
- Go to Concurrent -> Program -> Define
- Pull up RAXMTR
- Click on Parameters
- Go to Batch Source ID
- Change the default type to Constant
- Change the Default value to the NAME (not id) of the value you want "Order Entry" (it is case sensitive).
- Save.

How do you get the AutoInvoice Exceptions forms to appear on the menu?
You will need to add the option and the function to the menu if you do not have them. How do we get the new Autoinvoice Exceptions forms to appear on the menu?


What is the difference between the attribute_category and the header_attribute_category columns are on the ra_interface_lines_all table.
They are for 2 different descriptive flexfields.
What is the difference between the attribute_category and the header_attribute_category


How to import gapless transaction numbers with AutoInvoice?
Oracle does not gaurantee 100% gapless transaction numbering even with the cache on the sequence turned off. You can make the invoice numbering follow your document sequencing and this will bring you closer to 100% gapless numbering.
Gapless Invoice Numbering is Required
How To Make Document Transaction Numbering Gapless?

How to run an example AutoInvoice Import?
Check available information in Setup & Usage for Autoinvoice
RAXTRX: How To Import An Invoice And Tax Into Oracle
Quick Steps to run an example AutoInvoice Import

References:
AutoInvoice Setup and Usage Instructions
AutoInvoice Current Issues
AutoInvoice Troubleshooting Guide