Case Study: Migration of AR
Transactions using Open Interface
Author: Chandan A Kumar
Creation Date: Mar 04, 2009
Last Updated: Mar 14, 2009
Approvals:
Copy Number _____
Mar 14, 2009
Document Control
Change Record
1
Date Author Version Change Reference
Reviewers
Name Position
Distribution
Copy No. Name Location
1
Library Master Project Library
2 Project Manager
3
4
Note To Holders:
If you receive an electronic copy of this document and print it out, please write
your name on the equivalent of the cover page, for document control purposes.
If you receive a hard copy of this document, please write your name on the front
cover, for document control purposes.
Document Control iii
Case Study: Migration of AR Transactions using Open Interface
File Ref: 402346426.doc
Mar 14, 2009
Contents
Document Control..............................................................................................ii
Introduction........................................................................................................1
Purpose.........................................................................................................1
Background..................................................................................................1
Scope and Application..................................................................................1
Audience.......................................................................................................2
Source system..............................................................................................2
Assumptions.................................................................................................2
Pre-Requisites..............................................................................................3
Data Dependencies.......................................................................................3
Business Rules...........................................................................................4
Approach......................................................................................................4
Module List........................................................................................................5
Registering Concurrent Program........................................................................9
Downloading Concurrent Program Script........................................................18
Deployment......................................................................................................19
Extract File Layout...........................................................................................20
Extract File Mapping to Staging Table Columns..............................................21
Calling Custom Concurrent Program...............................................................22
Calling Standard Import Concurrent Program.................................................23
Query interface records....................................................................................24
Error Handling.................................................................................................25
Open and Closed Issues for this Deliverable....................................................26
Open Issues................................................................................................26
Closed Issues..............................................................................................26
Document Control iii
Case Study: Migration of AR Transactions using Open Interface
File Ref: 402346426.doc
Introduction
AR Transactions are the invoices, which has to be sent to customer for the
services provided. It can be of Standard Invoice, Credit Memo, and Debit
Memo etc.
Use the Transaction window to enter the invoices, debit memos, credit memos
and commitments. You can also query and update your transactions in this
window and review your transactions and chargebacks in the Transactions
Summary window.
To enter or query an AR Transaction from front end navigate to Receivables
Responsibility, Select Transactions -> Transactions .
This document demonstrates the use of open interface table for AR
transactions to migrate AR Invoices from source system to Oracle
Applications.
Purpose
This document describes the:
This case study is intended to demonstrate the creation of Standard
Invoice, Credit Memo and Debit Memo.
Detailed data mapping from the source system(s) to the Oracle
Applications E-Business Suite (EBS) Receivables (AR) Transactions
records
File layout to be used for interface.
Approach and technical design for the interface
Background
This case study document is designed to demonstrate a practical scenario that
occurs during implementation of oracle receivables.
Scope and Application
The following boundaries are specific to the Interface of AR Transactions
using RA_INTERFACE_LINES_ALL open interface table
All Invoices, Credit & Debit Memos would be migrated to Oracle
Applications
Document Control iii
File Ref: 402346426.doc
The ‘XX<EMPID>: AR Transactions Interface Program’
uploads AR Transactions data from data file into staging table
“XXAR_INVOICE_IFACE_STG,” and will perform validation and
transfer valid records into Oracle Receivables interface tables. The
standard import program ‘Autoinvoice Import’ is then run to
perform the validation on data in the interface table and load valid
data into base tables.
1. The AR Transactions data will be provided through data files.
This data file will be loaded into staging table(s) on the
Oracle applications database using loader program.
2. The loaded data will be validated from staging tables and
then moved into the standard transaction interface tables.
3. The standard AutoInvoice Import program will be called to
import the transactions from Interface table to Oracle
receivables base tables.
Audience
This document is intended for the following individuals:
This document should be used for demonstration purposes only.
Source system
The implementation team studies the source system and understands the data
required to be migrated to Oracle Applications. This data is then extracted and
cleansed from the source system (this is done by IT team of source system) in
the format as agreed by the client, source system IT team and the
implementation team. The data mapping section describes the data format of
source system to Oracle Applications.
Assumptions
This case study document is based on the following assumptions:
Users have access to Oracle Applications for the following responsibility.
Receivables Manager
System Administrator
Users have access to Oracle Applications server access with write
privilege.
Users have access to Oracle Applications database (apps schema)
Document Control iii
File Ref: 402346426.doc
All the functional setups and master data (as listed in pre-requisites) are
already completed in Oracle Applications.
The extract-file layout must be in the format as specified in the extract
file layout section
Pre-Requisites
Prerequisite set-ups are required for the interface. These setups include,
but are not limited to:
1. Receivables System Options
2. Payment Terms
3. Transaction Types
4. Invoice Sources
5. Invoicing and Accounting Rules
6. Standard Memo Lines
7. Customer Profile Classes
8. System Profile Options for Oracle Receivables
9. Tax Codes and Rates
10. Batch Sources (Setup a batch source with name Test)
Data Dependencies
AR Invoices
In order to migrate AR Transactions the following entities must have been
migrated successfully:
Customers
Items
Business Rules
Following business rules are applicable for the AR Transactions conversion
process.
Document Control iii
File Ref: 402346426.doc
N/A
Approach
Source Extract Data Upload Data Staging Table Create
Applications files
PL/SQL
Package
AR Interface Call custom conc Register package as
Call Standard
Table program for validation conc program
import Program
Affected base tables Oracle Apps
The Approach for migrating AR Transactions data from source system to
Receivables open interface table
1. Extract the data file from source system
2. Load the data file into staging table
3. Using PL/SQL write a package
4. Register the PL/SQL package as concurrent program in Oracle
Applications
5. Call the custom concurrent program for validation and loading the
records available in staging table to open interface table
6. Call the standard import program, which will create the records in
RA_CUSTOMER_TRX_ALL table based on open interface records.
7. Query the records, which got created for interface table and see the
result in Oracle Applications front end.
Document Control iii
File Ref: 402346426.doc
Module List
Concurrent Programs
‘XX<EMPID>: AR Transactions Interface Program’ includes the
following concurrent programs:
‘XX<EMPID>: AR Transactions Interface Program’
The ‘XX<EMPID>: AR Transactions Interface Program’ concurrent
program is based on the stored procedure
XXTEST_AR_INVOICE_PKG.main that is registered as a PL/SQL
executable.
The above program calls loader program (XX<EMPID>: AR
Transactions Interface Loader Program) to load data into
staging tables, performs validations on the staging table data and
uploads data into the open interface tables
(RA_INTERFACE_LINES_ALL).
‘XX<EMPID>: AR Transactions Interface Loader Program’
The ‘XX<EMPID>: AR Transactions Interface Loader Program’
concurrent program is based on the SQL* Loader control file, that is
registered as a Loader executable.
The above program loads data from the path specified as parameter
value in loader concurrent program to the staging table.
NOTE:
1. Change the <EMPID> with your Employee ID,
2. Follow the steps for registering concurrent program from Registering
Concurrent Program section.
Stored Procedures
XXTEST_AR_INVOICE_PKG package consist the following stored
procedures:
XXTEST_AR_INVOICE_PKG.main
This is the main procedure that calls the load, validate, import, print_error
and record_summary procedures.
XXTEST_AR_INVOICE_PKG.validate
Document Control iii
File Ref: 402346426.doc
This procedure performs the necessary validations on the staging tables.
XXTEST_AR_INVOICE_PKG.import
This procedure loads all the valid data from the staging table to Oracle
Receivables interface tables RA_INTERFACE_LINES_ALL
XXTEST_AR_INVOICE_PKG.print_error
This procedure reports the errored records in the log file.
XXTEST_AR_INVOICE_PKG.record_summary
This procedure will display the status of staging table records
NOTE: Please refer the attached documents for Package Specifications and
Package body. Kindly open the attached script in notepad.
XX_AR_INVOICE_PK
G.pks
1. Package Specification:
XX_AR_INVOICE_PK
G.pkb
2. Package Body:
Staging Table
XXAR_INVOICE_IFACE_STG table created in database to store records
from source system data file.
NOTE: Please refer the attached script staging table creation. Kindly open the
attached script in notepad.
XX_AR_INVOICE_TA
B.tab
Table Creation Script:
Grant Script
If table and package are created in custom schema then grant the table and
package to APPS schema
NOTE: Please refer the attached script for table and package granting. Kindly
open the attached script in notepad.
Document Control iii
File Ref: 402346426.doc
XX_AR_INVOICE_PK
G.grt
1. Package Grant Script:
XX_AR_INVOICE_TA
B.grt
2. Table Grant Script:
Synonym Script
If table and package are created in custom schema then grant the package and
create synonym for table and package in APPS schema
NOTE: Please refer the attached script for table and package synonym. Kindly
open the attached script in notepad.
XX_AR_INVOICE_PK
G.syn
1. Package synonym script:
XX_AR_INVOICE_TA
B.syn
2. Table synonym script:
SQL* Loader Script
SQL*Loader is controlled by its own data definition language, which is kept in
the control file. The control file describes the data to be loaded, the destination
tables of the data and describes the interdependency between the data and the
columns within the tables. Which in-turn used to register as a concurrent
program in Oracle Applications to load the data file into staging table.
NOTE: Please refer the attached SQL* Loader script for loading data file into
staging table. Kindly open the attached script in notepad.
XX_AR_INVOICE_LO
AD.ctl
1. SQL* Loader Script:
Install Script
Install script contains UNIX Shell Script and will be used to deploy the objects
attached to this document on Oracle Applications Server.
Following are the object to be deployed on server.
Document Control iii
File Ref: 402346426.doc
1. Package Specification Script
2. Package Body Script
3. Staging Table Script
4. SQL* Loader Script
NOTE: Please refer the attached Install script for deployment of AR
Transactions object on Oracle Applications Server. Kindly open the attached
script in notepad.
XXTESTARINTOIT.ta
r.gz
1. Install Script:
Note: Please prefix your empolyee ID for each object you create and deploy in
Application Server and Database.
A.) Package Name
B.) Table Name
C.) Synonym Name
D.) Concurrent Program Executable.
E.) Concurrent Program Name.
Document Control iii
File Ref: 402346426.doc
Registering Concurrent Program
Registering Interface Loader Concurrent Program
To register a concurrent program for ‘XX<EMPID>: AR Transactions
Interface Loader Program’ in Oracle Applications Navigate to System
Administrator Responsibility
1. Select Concurrent -> Program -> Executable
2. Enter The Following in the Concurrent Program Executable Form
a. Executable Name: Enter unique name for executable.
b. Short Name: Enter unique short name and this short name later
will be use for defining Concurrent Program.
c. Application: Enter the Application Name from List of Values
(LOV), as we are developing an interface program for AR
Transaction so the Application Name should be Custom
Application.
d. Description: Enter the description of Executable
e. Execution Method: Execution method should be SQL*Loader,
because we are registering a concurrent program for loading the
data to staging table.
f. Execution File Name: Here we would be passing the file name of
SQL*Loader control file. As discussed in Module List the control
file name would be XX_AR_INVOICE_LOAD
Document Control iii
File Ref: 402346426.doc
Executable Registering Form
3. Select Concurrent -> Program -> Define
Document Control iii
File Ref: 402346426.doc
4. Enter The Following in the Concurrent Program Form
a. Program Name: Enter “XX<EMPID>: AR Transactions
Interface Loader Program”
b. Short Name: Enter a unique concurrent program short name, for
example: XXARINVOICELOAD
c. Application: Select the value from LOV, as we would be executing
this concurrent program from Receivables Applications so select
Receivables.
d. Description: Enter the description of this concurrent program.
e. Executable Name: Select the executable name from LOV, as we
have already registered an executable for loader program so select
XXARINVOICELOAD from LOV.
f. Executable Method: Executable method will be populated
automatically.
g. Parameters if any: Select the Parameter Button to specify the
parameter list. In our case there should be two parameters we
would be passing. A). Data File
Concurrent Program Form
Document Control iii
File Ref: 402346426.doc
Concurrent Program Parameters Form
Registering Interface Concurrent Program
To register a concurrent program for ‘XX<EMPID>: AR Transactions
Interface Program’ in Oracle Applications Navigate to System Administrator
Responsibility
1. Select Concurrent -> Program -> Executable
Document Control iii
File Ref: 402346426.doc
2 Enter The Following in the Concurrent Program Executable Form
a. Executable Name: Enter unique name for executable.
b. Short Name: Enter unique short name and this short name later
will be use for defining Concurrent Program.
c. Application: Enter the Application Name from List of Values
(LOV), as we are developing an interface program for AR
Transaction so the Application Name should be Custom Application
and add thid concurrent program in Receivables Request Group.
d. Description: Enter the description of Executable
e. Execution Method: Execution method should be PL/SQL Stored
Procedure.
f. Execution File Name: Here we would be passing the package
name with one public procedure. As discussed in Module List the
package name would be XXTEST_AR_INVOICE_PKG and the
public procedure define in this package is main.
Concurrent Program Executable Form
Document Control iii
File Ref: 402346426.doc
3. Select Concurrent -> Program -> Define
4. Enter The Following in the Concurrent Program Form
a. Program Name: Enter “XX<EMPID>: AR Transactions
Interface Program”
b. Short Name: Enter a unique concurrent program short name, for
example: XXARINVOICEMAIN
c. Application: Select the value from LOV, as we would be executing
this concurrent program from Receivables Applications so select
Receivables.
d. Description: Enter the description of this concurrent program.
e. Executable Name: Select the executable name from LOV, as we
have already registered an executable for loader program so select
XXARINVOICEMAIN from LOV.
f. Executable Method: Executable method will be populated
automatically.
g. Parameters if any: Select the Parameter Button to specify the
parameter list. In our case there should be two parameters we
would be passing. A) Data File Path B) Data File Name
Document Control iii
File Ref: 402346426.doc
Concurrent Program Form
Concurrent Program Parameters Form
Document Control iii
File Ref: 402346426.doc
Registering Interface Concurrent Program in Request Group
To register a concurrent program ‘XX<EMPID>: AR Transactions
Interface Program’ in Request Group, Navigate to System Administrator
Responsibility
1. Select Security -> Responsibility-> Request
Document Control iii
File Ref: 402346426.doc
2. Query the Request Group – Receivables All and Applications – Receivables
Request Group Form
3. Add an entry for Concurrent Program in the Request Group and save the
work.
Request Group Form
Document Control iii
File Ref: 402346426.doc
Downloading Concurrent Program Script
After completion of Registering Concurrent program in System Administrator
responsibility, we can download the script for concurrent program and further
it can be used to install in another Application Server.
Before downloading the script of Concurrent Program, connect your local
system to Applications Server
Run the Following Command to download the script
FNDLOAD <Apps User/Apps Pwd> 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afcpprog.lct <File_Name.ldt> PROGRAM
CONCURRENT_PROGRAM_NAME=<Concurrent_Program_Short_Name>
For Example:
To Download the “XX<EMPID>: AR Transactions Interface
Loader Program” script please enter the below command at
unix/linux prompt.
FNDLOAD apps/apps 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afcpprog.lct XXARINVOICELOAD.ldt
PROGRAM CONCURRENT_PROGRAM_NAME =
XXARINVOICELOAD
To Download the “XX<EMPID>: AR Transactions Interface
Program” script please enter the below command at unix/linux
prompt.
FNDLOAD apps/apps 0 Y DOWNLOAD
$FND_TOP/patch/115/import/afcpprog.lct XXARINVOICEMAIN.ldt
PROGRAM CONCURRENT_PROGRAM_NAME =
XXARINVOICEMAIN
Document Control iii
File Ref: 402346426.doc
Deployment
To deploy the attached zip file which contains package, table scripts, grant
script, synonym script, concurrent program script and install script, please
follow the below steps
XXTESTARINTOIT.ta
r.gz
1. Save the attached zip file in local system
2. Transfer the zip to the Oracle Applications Server
3. Create a Staging Directory [E.g. XXTESTARINTOIT] in temporary
area on Oracle Application Server.
4. mkdir -p XXTESTARINTOIT
5. Change the Permissions on the temp directory.
6. chmod 755 XXTESTARINTOIT
7. FTP the XXTESTARINTOIT.tar.gz file in BINARY mode to
directory XXTESTARINTOIT
8. Change directory to XXTESTARINTOIT as given below
9. cd XXTESTARINTOIT
10. Uncompress XXTESTARINTOIT.tar.gz as given below
11. gunzip XXTESTARINTOIT.tar.gz
12. Untar the file XXTESTARINTOIT.tar using
13. tar -xvf XXTESTARINTOIT.tar.gz
14. Grant the execute permission on the install script using
15. chmod 755 XX_AR_INVOICE.install
16. Run XX_AR_INVOICE.install
17. sh XX_AR_INVOICE.install
18. Enter the apps schema user name password (apps/
<apps_pwd>), when asked for.
Document Control iii
File Ref: 402346426.doc
Extract File Layout
Please find the attached extract file for AR Transactions.
Case_Study_AR_TR
X_Extract_Data.csv
Note: Please remove the header row before putting the same file on Oracle
Application Server for loading purpose.
Below is the example of extract file for AR Transactions
Document Control iii
File Ref: 402346426.doc
Extract File Mapping to Staging Table Columns
Data File Columns Datatype Size Staging Table’s Columns
Invoice_class Varchar2 50 Invoice_class
Trx_type Varchar2 20 Trx_type
Trx_num Varchar2 20 Trx_num
Curr_code Varchar2 10 Curr_code
Customer_number Varchar2 30 Customer_number
Location Varchar2 10 Location
Payment_term Varchar2 10 Payment_term
Inventory_item Varchar2 40 Inventory_item
Line_number Number Line_number
Description Varchar2 250 Description
Uom Varchar2 10 Uom
Amount Number Amount
Price Number Price
Quantity Number Quantity
Document Control iii
File Ref: 402346426.doc
Calling Custom Concurrent Program
After installation of all the script attached with this document run the
concurrent program “XX<EMPID>: AR Transactions Interface Program”. To
run the concurrent program navigate to Receivables Responsibility.
Select View Menu -> Request, Submit a new request, and click on single
request and than click OK Button.
SRS Form
1. Select the Concurrent Program name from LOV
2. Enter the parameter value for Data File Path and Data File Name.
3. Click on Submit Button to run the request.
Document Control iii
File Ref: 402346426.doc
Calling Standard Import Concurrent Program
When “XX<EMPID>: AR Transactions Interface Program” completed
successfully, run the standard import program to populate the data from AR
Transaction Interface Table (RA_INTERFACE_LINES_ALL) to Receivables
base table.
The standard Import “Autoinvoice Import” program will fetch the data from
interface table and populate it into the receivables base tables.
Call the “AutoInvoice Import” Program with the following Parameters
a. Transaction Source: Test
b. Default Date: Sysdate
c. Base Due Date on Trx Date: No
Document Control iii
File Ref: 402346426.doc
Query interface records
When “AutoInvoice Import” standard import program completes successfully
navigates to Receivables Responsibility, Select Transactions ->
Transactions and queries the records of interface table.
AR Transaction Form
Document Control iii
File Ref: 402346426.doc
Error Handling
Following error can occur while processing the AR Transaction data file?
1. During loading data into staging table.
o When error occurred while loading the data file using
SQL*Loader concurrent program it generates two files they are
SQL*Loader Bad File: The bad file contains
records that weren't loaded into the staging table. These
records could have been rejected by SQL*Loader due to
an invalid format. Also they could have been rejected by
the Oracle database if they violate an integrity constraint
or had an invalid data type for the staging table.
SQL*Loader Log File: Detailed information about
the load is stored in the log file. Any errors found during
parsing of the control file are stored in the log file. The
log file also identifies the number of records successfully
loaded. The log file must be available during the entire
run of the SQL*Loader. When loading data with
SQL*Loader, nothing should be assumed without
reviewing the log files
2. Validating the records in staging table
o While validating the data in staging table it can complete with
error and the concurrent program will complete with warning,
in this case look into the output report of concurrent program
and correct the data file and re-load it again.
3. While calling the Standard AutoInvoice Import Program
o After populating the records in interface table it again validated
by the standard import program and in few cases it completes
with error or warning, in this case see the output report of
Standard Import Program and correct the data in data file and
re-load it, than re-run the custom concurrent program.
Document Control iii
File Ref: 402346426.doc
Open and Closed Issues for this Deliverable
Open Issues
ID Issue Resolution Responsibility Target Date Impact Date
Closed Issues
ID Issue Resolution Responsibility Target Date Impact Date
Document Control iii
File Ref: 402346426.doc