Sie sind auf Seite 1von 14

Autoinvoice Interface

White Paper
Maya Jonipelliwar
Oracle applications E-business Suite
Receivables.

Autoinvoice Interface

Confidentiality Statement

2008 TATA CONSULTANCY SERVICES LIMITED


All rights reserved.
The contents hereof are the sole and exclusive property of Tata Consultancy Services
Limited and may not be, for whatsoever purpose, reproduced, stored, copied or archived
in any manner whatsoever either in full or in parts without the prior express consent of
TCS. The contents hereof are purely for internal circulation in TCS and any access of
whatsoever nature of these materials outside the TCS network is strictly prohibited and
will attract legal liability of both civil and criminal nature. Any access of these materials
outside the TCS network amounts to an act of infringement of the intellectual and other
proprietary rights of TCS.

Confidential

Autoinvoice Interface

Abstract
The white Paper intends to explain the concept of AR interface in oracle applications 11i
used to load the AR Invoices into oracle applications receivables module from the legacy
system. The document Covers the detailed step by step process used to load the invoices
in AR from a legacy system that may include any third party application or flat files.
The White Paper covers the detailed technical aspects including the table
names,validations and the standard concurrent program names to load the invoices using
the standard oracle AR interface also called as AUTOINVOICE INTERFACE.It also
covers the basic required functional setup for the AUTOINVOICE functioning that
mainly involves the grouping rule.

Confidential

Autoinvoice Interface

About the Author


J Maya has been working with TCS for last 4+ years on oracle applications
manufacturing and financials module. She is currently working in a
support project that supports oracle applications already implemented
by the customer in manufacturing domain.

About the Domain

Oracle applications E-business suite is a Comprehensive suite of integrated ,global


business applications .It consists of a collection of Enterprise Resource
planning(ERP),Customer relationship management and Supply chain Management
applications developed and acquired by Oracle .The application utilizes oracle relational
database management system for the storage and retrieval of the data .It provides an
integrated end-to-end business solution for an organization ,providing user with a
complete and relevant information tailored to their role . Its the most adaptable global
business platform that can operate globally with the local compliance .An integrated
business intelligence providing the useful information thus supporting the effective
decision making . Modular yet integrated approach to the applications and information
management

Confidential

Autoinvoice Interface

CONTENTS
INTRODUCTION ........................................................................................................................................6
STEPS TO IMPORT AR INVOICES ........................................................................................................ 7
CREATING CUSTOM TABLES IN ORACLE APPS ................................................................................... 7
LOAD THE DATA IN CUSTOM TABLES .............................................................................................. 7-9
VALIDATE THE INVOICE DATA & LOAD THE DATA INTO STANDARD INTERFACE TABLES 9-11
RUN THE STANDARD AUTOINVOICEPROGRAM...11
CONCLUSION........................................................................................................................................... 12
ACKNOWLEDGEMENTS ....................................................................................................................... 13
REFERENCES ........................................................................................................................................... 14

Confidential

Autoinvoice Interface

Introduction

AutoInvoice is an interface that can be used to import and validate transaction data from
other financial systems from which one can create invoices, debit memos, credit memos
in oracle application receivables.

Invoice can be imported from the legacy system to oracle application


receivables.The Legacy system could be any third party application or a flat file or an
excel sheet.Though the AR Interface process more-or-less remains same irrespective of
the legacy system used except a little change while the data is being loaded into oracle
apps custom tables.

Confidential

Autoinvoice Interface

Steps to Import AR Invoices:

Creating the custom tables in oracle apps


Load data using sql loader/materialized view
Validate the invoices loaded using a concurrent program & load the data
in standard ar interface tables
Run the standard Autoinvoce Import program

Creating the custom tables in oracle apps


This is the first step towards loading the AR invoices into oracle apps. Create the
custom tables with the columns same as in the interface table or with required
fields/columns that covers all the mandatory columns to create an invoice in
oracle apps as well as the additional columns present in the invoice of the legacy
system .
Creating custom table for AR interface:
CREATE TABLE XX_RA_INTERFACE_LINES_ALL
AS SELECT * FROM RA_INTERFACE_LINES_ALL

CREATE TABLE XX_RA_INTERFACE_DISTRIBUTIONS_ALL


AS SELECT * FROM RA_INTERFACE_DISTRIBUTIONS_ALL

Loading the data in custom tables


The invoice data can be imported into the custom tables from flat files (.csv) files
using the SQL loader utility. SQL*Loader is a bulk loader utility used for moving
data from external files into the Oracle database. SQL*Loader supports various
load formats, selective loading, and multi-table loads. The data can be loadedinto
the tables using sqlldr command.This utilty requires a control file (.ctl file) and a
.csv file containg the data.The .ctl file contains the instructions to load the data
while .csv fie contains actual data to be loaded.

Confidential

Autoinvoice Interface
Example:

load data
infile 'c:\data\mydata.csv'
--- .csv file containing actual data
into table emp ; --- emp is the table name
fields terminated by "," optionally enclosed by '"'
( empno,

empname, sal, deptno )

The mydata.csv file may look like this:


10001,"Scott Tiger", 1000, 40
10002,"Frank Naude", 500, 20

Another Sample control file with in-line data formatted as fix length records. The trick is
to specify "*" as the name of the data file, and use BEGINDATA to start the data section
in the control file:
load data
infile *
replace
into table departments
( dept
position (02:05) char(4),
deptname position (08:27) char(20)
)
begindata
COSC COMPUTER SCIENCE
ENGL ENGLISH LITERATURE
MATH MATHEMATICS
POLY POLITICAL SCIENCE

Importing data using materialized views:Data could be imported into oracle apps from the third party applications using the
materialized views.A materialized view is a database object that contains the results of a
query. They are the local copies of data located remotely. Thus a materialized view is
created in oracle which acts as a local copy of the invoice data in the tables located on the
third party application servers.The materialized view can be connected to the remote
server using database links. A database link is a schema object in one database that
enables you to access objects on another database.

Confidential

Autoinvoice Interface
Syntax to create Database Link:
CREATE [SHARED] [PUBLIC] DATABASE LINK <link_name>
CONNECT TO CURRENT_USER
USING '<service_name>'
Materialized view creation :
Syntax:
CREATE MATERIALIZED VIEW [schema.]mview
Mview_Options
[USING INDEX storage_options]
[{REFRESH [refresh_options] | NEVER REFRESH]
[FOR UPDATE] [{ENABLE|DISABLE} QUERY REWRITE]
AS subbquery;
Ex: create materialized view mv_test as select * from v_test@dblink_name

Validate the invoice data & loaded the data into standard interface tables
Validate the invoice data coming from legacy system using pl/sql code.Write a
package that covers all the required validations for the column data in the table
and create and register the concurrent program in oracle apps of type pl/sql
package to submit this validation program from the oracle apps front end. Verify
the output of this validation program for any error in the invoice data. In case of
errors, correct the data and reload the invoices.
Here are the example of most commonly performed validations for the AR invoice
data.

AR Transaction Type Validation : Check if the Transaction type provided in data


file is defined in AR transaction
types(RA_CUST_TRX_TYPES_ALL)

Transaction Batch Source Validation: Check if the source provided in data file is
defined in AR transaction Batch source (
RA_BATCH_SOURCES_ALL)
Invoice Currency Validation: Check if the currency provided in data file is defined in
AR Currency (FND_CURRENCIES).
Customer Validation: Check if the Bill to Customer Number, Ship to Customer
Number, Bill to Customer Location, Ship to Customer
Location provided in the data file is defined in AR
Customer(ra_customers,HZ_locations,Ra_addresses_all
etc.).

Confidential

Autoinvoice Interface
Primary Sales Representative Validation: Sales representative number to be
hardcode to -3 for No Sales Credit.

Term Name : Check if the Term name provided in the data file is defined in
Payment terms (RA_TERMS).
Inventory Item Validation: Check if the Item provided in data file is defined in
Inventory Items (MTL_SYSTEM_ITEMS).

Unit of Measurement validation: Check if the UOM provided is defined in


MTL_UNITS_OF_MEASURE Table.
Account class validation : Validate the account class using look up type
ACCOUNT_CLASSES.
Once the validations are performed insert the validated data into the oracle apps AR
standard interface tables:
RA_INTERFACE_LINES_ALL (MANDATORY) :Contains the header and line
information for invoice.
RA_INTERFACE_DISTRIBUTIONS_ALL (MANDATORY):Contains the account
distributions for an invoice line entered.
The two tables RA_INTERFACE_LINES_ALL and
RA_INTERAFCE_DISTRIBUTIONS_ALL are lined using interface line attributes
which are set using the Grouping Rule.
Grouping Rule:The grouping rule setups decide the linking columns in lines and the
distribution tables.

Confidential

10

Autoinvoice Interface

The above screen shows the grouping rule for a credit memo and has
interface_line_attribute1, interface_line_attribute2, interface_line_attribute3 and
interface_line_attribute4 columns that are used to group an invoice . Hence when a
line is entered in ra_interface_lines_all table with invoice line and header
information,it must contain data in these four line attributes.When the related account
information for this line from the lines interface table , is entered in the distribution
table with the required account information ,It must contain the data in these four line
attributes that has same values as entered in the lines table .This is how the data in the
ra_interface_lines_all is linked to the data in the ra_interface_distributions_all.
Similarly, the same rule is also followed in case there is a data to be entered in
ra_interface_sales_credits table which is the optional table in Autoinvoice import.

Run the standard AUTOINVOICE program.


1) Once the validated data without errors is loaded into the standard AR
interface tables, run the Autoinvoice Import Program from the oracle
applications front end to load the data in the base tables.Following are
the base tables hit by Autoinvoice import.

RA_CUSTOMERS_TRX_ALL
RA_BATCHES_ALL
RA_CUSTOMER_TRX_LINES_ALL
RA_CUST_TRX_LINE_GL_DIST_ALL

Confidential

11

Autoinvoice Interface

Conclusion
This Document explains the standard way to load the AR invoices and also
touches the mandatory setup of Grouping Rule needed for the proper functioning of this
interface.There is also an option available to load the invoices using are APIs.The
invoice once loaded can be then Validated and completed to affect the balances.

Confidential

12

Autoinvoice Interface

Acknowledgements

Confidential

13

Autoinvoice Interface

References

http://www.orafaq.com/wiki/SQL*Loader_FAQ
http://www.geekinterview.com/question_details/19355
https://metalink.oracle.com/

Confidential

14

Das könnte Ihnen auch gefallen