Professional Documents
Culture Documents
JQAutoInvoice Oracle AR Oracle Support Doc Setup For Release 12
JQAutoInvoice Oracle AR Oracle Support Doc Setup For Release 12
JQAutoInvoice Oracle AR Oracle Support Doc Setup For Release 12
In this Document
Abstract
History
Details
1. Define Common Accounts Receivable Configuration
2. Manage Receivables Descriptive Flexfields
3. Manage Receivables Profile Options
4. Manage Transaction Types
5. Manage AutoAccounting Rules
6. Manage AutoInvoice Line Ordering Rules
7. Manage AutoInvoice Grouping Rules
8. Manage Receivables Payment Terms
9. Manage Transaction Sources
10. Manage Receipt Classes and Methods
11. Manage Receivables Customer Profile Classes
12. Create Customer
13. Manage Receivables System Options
14. Manage Receivables Accounting Periods
15. Manage Remit-To Address
16. Populate Interface table
a. Insert statement for an INVOICE
b. Insert statement for an APPLIED CREDIT MEMO
c. Insert statement for an ON-ACCOUNT CREDIT MEMO
d. Insert statement for an INVOICE and CREDIT MEMO WITH MANUAL TAX
LINES
e. Insert statement for an INVOICE WITH RULES
f. Insert statement for an INVOICE WITH GL DISTRIBUTIONS
g. Insert statement for an INVOICE WITH SALESCREDITS
h. Insert statement for an INVOICE WITH HEADER LEVEL FREIGHT
i. Insert statement for an INVOICE WITH FREIGHT AS AN INVENTORY ITEM
17. Testing AutoInvoice: AutoInvoice Import Process
18. Purging the Interface Table After Import
19. Scheduling AutoInvoice
20. Review Invoice Created by AutoInvoice
21. Troubleshooting & Tips
22. Still Have Questions?
References
APPLIES TO:
ABSTRACT
The objective of this document is to provide step by step instructions on the setups
required in Receivables (AR) in order for you to create simple transactions. Using a SQL
script to insert data into the interface table, AutoInvoice is then run to create the
invoice in the core AR tables. Review the section Populate Interface Table below for the
various example scripts provided.
This document lists the required setups in proper sequence, provides a sample
script, details on how to run and test your script, and how to verify the transactions
were created in Receivables.
Please provide your input, ideas, gaps and suggestions so we can further enhance this
note by posting to the community thread for Learn What Setups Are Required To Setup
Receivables To Use A Simple Script To Import Transactions Via AutoInvoice Release 12.
HISTORY
Creation Date: 22-Mar-2010
Update Date: 16-Mar-2017
DETAILS
NOTE: In the images below and/or the attached document, user details / company name /
address / email / telephone number represent a fictitious sample (based upon made up data
used in the Oracle Demo Vision instance). Any similarity to actual persons, living or dead, is
purely coincidental and not intended in any manner.
Common Accounts configuration pertains to the Accounting Flexfield setup. This is done
in the General Ledger (GL) application. The assumption of this case study is that you
have already defined your accounting flexfield segments, and can create and complete
manual transactions using the Transaction Workbench.
If you need more information on how to set up your Accounting Flexfield, refer to
the Oracle General Ledger Implementation Guide, page 1-33.
Oracle Receivables uses the transaction flexfields to uniquely identify each transaction
line that is imported though AutoInvoice.
For this case study, you need to setup a Line Transaction Flexfield as shown below.
Click on the segments button to create the following rows. The values in the
field Column are not shown completely, they are INTERFACE_LINE_ATTRIBUTE1 and
INTERFACE_LINE_ATTRIBUTE2 respectively.
The data you insert into the interface table will be associated to a particular transaction
type.
Create an invoice transaction type which will be used when we insert data into the
Interface table.
Note: If you also want to run a test case to import a Credit memo, create a Credit
Memo transaction type as shown below, otherwise you don't need to create a Credit
Memo transaction type.
To see more details on how to create new transaction types, please refer to Note
1067797.1, Setting Up Transaction Types In Receivables.
Please note that if you want to use the AutoAccounting functionality (next task), and
some of the segments of the Account are sourced from the transaction type, then you
must define GL accounts in the Accounts tab.
AutoAccounting enables you to create default accounts for revenue, receivable, freight,
tax, unearned revenue, unbilled receivable, late charges, bills receivables accounts, and
AutoInvoice clearing (suspense) accounts.
In the following screen, the source for the third segment is 'Transaction Types'. When
the default accounting is generated for the Receivable account, the accounting flexfield
will pull the third segment from the Receivables account defined for the transaction
type. If we cross-reference this to the screenshot from the previous task, the value for
the third segment is 1210, coming from 01-000-1210-0000-000 defined for Receivables
account.
During AutoInvoice, you are interfacing data with the intention of creating complete
transactions automatically. Hence, you are advised to complete the setup for
AutoAccounting so that AutoInvoice can determine the GL accounts to use for your
interfaced transactions, and process them completely without errors and without the
need for manual intervention.
To see how to manage and setup AutoAccounting, please refer to Note 1069052.1,
Setting Up AutoAccounting Rules In Receivables.
If you want the data in your interface table to be created in a particular sort order,
define Line Ordering Rules.
The following screenshot shows a Line Ordering Rule, that references the same fields
we used in the Line transaction flexfield defined in Task 2 above.
To see how to manage and setup AutoInvoice Line Ordering Rules, please refer to Note
1067965.1, How to Manage Line Ordering When Using Autoinvoice To Import.
Grouping rules specify attributes that must be identical for lines to be created as one
transaction. Grouping rules always include the mandatory attributes, and to this is
added optional attributes that you define in your grouping rule.
The following screenshot shows a Grouping Rule that uses the Line Ordering Rule
defined in Task 6 above.
To see how to manage and setup AutoInvoice Grouping Rules, please refer to Note
1067993.1, How To Use Grouping Rules With AutoInvoice.
Payment terms let you define the due date to be calculated for transactions. When you
interface data, it is mandatory to provide either a TERM_ID or a TERM_NAME in the
RA_INTERFACE_LINES_ALL table (depending on how you have set up your transaction
batch source). Although there is a defaulting mechanism for payment term when
entering transactions manually in the form, this is defaulting is not available during
AutoInvoice, because it would significantly slow down the performance of the process.
The following screenshot shows a Payment term we will use in our interface data.
To see how to manage and setup Payment Terms, please refer to Note 1069049.1, How
To Define Transaction Payment Terms In Receivables.
Batch sources define default information such as transaction type and automatic
numbering. There are two types available: Manual and Imported. AutoInvoice requires
a batch of type Imported.
The following screenshot shows a Transaction source we will use to interface data via
AutoInvoice. Highlighted below is the transaction type we created earlier, here we are
associating it to this Imported Batch Source.
Following screenshots show the sub-tab for the Transaction Sources form:
The AutoInvoice Options tab highlights the Grouping rule created earlier. The setup
indicates this batch will group data as specified in this grouping rule.
The following screenshots show the rest of the sub-tabs of this form,
including Customer, Accounting, Salescredit and other information. You need to define
whether the data you will interface provides the Value or the ID so that AutoInvoice can
validate the data.
To see how to manage and setup Transaction Sources, please refer to Note 1068008.1,
Creating Transaction Sources Used For AutoInvoice.
To default a payment method to the transactions you interface via AutoInvoice, you
need to define a Receipt Class and Method for your transaction to use.
To see how to manage and setup Receipt Classes and Methods, please refer to Note
1071284.1, Setting Up Receipt Class And Method For AutoInvoice.
11. Manage Receivables Customer Profile Classes
If necessary, you can define different customer profile classes to categorize your
customers. You can associate Customer Profile classes to customer records you create
later. By using a profile class you default certain attributes/fields into the customer
records to make customer maintenance more efficient.
The following screenshot defines a new customer profile class, to which we associate
the Payment Term from Task 8 and the grouping rule from Task 7.
To see how to manage and setup Customer Profile Classes, please refer to Note
1071218.1, How To Define Customer Profile Classes For AutoInvoice.
Create customer record to use for interface data, at this point we reference various
setup data we created earlier.
The following screenshot shows the various sub-tabs at the ACCOUNT profile level.
On the Account Profile tab, we associate to this customer record the customer profile
created in Task 11, the payment term from Task 8 and the Grouping Rule from Task
7 created earlier.
Payment Details tab: here we associate to this customer record the Receipt method
created in Task 10.
We have defined the Receipt method at the ACCOUNT level profile. If this customer has
only one site, or all the Sites of this customer will use the same Receipt method, there
is no need to set up Payment Details at the Site Level.
However, if there will be multiple sites for this account, and each site that uses a
Receipt method different from that set at the ACCOUNT level, then you will need to set
up the Payment Details at the SITE level as shown below.
To see how to Create Customer Records, please refer to Note 1069338.1 How To
Define Customers For AutoInvoice.
The settings in System Options that impact AutoInvoice are in the Trans and Customers
tab. The following screenshot shows recommended settings for fields in the
'AutoInvoice' Section. Also highlighted is the Grouping rule we defined earlier.
Log file message level = 10 provides the most detailed debug messages, and is useful
when you are debugging or troubleshooting.
To see how to Manage Receivable System Options, please refer to Note 1068052.1,
How To Manage Receivables System Options For AutoInvoice.
Additional information on the Tuning Segments, refer to the Oracle Receivables User's
Guide, page 2-210.
Ensure that the GL_DATE value you provide in the next task is within an open period.
To see how to Manage Receivable Accounting Periods, please refer to Note 1069057.1,
How To Manage Receivables Accounting Periods.
Define a Remit-To Address so that customers know where to send payment for their
invoices.
To see how to create Remit-to addresses, please refer to Note 1101666.1, How to
Setup a Remit-To Address in Release 12 Oracle Receivables
At this point we have completed the bare minimum setup required to enable us to
insert data into the interface table and have it processed by AutoInvoice to create a
transaction in the core AR tables.
The following section gives you sample scripts to populate the table for various
scenarios.
Note:
For a detailed discussion of the fields in RA_INTERFACE_LINES_ALL, please review Note
1195997.1, Description and Usage of Fields in RA_INTERFACE_LINES Table.
COMMIT;
For some fields, we pass constant values and for other fields we need to provide values that tie
in with the setup we created in Tasks 1 - 14 above. The following section explains how to
determine the ID values created during the setup.
Use the values = 'TIP SAMPLE INVOICE 1' and 'TIP SAMPLE INVOICE 1'
AMOUNT - this field contains the value of your transaction; pass in a constant. This
value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
BATCH_SOURCE_NAME - the value you specify here identifies the transaction batch
source to be used by AutoInvoice when interfacing this transaction. In Task 9, we
created the Batch Source 'TIP BATCH SOURCE'.
CURRENCY_CODE - Indicate the currency code of the transaction, for our test case
we will use 'USD'.
GL_DATE - the value you specify here will be used by AutoInvoice as the GL_DATE of
your transaction. Typically the period in which this GL_DATE value falls should be an
open period.
TERM_ID - identifies the term ID associated with the setup created in Task 8.
The set of books id is associated to your Operating Unit. If you know your operating
unit ID, you can run the following:
ORG_ID - indicates the ID of the Operating Unit against which this transaction is
created.
OPTION 1:
If the Invoice you are crediting was also created via AutoInvoice, then you can populate
REFERENCE_LINE_CONTEXT and REFERENCE_LINE_ATTRIBUTE* fields with values that would
uniquely identify the invoice. Otherwise, please review Option 2 below.
The following section explains how to determine the ID values created during the setup. Many
of the fields are the same as the insert statement used for the Invoice. We will focus on the
things that changed.
Use the values = 'TIP SAMPLE CM 1' and 'TIP SAMPLE CM 1'
REFERENCE_LINE_CONTEXT
REFERENCE_LINE_ATTRIBUTE1
REFERENCE_LINE_ATTRIBUTE2
These fields associate this credit memo to an invoice, the values in these fields need to match
the INTERFACE_LINE* fields of the invoice, because this is how you are telling Autoinvoice
which Invoice you want to apply this Credit memo to.
AMOUNT - this field contains the value of your credit memo; pass in a constant. This
value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
TERM_ID
It is important to understand that a Credit Memo does not have a payment term, and this field
should be left NULL
OPTION 2:
If the Invoice you are crediting was not created via AutoInvoice, then it would not have values
in INTERFACE_LINE_CONTEXT + INTERFACE_LINE_ATTRIBUTE* fields, in this case you cannot
use these values to identify the invoice you want this credit memo to credit. Instead you can
use REFERENCE_LINE_ID.
The following section explains how to determine the ID values created during the setup. Many
of the fields are the same as the insert statement for Option 1 above, we will focus on the
difference.
The following section explains how to determine the ID values created during the setup. Many
of the fields are the same as for the insert for Invoice above, we will focus on the differences:
Use the values = 'TIP SAMPLE ON-ACCT CM 1' and 'TIP SAMPLE ON-ACCT CM 1'
AMOUNT - this field contains the value of your credit memo; pass in a constant. This
value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
It is important to understand that a Credit Memo does not have a payment term, and this field
should be left NULL
d. Insert statement for an INVOICE and CREDIT MEMO WITH MANUAL TAX LINES
For a sample script on how to pass interface data for an Invoice including manual tax Lines with
the intention of bypassing the E-Business Tax engine, please review Note 731149.1, R12 How
To Bring In (and Troubleshoot) Manual Tax Lines Through Autoinvoice and E-Business Tax
(EBTax).
e. Insert statement for an INVOICE WITH RULES
To create invoices with rules, aside from the setup steps detailed above, an additional setup
step is required to define the Accounting Rule.
The following script will create an invoice using the TIP RULE defined above.
For some fields, we pass constant values and for other fields we need to provide values that tie
in with the setup we created in Tasks 1 - 14 above. The following section explains how to
determine the ID values created during the setup.
INTERFACE_LINE_CONTEXT - identifies the Transaction Flexfield used by the
interface data; this helps AutoInvoice understand what data is being passed in the
interface table's fields. The value here ties in with the setup created in Task 2, where we
created the Line Transaction Flexfield 'TIP'.
Use the values = 'TIP RULE INVOICE 1' and 'TIP RULE INVOICE SAMPLE'
AMOUNT - this field contains the value of your transaction; pass in a constant. This
value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
BATCH_SOURCE_NAME - the value you specify here identifies the transaction batch
source to be used by AutoInvoice when interfacing this transaction. In Task 9, we
created the Batch Source 'TIP BATCH SOURCE'.
CONVERSION_TYPE - Specify the conversion rate type, for our test case we will use
'User'.
CURRENCY_CODE - Indicate the currency code of the transaction, for our test case
we will use 'USD'.
GL_DATE - the value you specify here will be used by AutoInvoice as the GL_DATE of
your transaction. Typically the period in which this GL_DATE value falls should be an
open period.
The set of books id is associated to your Operating Unit. If you know your operating
unit ID, you can run the following:
ORG_ID - indicates the ID of the Operating Unit against which this transaction is
created.
ACCOUNTING_RULE_DURATION - when the rule you use has variable duration, you
need to provide a value in this field. However, in our case, the rule has a fixed duration
of 3 periods, so we leave this null.
Notes:
If you have setup AutoAccounting and would like to use the GL accounts derived by your
setup, you do not have to pass in data in RA_INTERFACE_DISTRIBUTIONS_ALL. The GL
distributions and GL accounts will be automatically created for your transactions.
When passing GL distributions, AutoAccounting will be used to derive the GL accounts of
all accounting distributions that are not explicitly provided in
RA_INTERFACE_DISTRIBUTIONS_ALL.
In the following script, we interface an Invoice and pass in distributions for the Revenue and
Receivable account. The setup in this instance will create Rounding rows, and since we do not
explicitly pass in that distribution, it will be created using the AutoAccounting setup.
For more on this refer to Note 1228525.1 How to Import and Troubleshoot Distributions in
AutoInvoice Using RA_INTERFACE_DISTRIBUTIONS_ALL
For an explanation of the fields/values used for the insert statement, please review the first
example script above, the values used are similar.
The following provides an explanation of the fields/values used for the 2nd and 3rd insert
statements:
ACCOUNT_CLASS - there are 7 valid values: REV, FREIGHT, TAX, REC, UNBILL (for
Arrears), UNEARN (for Advance), CHARGES
You may pass values for any of these account classes.
AMOUNT - this field contains the value associated to the GL distribution you are
creating; pass in a constant. For the REC account, this should be the sum of all the
LINE, TAX and FREIGHT amounts in RA_INTERFACE_LINES_ALL for this particular
transaction.
Use the values = 'TIP DIST INVOICE 1' and 'TIP DIST INVOICE SAMPLE'
ORG_ID - indicates the ID of the Operating Unit against which this transaction is
created.
If you do not know your ORG_ID or SET_OF_BOOKS_ID value, you can use General
Setup diagnostics (e.g. in R 12.0.6 this is Note 732193.1). This will show the value of
ORG_ID beside the Operating Unit Name, and SET_OF_BOOKS_ID beside the Ledger
Name.
For an explanation of the fields/values used for the insert statement, please review the first
example script above, the values used are similar.
The following provides an explanation of the fields/values used for the 2nd and 3rd insert
statements:
or
Use the value = 50 (since we are splitting the credits across 2 people)
INTERFACE_LINE_CONTEXT - identifies the Transaction Flexfield used by the
interface data; this helps AutoInvoice understand what data is being passed in the
interface table's fields. The value here ties in with the setup created in Task 2, where we
created the Line Transaction Flexfield 'TIP'.
INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 - the
combination of values in these two fields uniquely identify the transaction you are
creating.
Use the values = 'TIP SC INVOICE 1' and 'TIP SC INVOICE SAMPLE'
ORG_ID - indicates the ID of the Operating Unit against which this transaction is
created.
If you do not know your ORG_ID or SET_OF_BOOKS_ID value, you can use
General Setup diagnostics (e.g. in R 12.0.6 this is Note 732193.1). This will show
the value of ORG_ID beside the Operating Unit Name, and SET_OF_BOOKS_ID
beside the Ledger Name.
h. Insert statement for an INVOICE WITH HEADER LEVEL FREIGHT
The following script will create a simple invoice with header level Freight.
For an explanation of the fields/values not listed below, please review the first example
script above, the values used are similar.
The following provides an explanation of the additional fields/values used which are highlighted
in bold in the first Insert statement.
Note: All the freight related information is actually provided in the record where LINE_TYPE =
LINE and not the record where LINE_TYPE = FREIGHT.
SHIP_VIA - identifies the Freight Carrier, this value should exist as FREIGHT_CODE in
ORG_FREIGHT table.
Please note that the Freight Code values in your instance may be different,
the following will list the values of Freight Codes that you can use.
WAREHOUSE_ID - indicates the Organization of the warehouse from which you will be
shipping the items
Use the values = 'TIP TAX-FRT INV 1' and 'INVOICE LINE' (for the first insert
statement) |
Use the values = 'TIP TAX-FRT INV 1' and 'FREIGHT' (for the second insert
statement)
For the second insert statement, which is the FREIGHT line, following is an explanation of the
fields used:
Use the value = 'TIP TAX-FRT INV 1' and 'INVOICE LINE'
AMOUNT - enter the amount associated to Freight
For an explanation of the fields/values not listed below, please review the first example
script above, the values used are similar.
The following provides an explanation of the additional fields/values used which are highlighted
in bold.
Use the value = 155 (for the regular Inventory Item = Sentinel Deluxe Desktop )
Use the value = 1747 (for the Freight Inventory Item = Freight Charges, see details
in Note 1096942.1 on how to define Freight as an Inventory Item )
UOM_CODE - indicates the Unit of Measure associated to the Inventory Item, this
value must be identical to the value in MTL_ITEM_UOMS_VIEW.UOM_CODE for the
INVENTORY_ITEM_ID
Use the values = 'TIP FRT AS INV 3' and 'INVOICE LINE' (for the first
insert statement, which is for the regular Line item)
Use the values = 'TIP FRT AS INV 3' and 'FREIGHT LINE' (for the second insert
statement, which is for the Freight Inventory Item)
Note: Even if the second line being interfaced is for FREIGHT, the LINE_TYPE remains = LINE
because we are treating the Freight as a regular inventory item and are passing it as an invoice
line to enable the calculation of taxes.
Once the data is inserted into the Interface table, we are ready to submit the
AutoInvoice Import Process
Once the process is complete, review the output generated from the AutoInvoice
Import Program and ensure there are no errors.
Following are examples of errors you may encounter:
Sample Error 1
The error shown below, would happen if you ran the insert statement above for a
second time without modifying any of the flexfield values.
As pointed out by the error messsage, the combination of the flexfield values is not
unique. To fix this issue, you should update the data in the interface table so that the
combined values in INTERFACE_LINE_ATTRIBUTE1 +
INTERFACE_LINE_ATTRIBUTE2 are unique.
update ra_interface_lines_all
set interface_line_attribute1 = 'TIP SAMPLE INVOICE 2',
interface_line_attribute2 = 'TIP LEGACY LINE 1'
where interface_line_attribute1 = 'TIP SAMPLE INVOICE 1'
and interface_line_attribute2 = 'TIP SAMPLE INVOICE 1'
and nvl(interface_status,'~') <> 'P';
commit;
Now that you have made the interface line attribute values unique, you can re-run
AutoInvoice and it should process successfully.
Sample Error 2
The error shown below, would happen if you have a typographical error in the insert
statement and you mis-typed the value for CUST_TRX_TYPE_ID.
As shown in the error, the CUST_TRX_TYPE_ID with value 36277 is invalid. If you
review the details in the first insert statement in Task 16, you will note that the correct
CUST_TRX_TYPE_ID = 3627 and not 36277.
To fix this issue, you should update the data in the interface table to correct the
CUST_TRX_TYPE_ID value.
Run a query using either the INTERFACE_LINE_ID or the Batch Source name or just
Check the Errors Exist checkbox to view lines with errors. Position the cursor on the
record you want to fix, then click on the Errors button to see details of the errors.
To correct the error, navigate back to the lines form and position your cursor on the
Line type field, Click on the folder menu and click on Show field. Doing this will allow
you to expose more fields from the table in the form.
To fix this particular error, we want to modify the Transaction Type Id, so locate that
field name in the list of values and click on it.
The Transaction Type Id field will now be displayed to the right of Line type and you
can enter the correct ID, and save your changes.
If there were multiple errors on a line, you would follow the same process to make
corrections to other fields. Once all corrections are complete you can run AutoInvoice
again.
Troubleshooting Tip: De-select this setting when troubleshooting records that seem to be
importing incorrectly such as when grouping rules are not being honored or line ordering
appears incorrect. This will allow you to review the data as it looked in the interface table and
after it has imported.
For more on the purge process please see Note 1127413.1 Understanding and
Troubleshooting AutoInvoice Purge
In most cases AutoInvoice is used to load invoices from Oracle EBS modules such as
Order Management or to build integration from a legacy application system. In these
cases AutoInvoice can be scheduled to run on a regular basis. The articles below
outline options that can be used to satisfy this requirement.
To verify whether AutoInvoice created the invoice successfully, view the invoice in the
Transaction workbench.
Responsibility: Receivables Manager
Navigation: Transactions > Transactions
for the Invoice: enter the value you provided for interface_line_attribute1 = 'TIP
SAMPLE INVOICE 1'
for the Credit memo (if you also ran this test): enter the value you provided for
interface_line_attribute1 = 'TIP SAMPLE CM 1' or 'TIP SAMPLE CM 2'
for the Invoice with rules: enter the value you provided for interface_line_attribute1 =
'TIP RULE INVOICE 1'
This shows that a simple invoice was successfully created, using the data we passed in!
Running a similar query for the value in INTERFACE_LINE_ATTRIBUTE1 for the Applied
Credit Memo and On-Account Credit memo and Invoice with Rules will display the credit
memos created.
If you are on release 12, you can take advantage of the AutoInvoice Analyzer, which
can provide a comprehensive diagnosis of interface errors and recommended solutions
for AutoInvoice Issues.
You can read more about the AutoInvoice Analyzer in Note 1523525.1.
If you are on release 11i, you can use the Diagnostic framework that includes
Diagnostics that can help you review and identify AutoInvoice issues. Please review the
R11i Diagnostics catalog and locate the diagnostics under Oracle Receivables:
AutoInvoice Interface and AutoInvoice Setup.
To access diagnostics in the application in Release 11i the access path is as follows:
Please note that each diagnostic test includes this information in the Usage section.