autoinvoice setups

29
AutoInvoice Setup for Release 12: A Case Study Using a Simple Script [ID 1067402.1] Modified 26-OCT-2010 Type WHITE PAPER Status PUBLISHED In this Document Abstract Document History AutoInvoice Setup for Release 12: A Case Study Using a Simple Script 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: Oracle Receivables - Version: 12.0.0 and later [Release: 12.0 and later ] Oracle Receivables - Version: 12.0.0 and later [Release: 12.0 and later] Information in this document applies to any platform. Executable:RAXMTR - Autoinvoice Master Program Executable:RAXTRX - Autoinvoice Import Program Abstract Oracle Receivables (AR): AutoInvoice Information Center > Note 1067402.1 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 . Document History Authors: Victoria Crisostomo, Kiran Kunderu & Frank Halvey Creation Date: 22-Mar-2010 Update Date: 13-Oct-2010 AutoInvoice Setup for Release 12: A Case Study Using a Simple Script 1. Define Common Accounts Receivable Configuration 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. 2. Manage Receivables Descriptive Flexfields Oracle Receivables uses the transaction flexfields to uniquely identify each transaction line that is imported though AutoInvoice. AutoInvoice is capable of using information from four types of transaction flexfields: Line Transaction Flexfield Link-to Transaction Flexfield Reference Transaction Flexfield Invoice Transaction Flexfield 3/2/2011 My Oracle Support | Knowledge Brows… support.oracle.com/CSP/ui/flash.html 1/29

Upload: pbobbi

Post on 29-Mar-2015

843 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: AutoInvoice Setups

AutoInvoice Setup for Release 12: A Case Study Using a Simple Script [ID 1067402.1]

Modified 26­OCT­2010 Type WHITE PAPER Status PUBLISHED

In this Document Abstract Document History AutoInvoice Setup for Release 12: A Case Study Using a Simple Script 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:

Oracle Receivables ­ Version: 12.0.0 and later [Release: 12.0 and later ]Oracle Receivables ­ Version: 12.0.0 and later [Release: 12.0 and later]Information in this document applies to any platform.Executable:RAXMTR ­ Autoinvoice Master ProgramExecutable:RAXTRX ­ Autoinvoice Import Program

Abstract

Oracle Receivables (AR): AutoInvoice Information Center > Note 1067402.1

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 PopulateInterface 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 thetransactions 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 AreRequired To Setup Receivables To Use A Simple Script To Import Transactions Via AutoInvoice Release 12.

Document History

Authors: Victoria Crisostomo, Kiran Kunderu & Frank HalveyCreation Date: 22­Mar­2010Update Date: 13­Oct­2010

AutoInvoice Setup for Release 12: A Case Study Using a Simple Script

1. Define Common Accounts Receivable Configuration

Common Accounts configuration pertains to the Accounting Flexfield setup. This is done in the General Ledger (GL) application. The assumption of this casestudy 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.

2. Manage Receivables Descriptive Flexfields

Oracle Receivables uses the transaction flexfields to uniquely identify each transaction line that is imported though AutoInvoice.

AutoInvoice is capable of using information from four types of transaction flexfields:

Line Transaction FlexfieldLink­to Transaction FlexfieldReference Transaction FlexfieldInvoice Transaction Flexfield

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 1/29

Page 2: AutoInvoice Setups

Click on the segments button to create the following rows. The values in the field Column are not shown completely, they are INTERFACE_LINE_ATTRIBUTE1and INTERFACE_LINE_ATTRIBUTE2 respectively.

3. Manage Receivables Profile Options

Several Profile options impact the behavior of AutoInvoice. Please refer to Note 1069294.1, Setting Up System Profile Options For AutoInvoice for details.

4. Manage Transaction Types

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.

Responsibility: Receivables ManagerNavigation: Setup > Transactions > Transaction Types

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 2/29

Page 3: AutoInvoice Setups

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 aCredit 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 transactiontype, then you must define GL accounts in the Accounts tab.

5. Manage AutoAccounting Rules

AutoAccounting enables you to create default accounts for revenue, receivable, freight, tax, unearned revenue, unbilled receivable, late charges, bills receivablesaccounts, 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, theaccounting flexfield will pull the third segment from the Receivables account defined for the transaction type. If we cross­reference this to the screenshot from theprevious task, the value for the third segment is 1210, coming from 01­000­1210­0000­000 defined for Receivables account.

Responsibility: Receivables ManagerNavigation: Setup > Transactions > AutoAccounting

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 3/29

Page 4: AutoInvoice Setups

During AutoInvoice, you are interfacing data with the intention of creating complete transactions automatically. Hence, you are advised to complete the setup forAutoAccounting so that AutoInvoice can determine the GL accounts to use for your interfaced transactions, and process them completely without errors andwithout 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.

6. Manage AutoInvoice Line Ordering Rules

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.

Responsibility: Receivables ManagerNavigation: Setup > Transactions > AutoInvoice > Line Ordering Rules

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 ToImport.

7. Manage AutoInvoice Grouping Rules

Grouping rules specify attributes that must be identical for lines to be created as one transaction. Grouping rules always include the mandatory attributes, and tothis 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.

Responsibility: Receivables ManagerNavigation: Setup > Transactions > AutoInvoice > Grouping Rules

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 4/29

Page 5: AutoInvoice Setups

The following screenshot shows a Payment term we will use in our interface data.

Responsibility: Receivables ManagerNavigation: Setup > Transactions > Payment Terms

To see how to manage and setup Payment Terms, please refer to Note 1069049.1, How To Define Transaction Payment Terms In Receivables.

9. Manage Transaction Sources

Batch sources define default information such as transaction type and automatic numbering. There are two types available: Manual and Imported. AutoInvoicerequires 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.

Responsibility: Receivables ManagerNavigation: Setup > Transactions > Sources

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.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 5/29

Page 6: AutoInvoice Setups

The following screenshots show the rest of the sub­tabs of this form, including Customer, Accounting, Salescredit and other information. You need to definewhether the data you will interface provides the Value or the ID so that AutoInvoice can validate the data.

Customer Information tab:

Accounting Information tab:

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 6/29

Page 7: AutoInvoice Setups

Other Information tab:

Sales Credit Validation tab:

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 7/29

Page 8: AutoInvoice Setups

To see how to manage and setup Transaction Sources, please refer to Note 1068008.1, Creating Transaction Sources Used For AutoInvoice.

10. Manage Receipt Classes and Methods

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.

Responsibility: Receivables ManagerNavigation: Setup > Receipts > Receipt Classes

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

Oracle Receivables provides a profile class DEFAULT.

If necessary, you can define different customer profile classes to categorize your customers. You can associate Customer Profile classes to customer recordsyou 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.

Responsibility: Receivables ManagerNavigation: Customers > Profile Classes

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 8/29

Page 9: AutoInvoice Setups

To see how to manage and setup Customer Profile Classes, please refer to Note 1071218.1, How To Define Customer Profile Classes For AutoInvoice.

12. Create Customer

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.

Responsibility: Receivables ManagerNavigation: Customers > Customers

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 9/29

Page 10: AutoInvoice Setups

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 Receiptmethod, 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 willneed to set up the Payment Details at the SITE level as shown below.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 10/29

Page 11: AutoInvoice Setups

To see how to Create Customer Records, please refer to Note 1069338.1 How To Define Customers For AutoInvoice.

13. Manage Receivables System Options

The settings in System Options that impact AutoInvoice are in the Trans and Customers tab. The following screenshot shows recommended settings for fields inthe '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.

Responsibility: Receivables ManagerNavigation: Setup > System > System Options

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.

14. Manage Receivables Accounting Periods

Open or close periods in your accounting calendar to control the recording of accounting information for these periods. Since the objective of AutoInvoice is tocreate new transactions, the goal is to have these transactions impact open GL periods.

Ensure that the GL_DATE value you provide in the next task is within an open period.

Responsibility: Receivables ManagerNavigation: Control > Accounting > Open/Close periods

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 11/29

Page 12: AutoInvoice Setups

To see how to Manage Receivable Accounting Periods, please refer to Note 1069057.1, How To Manage Receivables Accounting Periods.

15. Manage Remit­To Address

Define a Remit­To Address so that customers know where to send payment for their invoices.

Responsibility: Receivables ManagerNavigation: Setup > Print > Remit To Address > Create Remit­To Address

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

16. Populate Interface table

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 tocreate 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 inRA_INTERFACE_LINES Table.

a. Insert statement for an INVOICE

The following script will create a simple invoice.

INSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id)VALUES('TIP', 'TIP SAMPLE INVOICE 1', 'TIP SAMPLE INVOICE 1',1000.00, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'TIP SAMPLE INVOICE 1 ­ ITEM #1', '31­JAN­2010', 'LINE',11145, 117751,10, 100.00,1514, 'Y', 'N',1, 204);

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.

INTERFACE_LINE_CONTEXT ­ identifies the Transaction Flexfield used by the interface data; this helps AutoInvoice understand what data is beingpassed 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 value = 'TIP'

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify the transactionyou are creating.

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 forQUANTITY * UNIT_SELLING_PRICE.

Use the value = 1000.00

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'.

Use the value = 'TIP BATCH SOURCE'

CONVERSION_RATE ­ For non­functional currency transactions, this field would contain the exchange rate value. For our test case, we are creating atransaction in the functional currency = USD, so the rate is 1.

Use the value = 1

CONVERSION_TYPE ­ Specify the conversion rate type, for our test case we will use 'User'.

Use the value = 'User'

CURRENCY_CODE ­ Indicate the currency code of the transaction, for our test case we will use 'USD'.

Use the value = 'USD'

CUST_TRX_TYPE_ID ­ identifies the ID associated to the transaction type we created in Task 4 where we defined 'TIP INVOICE'.

To determine the ID associated to this transaction type, run the following:

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 12/29

Page 13: AutoInvoice Setups

Use the value = 'TIP SAMPLE INVOICE 1 ­ ITEM #1'

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 valuefalls should be an open period.

Use the value = '31­JAN­2010'

LINE_TYPE ­ indicates the type of line this interface data defines.

Use the value = 'LINE'

ORIG_SYSTEM_BILL_ADDRESS_ID and ORIG_SYSTEM_BILL_CUSTOMER_ID ­ identifies the Address ID and Customer ID associated to the invoice.

To determine the ID values to use, run the following:

Please note that the ID may be different in your instance.

select c.cust_acct_site_id orig_system_bill_address_id, b.cust_account_id orig_system_bill_customer_idfrom hz_parties a,hz_cust_accounts b,hz_cust_acct_sites_all c,hz_cust_site_uses_all dwhere a.party_name = 'TIP CUSTOMER 1'and a.party_id = b.party_idand c.cust_account_id = b.cust_account_idand c.cust_acct_site_id = d.cust_acct_site_idand d.site_use_code = 'BILL_TO';

Use the values = 11145 and 117751

QUANTITY ­ specify the number of items.

Use the value = 10

UNIT_SELLING_PRICE ­ specify the price of each item.

Use the value = 100.00

TERM_ID ­ identifies the term ID associated with the setup created in Task 8.

To determine the ID value to use, run the following:

Please note that the ID may be different in your instance.

select term_idfrom ra_termswhere name = 'TIP TERM';

Use the value = 1514

TAXABLE_FLAG ­ indicates whether or not the transaction is taxable.

Use the value = 'Y'

AMOUNT_INCLUDES_TAX_FLAG ­ indicates whether or not the amount is inclusive of taxes.

Use the value = 'N'

SET_OF_BOOKS_ID ­ identifies the Set of Books ID associated to the Operating Unit you are processing your transaction in.

The set of books id is associated to your Operating Unit. If you know your operating unit ID, you can run the following:

Please note that the ORG_ID in your instance may be different.

select set_of_books_idfrom ar_system_parameters_allwhere org_id = &org_id;

Use the value = 1

To find your ORG_ID run the script below:

Select organization_id, name From hr_organization_units;

ORG_ID ­ indicates the ID of the Operating Unit against which this transaction is created.

Use the value = 204

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.

b. Insert statement for an APPLIED CREDIT MEMO

This following script will create a Credit Memo against the Invoice created above. The text highlighted in bold are the changes from the insert scriptfor the Invoice.

OPTION 1:Using REFERENCE_LINE_CONTEXT and REFERENCE_LINE_ATTRIBUTE* Fields

INSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,reference_line_context, reference_line_attribute1, reference_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 13/29

Page 14: AutoInvoice Setups

'TIP SAMPLE CM 1 ­ ITEM #1', '31­JAN­2010', 'LINE',11145, 117751,­1, 10.00,null, 'Y', 'N',1, 204);

The following section explains how to determine the ID values created during the setup. Many of the fields are the same as the insert statementused for the Invoice. We will focus on the things that changed.

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

Use the values = 'TIP SAMPLE CM 1' and 'TIP SAMPLE CM 1'

REFERENCE_LINE_CONTEXTREFERENCE_LINE_ATTRIBUTE1REFERENCE_LINE_ATTRIBUTE2

These fields associate this credit memo to an invoice, the values in these fields need to match the INTERFACE_LINE* fields of theinvoice, 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 passin for QUANTITY * UNIT_SELLING_PRICE.

Use the value = ­10.00

CUST_TRX_TYPE_ID ­ identifies the ID associated to the transaction type we created in Task 4 where we defined TIP CM

To determine the ID associated to this transaction type, run the following:

Please note that the ID may be different in your instance.

select cust_trx_type_idfrom ra_cust_trx_types_allwhere name = 'TIP CM';

Use the value = 3628

QUANTITY ­ specify the number of items.

Use the value = ­1

UNIT_SELLING_PRICE ­ specify the price of each item.

Use the value = 10.00

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:Using REFERENCE_LINE_ID

INSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,reference_line_id,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id)VALUES('TIP', 'TIP SAMPLE CM 2', 'TIP SAMPLE CM 2',82141,­10.00, 'TIP BATCH SOURCE', 1,

'User', 'USD', 3628,'TIP SAMPLE CM 1 ­ ITEM #1', '31­JAN­2010', 'LINE',11145, 117751,­1, 10.00,null, 'Y', 'N',1, 204);

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 forOption 1 above, we will focus on the difference.

REFERENCE_LINE_ID ­ is the CUSTOMER_TRX_LINE_ID of the Invoice line that you wish to apply the credit memo to. To find the rightvalue, you can use the values in the Line Transaction Flexfield. As mentioned earlier the combination of values in the Context and Attributesfields is unique, hence you can find the exact line you wish to credit by using these values in the where condition.

Please note that the Id may be different in your instance.

select customer_trx_line_idfrom ra_customer_trx_lines_allwhere interface_line_context = 'TIP',and interface_line_attribute1 = 'TIP SAMPLE INVOICE 1'and interface_line_attribute2 = 'TIP SAMPLE INVOICE 1';

Use the value = 821481

c. Insert statement for an ON­ACCOUNT CREDIT MEMO

The following script will create an On­Account credit memo.

INSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 14/29

Page 15: AutoInvoice Setups

'User', 'USD', 3628,'TIP SAMPLE ON­ACCT CM 1 ­ ITEM #1', '31­JAN­2010', 'LINE',11145, 117751,­10, 100.00,null, 'Y', 'N',1, 204);

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 Invoiceabove, we will focus on the differences:

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

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 passin for QUANTITY * UNIT_SELLING_PRICE.

Use the value = ­1000.00

CUST_TRX_TYPE_ID ­ identifies the ID associated to the transaction type we created in Task 4 where defined TIP CM

To determine the ID associated to this transaction type, run the following:

Please note that the ID may be different in your instance.

select cust_trx_type_idfrom ra_cust_trx_types_allwhere name = 'TIP CM';

Use the value = 3628

QUANTITY ­ specify the number of items.

Use the value = ­10

UNIT_SELLING_PRICE ­ specify the price of each item.

Use the value = 100.00

TERM_ID

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 Taxengine, 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.

Responsibility: Receivables Manager

Navigation: Setup > Transactions > Accounting Rules

For additional information on setting up and troubleshooting Accounting Rules, please review Note 1116934.1, How To Setup And TroubleshootInvoicing Rules and Accounting Rules.

The following script will create an invoice using the TIP RULE defined above.

INSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id,

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 15/29

Page 16: AutoInvoice Setups

1, 204,­2, 12086, null);

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 datais 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 TransactionFlexfield 'TIP'.

Use the value = 'TIP'

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

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 infor QUANTITY * UNIT_SELLING_PRICE.

Use the value = 1000.00

BATCH_SOURCE_NAME ­ the value you specify here identifies the transaction batch source to be used by AutoInvoice when interfacingthis transaction. In Task 9, we created the Batch Source 'TIP BATCH SOURCE'.

Use the value = 'TIP BATCH SOURCE'

CONVERSION_RATE ­ For non­functional currency transactions, this field would contain the exchange rate value. For our test case, we arecreating a transaction in the functional currency = USD, so the rate is 1.

Use the value = 1

CONVERSION_TYPE ­ Specify the conversion rate type, for our test case we will use 'User'.

Use the value = 'User'

CURRENCY_CODE ­ Indicate the currency code of the transaction, for our test case we will use 'USD'.

Use the value = 'USD'

CUST_TRX_TYPE_ID ­ identifies the ID associated to the transaction type we created in Task 4 where we defined 'TIP INVOICE'.

To determine the ID associated to this transaction type, run the following:Please note that the ID may be different in your instance.

select cust_trx_type_idfrom ra_cust_trx_types_allwhere name = 'TIP INVOICE';

Use the value = 3627

DESCRIPTION ­ enter a line item description.

Use the value = 'TIP DESCRIPTION 1 ­ ITEM #1'

GL_DATE ­ the value you specify here will be used by AutoInvoice as the GL_DATE of your transaction. Typically the period in which thisGL_DATE value falls should be an open period.

Use the value = '10_AUG­2010'

LINE_TYPE ­ indicates the type of line this interface data defines.

Use the value = 'LINE'

ORIG_SYSTEM_BILL_ADDRESS_ID and ORIG_SYSTEM_BILL_CUSTOMER_ID ­ identifies the Address ID and Customer ID associatedto the invoice.

To determine the ID values to use, run the following:

Please note that the ID may be different in your instance.

select c.cust_acct_site_id orig_system_bill_address_id, b.cust_account_id orig_system_bill_customer_idfrom hz_parties a,hz_cust_accounts b,hz_cust_acct_sites_all c,hz_cust_site_uses_all dwhere a.party_name = 'TIP CUSTOMER 1'and a.party_id = b.party_idand c.cust_account_id = b.cust_account_idand c.cust_acct_site_id = d.cust_acct_site_idand d.site_use_code = 'BILL_TO';

Use the values = 11145 and 117751

QUANTITY ­ specify the number of items.

Use the value = 10

UNIT_SELLING_PRICE ­ specify the price of each item.

Use the value = 100.00

TERM_ID ­ identifies the term ID associated with the setup created in Task 8.

To determine the ID value to use, run the following:

Please note that the ID may be different in your instance.

select term_idfrom ra_termswhere name = 'TIP TERM';

Use the value = 1514

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 16/29

Page 17: AutoInvoice Setups

The set of books id is associated to your Operating Unit. If you know your operating unit ID, you can run the following:

Please note that the ORG_ID in your instance may be different.

select set_of_books_idfrom ar_system_parameters_allwhere org_id = &org_id;

Use the value = 1

ORG_ID ­ indicates the ID of the Operating Unit against which this transaction is created.

Use the value = 204

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 Note732193.1). This will show the value of ORG_ID beside the Operating Unit Name, and SET_OF_BOOKS_ID beside the Ledger Name.

INVOICING_RULE_ID ­ indicates manner in which you want the Receivable recognized. There are only 2 values available: ­2 (In Advance)and ­3 (In Arrears). For more information please review Note 1116934.1

Use the value = ­2

ACCOUNTING_RULE_ID ­ indicates the manner in which you want the Revenue to be recognized. This ties in with the setup we createdabove for 'TIP RULE'. For more information please review Note 1116934.1

To determine the ID value to use, run the following:

Please note that the ID may be different in your instance.

select rule_idfrom ra_ruleswhere name = 'TIP RULE';

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.

Use the value = null

f. Insert statement for an INVOICE WITH GL DISTRIBUTIONS

Users have the ability to pass in their own GL distributions thereby bypassing the GL accounts derived by AutoAccounting.

In the following script, we interface an Invoice and pass in distributions for the Revenue and Receivable account. The setup in this instance willcreate Rounding rows, and since we do not explicitly pass in that distribution, it will be created using the AutoAccounting setup.

Note: When passing GL distributions, AutoAccounting will be used to derive the GL accounts of all accounting distributions that are notexplicitly provided in RA_INTERFACE_DISTRIBUTIONS_ALL.

For more on this refer to Note 1228525.1 How to Import and Troubleshoot Distributions in AutoInvoice UsingRA_INTERFACE_DISTRIBUTIONS_ALL

­­ create the "parent" record in RA_INTERFACE_LINES_ALLINSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id)VALUES('TIP', 'TIP DIST INVOICE 1', 'TIP DIST INVOICE SAMPLE',1000.00, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'TIP DESCRIPTION 1 ­ ITEM #1', '10­AUG­2010', 'LINE',11145, 117751,10, 100.00,1514, 'Y', 'N',1, 204);

­­ create distribution records for only REV and REC rowsINSERT INTO ra_interface_distributions_all (account_class, amount, code_combination_id, percent,interface_line_context, interface_line_attribute1,interface_line_attribute2, org_id)VALUES ('REC', 1000.00, 12833, 100,'TIP', 'TIP DIST INVOICE 1', 'TIP DIST INVOICE SAMPLE', 204);

INSERT INTO ra_interface_distributions_all (account_class, amount, code_combination_id, percent,interface_line_context, interface_line_attribute1,interface_line_attribute2, org_id)VALUES ('REV', 1000.00, 107410, 100, 'TIP', 'TIP DIST INVOICE 1', 'TIP DIST INVOICE SAMPLE', 204);

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), CHARGESYou may pass values for any of these account classes.

For any required GL distribution that you do not provide in RA_INTERFACE_DISTRIBUTIONS_ALL, the code will invokeAutoAccounting.

Use the value = 'REC' and 'REV'

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 17/29

Page 18: AutoInvoice Setups

Use the value = 12833 (for REC) and 107410 (for REV)

Typically, the purpose of passing in rows in RA_INTERFACE_DISTRIBUTIONS_ALL is to bypass AutoAccounting. In our current setup,AutoAccounting would have used the code combination id values: 12835 and 158423 respectively. By using differentcode_combination_id values we are able to verify that the distributions we passed in are what actually got used when the Invoice wascreated.

PERCENT ­ indicates the percentage associated to the distributions.

Use the value = 100

INTERFACE_LINE_CONTEXT ­ identifies the Transaction Flexfield used by the interface data; this helps AutoInvoice understand what datais 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 TransactionFlexfield 'TIP'.

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

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.

Use the value = 204

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 Note732193.1). This will show the value of ORG_ID beside the Operating Unit Name, and SET_OF_BOOKS_ID beside the Ledger Name.

g. Insert statement for an INVOICE WITH SALESCREDITS

The following script will create a simple invoice and assign sales credits to 2 Sales persons.

INSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id)VALUES('TIP', 'TIP SC INVOICE 1', 'TIP SC INVOICE SAMPLE',1000.00, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'TIP DESCRIPTION 1 ­ ITEM #1', '10­AUG­2010', 'LINE',11145, 117751,10, 100.00,1514, 'Y', 'N',1, 204);

INSERT INTO ra_interface_salescredits_all (salesrep_id, sales_credit_type_id, sales_credit_percent_split,interface_line_context, interface_line_attribute1,interface_line_attribute2, org_id);VALUES (100000013, 1, 50, 'TIP','TIP SC INVOICE 1', 'TIP SC INVOICE SAMPLE', 204);

INSERT INTO ra_interface_salescredits_all (salesrep_id, sales_credit_type_id, sales_credit_percent_split,interface_line_context, interface_line_attribute1,interface_line_attribute2, org_id);VALUES (100000015, 1, 50, 'TIP','TIP SC INVOICE 1', 'TIP SC INVOICE SAMPLE', 204);

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:

SALESREP_ID ­ identifies the Salesperson to be associated to the sales credit. You need to determine the ID associated to the Salesperson names to whom you want to assign credit for this sale.

Please note that the ID values in your instance may be different.

select * from JTS_RS_SALESREPSwhere name = '&salesrep_name';

or

select * from JTS_RS_SALESREPSwhere salesrep_number = '&salesrep_num';

Use the value = 100000013 and 100000015

SALES_CREDIT_TYPE_ID ­ indicates where the Sales credit is to fulfill a Sales Quota (1) or Non­Quota (2)

Use the value = 1

SALES_CREDIT_PERCENT_SPLIT ­ this identifies the percent of the credit you want to associate to a particular salesperson. The total ofall salescredits for a transaction should be 100.

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 datais 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 TransactionFlexfield 'TIP'.

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 18/29

Page 19: AutoInvoice Setups

h. Insert statement for an INVOICE WITH HEADER LEVEL FREIGHT

The following script will create a simple invoice with header level Freight.

­­ Insert record for LINEINSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id, ship_via, warehouse_id, ship_date_actual)

VALUES('TIP', 'TIP TAX­FRT INV 1', 'INVOICE LINE',1000.00, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'TIP TAX­FRT INVOICE ­ ITEM #1', '10­AUG­2010', 'LINE',11145, 117751,10, 100.00,1514, 'Y', 'N',1, 204, 'Federal Express', 204,'10­AUG­10');

­­ Insert Record for FreightINSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,LINK_TO_LINE_CONTEXT, LINK_TO_LINE_ATTRIBUTE1, LINK_TO_LINE_ATTRIBUTE2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id)VALUES('TIP', 'TIP TAX­FRT INV 1', 'FREIGHT','TIP', 'TIP TAX­FRT INV 1', 'INVOICE LINE',49.95, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'Freight', '10­AUG­2010', 'FREIGHT',11145, 117751,null, null,1514, null, null,1, 204);

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 thatyou can use.

select FREIGHT_CODE from ORG_FREIGHTwhere ORGANIZATION_ID = &ORG_ID;

Use the value = 'Federal Express'

WAREHOUSE_ID ­ indicates the Organization of the warehouse from which you will be shipping the items

In our case, the ORG_ID and WAREHOUSE_ID are the same.

Use the value = 204

SHIP_DATE_ACTUAL ­ this identifies the date the shipment was actually made

Use the value = '10­AUG­10'

INTERFACE_LINE_CONTEXT ­ identifies the Transaction Flexfield used by the interface data; this helps AutoInvoice understand what datais 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 TransactionFlexfield 'TIP'.

Use the value = 'TIP'

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

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:

LINK_TO_LINE_CONTEXT ­ identifies the Transaction Flexfield of the Invoice line to which you want to link this Freight record to

Use the value = 'TIP'

LINK_TO_LINE_ATTRIBUTE1 and LINK_TO_LINE_ATTRIBUTE2 ­ the combination of values in these two files uniquely identifiy thetransaction line to which this Freight row is associated to, it should be identical to the values in INTERFACE_LINE_ATTRIBUTE1 and 2 forthe LINE_TYPE = LINE

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 19/29

Page 20: AutoInvoice Setups

Use the value = 'FREIGHT'

i. Insert statement for an INVOICE WITH FREIGHT AS AN INVENTORY ITEM

The following script will create a simple invoice with Freight as an inventory item, this enables you to calculate taxes on the Freight amount. For details onthe prerequisite steps required, please review Note 1096942.1, How To Setup And Troubleshoot Freight In AutoInvoice And The Transactions Form

­­ Insert record for LINEINSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id, inventory_item_id, uom_code)VALUES('TIP', 'TIP FRT AS INV 3', 'INVOICE LINE',1000.00, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'Sentinel Deluxe Desktop', '10­AUG­2010', 'LINE',11145, 117751,10, 100.00,1514, 'Y', 'N',1, 204, 155,'Ea');

­­ Insert Record for FreightINSERT INTO ra_interface_lines_all(interface_line_context, interface_line_attribute1, interface_line_attribute2,amount, batch_source_name, conversion_rate,conversion_type, currency_code, cust_trx_type_id,description, gl_date, line_type,orig_system_bill_address_id, orig_system_bill_customer_id,quantity, unit_selling_price,term_id, taxable_flag, amount_includes_tax_flag,set_of_books_id, org_id, inventory_item_id, uom_code)VALUES('TIP', 'TIP FRT AS INV 3', 'FREIGHT LINE',49.95, 'TIP BATCH SOURCE', 1,'User', 'USD', 3627,'Freight Charges', '10­AUG­2010', 'LINE',11145, 117751,1, 49.95,1514, 'Y', 'N',1, 204, 1747,'Ea');

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.

INVENTORY_ITEM_ID ­ identifies the Inventory item to be shipped.

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 anInventory Item )

UOM_CODE ­ indicates the Unit of Measure associated to the Inventory Item, this value must be identical to the value inMTL_ITEM_UOMS_VIEW.UOM_CODE for the INVENTORY_ITEM_ID

Use the value = 'Ea'

INTERFACE_LINE_CONTEXT ­ identifies the Transaction Flexfield used by the interface data; this helps AutoInvoice understand what datais 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 TransactionFlexfield 'TIP'.

Use the value = 'TIP'

INTERFACE_LINE_ATTRIBUTE1 and INTERFACE_LINE_ATTRIBUTE2 ­ the combination of values in these two fields uniquely identify thetransaction you are creating.

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)

LINE_TYPE ­ identifies what type of data is in this record

Use the value = 'LINE' (for both records)

Note: Even if the second line being interfaced is for FREIGHT, the LINE_TYPE remains = LINE because we are treating theFreight as a regular inventory item and are passing it as an invoice line to enable the calculation of taxes.

17. Testing AutoInvoice: AutoInvoice Import Process

Once the data is inserted into the Interface table, we are ready to submit the AutoInvoice Import Process

Responsibility: Receivables ManagerNavigation: Interfaces > AutoInvoice

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 20/29

Page 21: AutoInvoice Setups

To monitor the progress of the process, Navigation: View > Requestsclick on Find Button

Once the process is complete, review the output generated from the AutoInvoice Import Program and ensure there are no errors.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 21/29

Page 22: AutoInvoice Setups

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 sothat the combined values in INTERFACE_LINE_ATTRIBUTE1 + INTERFACE_LINE_ATTRIBUTE2 are unique.

You could run an update statement like:

update ra_interface_lines_allset 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';

­­ the above should update one row

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

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 22/29

Page 23: AutoInvoice Setups

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 thecorrect 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.

Another way to make corrections is to use the Interface Lines form.

Responsibility: Receivables ManagerNavigation: Control > AutoInvoice > Interface Lines

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 thecursor on the record you want to fix, then click on the Errors button to see details of the errors.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 23/29

Page 24: AutoInvoice Setups

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 thiswill 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.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 24/29

Page 25: AutoInvoice Setups

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 runAutoInvoice again.

Other similar errors due to invalid ID values would be:

As shown in the examples, the error message provide helpful information about the problem encountered. Patient and careful review of the error message andthe details provided therein will help you resolve the error. Also, it is typically most difficult to create the first invoice via a script, but once you have the right scriptit is very easy to adapt it to your needs.

18. Purging the Interface Table After Import

To automatically purge the AutoInvoice Interface tables after running AutoInvoice, check the Purge Interface Tables box in the receivables system options. If youcheck this box, Receivables deletes the records that have successfully transferred into permanent Receivables tables. Do not check this box if you want tosubmit the AutoInvoice Purge program manually after running AutoInvoice.

Troubleshooting Tip: De­select this setting when troubleshooting records that seem to be importing incorrectly such as when grouping rules are not being

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 25/29

Page 26: AutoInvoice Setups

Note 279423.1 How to Schedule AutoInvoice to Run on a Periodic BasisNote 1127399.1 Sample PLSQL Script to call Autoinvoice Import Program RAXTRX using fnd_request.submit_request in Release 12

20. Review Invoice Created by AutoInvoice

To verify whether AutoInvoice created the invoice successfully, view the invoice in the Transaction workbench.

Responsibility: Receivables ManagerNavigation: Transactions > Transactions

Then run a Query using View > Query By ExampleEnter the following filters:

Batch Source name = 'TIP BATCH SOURCE'Reference field =

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 'TIPSAMPLE CM 2'for the Invoice with rules: enter the valud you provided for interface_line_attribute1 = 'TIP RULE INVOICE 1'

Then execute the query.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 26/29

Page 27: AutoInvoice Setups

Click on Line Items button to see invoice lines.

This shows that a simple invoice was successfully created, using the data we passed in! Running a similar query for the value inINTERFACE_LINE_ATTRIBUTE1 for the Applied Credit Memo and On­Account Credit memo and Invoice with Rules will display the credit memos created.

21. Troubleshooting & Tips

The following notes contain details on various troubleshooting tips:

Note 733835.1, AutoInvoice FAQ for Release 12Note 1075757.1, AutoInvoice Troubleshooting Guide

Oracle also provides a Diagnostic framework that includes Diagnostics that can help you review and identify AutoInvoice issues. Please review the R12Diagnostics Catalog, identify your point release and locate the diagnostics under Oracle Receivables: AutoInvoice Interface and AutoInvoice Setup.

For example in Release 12.0.6, Note 732187.1 AutoInvoice Interface, this collects information pertaining to a particular attribute in the Interface table. Note732189.1 AutoInvoice Setup, collects information regarding setup such as line ordering, grouping rules, descriptive flexfields, as well as file versions and triggers.

To access diagnostics in the application in Release 12.0.6, the access path is as follows:

Please note that each diagnostic test includes this information in the Usage section.

Responsibility: Application DiagnosticsNavigation: Application Diagnostics > Diagnose

Click button Select Application and select Application "Receivables"Scroll down to group "Transactions"

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 27/29

Page 28: AutoInvoice Setups

22. Still Have Questions?

To discuss this information further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the My Oracle SupportReceivables Community.

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 28/29

Page 29: AutoInvoice Setups

Related

Products

Oracle E­Business Suite > Financial Management > Credit to Cash > Oracle ReceivablesOracle E­Business Suite > Financial Management > Credit to Cash > Oracle Receivables

Keywords

RA_INTERFACE_LINES_ALL; AUTOACCOUNTING; AUTOINVOICE; FLEXFIELDS; DESCRIPTIVE FLEXFIELDS; GROUPING RULES; ORDERINGRULES; TRANSACTION SOURCES

Errors

ERROR 1; ERROR 2

Back to top

3/2/2011 My Oracle Support | Knowledge Brows…

support.oracle.com/CSP/ui/flash.html 29/29