You are on page 1of 43

Oracle Interface Methodology

Stone Apple Solutions Pte Ltd


OBJECTIVE

To learn how to develop Interfaces in


Oracle E-Business Suite using the standard APIs
or Open Interfaces available in Oracle
PRE-REQUISITE

• Knowledgeable in SQL and PL/SQL


• Familiar with Oracle E-Business Suite
navigation
DAY 1
• Introduction
– Overview
– Types of Interfaces
– Types of Inbound Interfaces
– Common Interfacing Approach
• Interface Components
– Loader Program
– Database Link
DAY 1
– Exception Handling
– Interface Summary Report
– Lab : Create a Loader Program

• Developing Interface using the Oracle


standard API
• Supplier Master Interface
• Lab : Create Supplier Master Interface
DAY 2

• Developing Interface using the Oracle


standard Open Interface
– AP Payables Open Interface
– Lab : Create AP Payables Open Interface
INTRODUCTION

What is an interface?
- Interface is a communication channel that
allows the data to move in and out of the
system.
- acts as a medium to transfer the data from one
module to another module or to transfer the
data from legacy system into Oracle
Applications.
TYPES OF INTERFACES

Inbound Interface
Allows data to get into oracle application from
outside systems

Outbound Interface
Allows to get data from oracle applications to
other systems -- like reporting
TYPES OF INBOUND
INTERFACES
1.Open interfaces—wadah komunikasi antara populate

2.API's(Application Program Interface)

3.EDI(Electronic Data interchange)--Mainly used for


automation transactions with third party systems.
Ditengah sebagai jembatan antara adaya yang akan
dikirim ke

4.XML GATEWAY --Mainly used for automation


transactions with third party systems
TYPES OF INBOUND
INTERFACES
5.WEBADI--Used for uploading data from excel
with the scope to have some validations--mainly
used for one time loading..Just like
sqlloader+validation program.

6.PLSQL Packages for Reading XML Data--Use


this in case of importing non standard
transactions
COMMON INTERFACING
APPROACH
• A typical path to transfer the data from Legacy
System to Oracle Apps
INTERFACE COMPONENTS

• Interface Components
– SQL* Loader Program  Load data
– DB Links  Load data
– Exception Handling  Validasi
– Interface Summary Report (Processed,
Exceptions)  Generate report
SQL* LOADER PROGRAM
- the primary method for quickly populating
Oracle tables with data from external files.
- Uses text files (csv, tab delimited, etc.) with
data and a so called control file (ctl)
- SQL*Loader program has a log file to give an
overview of the process, a bad file of records
that caused errors in the process, and a
discard file for records that were not selected
during the load.
SQL* LOADER PROGRAM
CONTROL FILE

• tells the system how to import the text file


with data.
• describes the table and columns to be loaded,
what the separator is of the incoming file etc.
SQL* LOADER PROGRAM

• Sample command line syntax for SQL*Loader :

sqlldr
db_user/db_password@host:port/sid
control=control_file_name.ctl
log=log_file_name.log
bad=bad_file_name.bad
data=data_file_name.csv
SQL* LOADER PROGRAM

SQL*Loader can be executed by starting a


special concurrent program created in Oracle E-
Business Suite. The following are needed:

1) A text file with data


2) A control file
EXAMPLE OF CONTROL FILE

SKIP = 1
LOAD DATA
INFILE 'data_file_name.csv‘ hanya
ditulis ketika
mau hardcode.
BADFILE 'data_file_name.bad'
REPLACE INTO TABLE
XXCUSTOM.YOUR_CUSTOM_TABLE
FIELDS TERMINATED BY "," OPTIONALLY
ENCLOSED BY '"'
TRAILING NULLCOLS
(
COLUMN1,COLUMN2,COLUMN3,...
EXAMPLE OF CONTROL FILE
SKIP=1
Tells SQL*Loader to exclude row 1 in the data file (to
exclude the headers)

INFILE
Specifies the name of the incoming text file data

BADFILE
Determines the bad file generated for any errors
occured during the load.
EXAMPLE OF CONTROL FILE

REPLACE
This command will first truncate the table and than add
the records. If you change this in an APPEND command
the records will be added only to the table specified
without truncating first

FIELDS TERMINATED BY
Determines the separator used in the text file data
EXAMPLE OF CONTROL FILE
OPTIONALLY ENCLOSED BY
Determines an additional enclosing character like for
example " if you're adding data which contains the
column separator used

TRAILING NULLCOLS
Is used to treat any missing data in the csv file as NULL
for the table to be loaded

COLUMN1, COLUMN2, COLUMN3, ...


Gives the column names to be loaded
INTERFACE COMPONENTS

Database Link - a schema object in one database that


enables you to access objects on another database.

Exception Handling - lets you "bulletproof" your


program so that it can continue operating in the
presence of errors.

Interface Summary Report - This report is used to


review detailed information for each import during
each open interface import.
LAB 1

• Create a SQL*Loader program


 Control file creation.
 Control file migration to Application Server
 SQL*Loader Concurrent Program registration
 Running the program with input data file.
1. Register Executable
2. Put the control file in $XXVIS_TOP/bin
3. Register Concurrent program
4. Create 1 parameter for file name
5. Regsiter into request group
6. Put the csv file in $XXVIS_TOP/bin
23
Developing Interface
Using the Oracle
standard API
APIs

Application Programming Interface (APIs)

• a collection of ‘Black Box’ interfaces that


provide programmatic access into the Oracle
ERP database.
• Can be Public or Private API
APIs
API Parameters

• can be categorized into IN, OUT, and IN OUT


• IN parameters that have a default defined do
not need to be passed to the API call
• OUT parameters must remain null but
declared and passed in the API call
• IN OUT – need you to be aware of the setup to
identify which must remain null and which
must pass a value in the call to the API.
Debugging API Issues

• Return status and message may not be


sufficient to understand the actual cause of
the error during API execution. Hence need to
collect FND log messages for the API execution
process in order to analyze the issue in detail.
LAB 2

• Create Supplier Master Interface


 Create a Interface package with the API to create
Supplier Master
 Add a new data column to be included for
interfacing.
 Modify Interface package to allow update of the
Supplier Master.

29
DAY 2

Developing Interface Using


the Oracle Open Interface
OPEN INTERFACES
PAYABLES OPEN INTERFACE

The Payables Open Interface program


• Creates Payables invoices from invoice data in the
Payables Open Interface Tables.

• It validates each record you select for import, and if


the record contains valid data, then the program
creates a Payables invoice with distributions and
scheduled payments based on the invoice
header and line information in the record.
PAYABLES OPEN INTERFACE
PAYABLES OPEN INTERFACE

Required Columns for Importing Simple Invoices (R12)


Table: AP_INVOICE_INTERFACE
Column Name Validation
Populated from
INVOICE_ID AP_INVOICES_INTERFACE_S.NEXTVAL
INVOICE_NUM Must be unique to the supplier
VENDOR_ID or VENDOR_NUM or An active vendor. Validated against
VENDOR_NAME PO_VENDORS
An active pay site. Validated against
VENDOR_SITE_ID or VENDOR_SITE_CODE PO_VENDOR_SITES
Positive amount for 'STANDARD' type,
INVOICE_AMOUNT Negative amount for 'CREDIT' type
Required in Multi-Org Environment.
Validated against
ORG_ID AP_SYSTEM_PARAMETERS.ORG_ID
Must be in
SELECT lookup_code
FROM ap_lookup_codes
SOURCE WHERE lookup_type = 'SOURCE'
PAYABLES OPEN INTERFACE

Required Columns for Importing Simple Invoices (R12)


Table: AP_INVOICE_LINES_INTERFACE
LINE_TYPE_LOOKUP_CODE = 'ITEM'
Column Name Validation

INVOICE_ID Populated from AP_INVOICES_INTERFACE.INVOICE_ID

INVOICE_LINE_ID Populated from AP_INVOICE_LINES_INTERFACE_S.NEXTVAL


LINE_NUMBER A unique number to the invoice
LINE_TYPE_LOOKUP_CODE 'ITEM'

AMOUNT

ACCOUNTING_DATE Optional. Defaulted from INVOICE_DATE or SYSDATE

Validated against
- 'Parent' must be 'No' for All the segments values
- DIST_CODE_CONCATENATED needs to meet the security rules
- DIST_CODE_COMBINATION_ID must be in
SELECT code_combination_id
FROM gl_code_combinations
WHERE account_type = 'E'
AND enabled_flag = 'Y'
AND summary_flag = 'N'
DIST_CODE_CONCATENATED or AND SYSDATE BETWEEN NVL(start_date_active, SYSDATE - 1)
DIST_CODE_COMBINATION_ID AND NVL(end_date_active, SYSDATE + 1)
PAYABLES OPEN INTERFACE

Base Tables:
• AP_INVOICES_ALL
• AP_INVOICE_LINES_ALL
• AP_INVOICE_DISTRIBUTIONS_ALL
PAYABLES OPEN INTERFACE

PAYABLES OPEN INTERFACE IMPORT


PARAMETERS
PAYABLES OPEN INTERFACE

Mandatory Parameters
1. Source - It can be any of the below list:

• Invoice Gateway - Invoice records you entered in the Invoice


Gateway window
• E-Commerce Gateway- Supplier invoices transferred through EDI
• Credit Card- Procurement cards transactions from the credit card
issuer
• Property Manager- Lease invoices from Oracle Property Manager.
• Oracle Assets- Lease payments from Oracle Assets.
• User-defined- For invoice loaded from legacy Systems
PAYABLES OPEN INTERFACE

Mandatory Parameters
2. Invoice Batch Name
– Use Batch Control Payables Profile option need to be
enabled to use this parameter

– Payables groups the invoices created from the invoice


records you import and creates an invoice batch with
the batch name you enter

– While Re-importing the error invoices make sure the


batch name remains the same
PAYABLES OPEN INTERFACE

The Output:
PAYABLES OPEN INTERFACE

The imported invoice becomes available for


review in Invoices Workbench:
LAB 3

• Create AP Payables Open Interface


 Data Insertion to the Interface tables using
custom Interface package
 Reprocessing of the stuck records in the Interface
table.

42
END

Thank You

43

You might also like