Sei sulla pagina 1di 11

Payables Open interface Import in Oracle apps R12

Different Sources that can load data into Open invoice import interface tables
1. Quick Invoices window
2. Oracle e-Commerce Gateway
3. Credit Card transaction data
4. Property Manager
5. The Oracle Assets Export Lease Payments to Payables process
6. Oracle XML Gateway
7. SQL*Loader OR BPEL Interfaces can load invoice information from Legacy Systems
8. Invoices that your suppliers entered and submitted online via Oracle iSupplier Portal
Interface Tables:
AP_INVOICES_INTERFACE
AP_INVOICE_LINES_INTERFACE
Base Tables:
AP_INVOICES_ALL
AP_INVOICE_LINES_ALL
AP_INVOICE_DISTRIBUTIONS_ALL
(&)
Payment Tables
Basic Process:
The Payables Open Interface program 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 lineinformation in the record.
Records in the AP_INVOICE_LINES_INTERFACE table create one or more invoice distributions.
Note that one row may create more than one distribution. For example, if you enter a Tax line in
this table and prorate it across three Item lines, during Open Interface Import the system will
create three Tax invoice distributions based on the single Tax line in this table.

Below diagram will give you the brief description of “Payables open interface import” programs
process.

required and optional columns in the payables invoice import tables for importing PO Matched
Invoices.
Table: AP_INVOICE_INTERFACE
Required Columns

Column Name Validation


Populated from
AP_INVOICES_INTERFACE_S.NEXTV
INVOICE_ID AL
INVOICE_NUM Must be unique to the supplier
An approved, not cancelled, not
PO_NUMBER closed or final closed PO
VENDOR_ID or VENDOR_NUM An active vendor. Validated against
or VENDOR_NAME PO_VENDORS
VENDOR_SITE_ID or An active pay site. Validated
VENDOR_SITE_CODE against PO_VENDOR_SITES
Positive amount for 'STANDARD'
INVOICE_AMOUNT type, 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';
Optional Columns
Column Name Validation
INVOICE_DATE Defaulted to SYSDATE
INVOICE_TYPE_LOOKUP_CODE Defaulted to 'STANDARD'. It can be
'STANDARD' or 'CREDIT'

INVOICE_CURRENCY_CODE Defaulted from PO_VENDOR_SITES.


INVOICE_CURRENCY_CODE
Defaulted from
EXCHANGE_RATE_TYPE AP_SYSTEM_PARAMETERS.
DEFAULT_EXCHANGE_RATE_TYPE
TERMS_ID or Defaulted from
TERMS_NAME PO_VENDOR_SITES.TERMS_ID
DOC_CATEGORY_CODE Only populated if using automatic
voucher number

PAYMENT_METHOD_LOOKUP_C Defaulted from PO_VENDOR_SITES


ODE .PAYMENT_METHOD_LOOKUP_CODE

Defaulted from PO_VENDOR_SITES.


PAY_GROUP_LOOKUP_CODE PAY_GROUP_LOOKUP_CODE
Defaulted from PO_VENDOR_SITES.
ACCTS_PAY_CODE_COMBINATI ACCTS_PAY_CODE_COMBINAITON_I
ON_ID D
GROUP_ID Group identifier. Suggest to use it
STATUS DO NOT POPULATE IT
Table: AP_INVOICE_LINES_INTERFACE
Required Columns
Column Name Validation

Populated from
AP_INVOICES_INTERFACE.INVOICE_I
INVOICE_ID D
Populated from
AP_INVOICE_LINES_INTERFACE_S.
INVOICE_LINE_ID NEXTVAL
LINE_NUMBER A unique number to the invoice
Validated against
TAX_CODE or TAX_CODE_ID AP_TAX_CODES_ALL
LINE_TYPE_LOOKUP_CODE
'ITEM'
Should be QUANTITY_INVOICED *
AMOUNT UNIT_PRICE
If MATCH_OPTION is 'P', then populate
For Blanket Release only,
RELEASE_NUM or validated against
PO_RELEASE_ID PO_RELEASES_ALL
PO_NUMBER or PO_HEADER_ID Validated against PO_HEADER_ALL
PO_LINE_NUMBER or
PO_LINE_ID Validated against PO_LINES_ALL
PO_SHIPMENT_NUM or Validated against
PO_LINE_LOCATION_ID PO_LINE_LOCATIONS_ALL
If MATCH_OPTION is 'R', then populate
Validated against
RECEIPT_NUMBER RCV_SHIPMENT_HEADERS.RECEIPT_
NUM
RCV_TRANSACTION_ID or Validated against
PO_LINE_LOCATION_ID RCV_TRANSACTIONS
Optional Columns
Column Name Validation
Populated if different
QUANTITY_INVOICED from PO shipment
Populated if different
UNIT_PRICE from PO shipment
'P' or 'R' or Defaulted from
MATCH_OPTION PO_VENDOR_SITES.MATCH_OPTION
Defaulted from INVOICE_DATE or
ACCOUNTING_DATE SYSDATE
FINAL_MATCH_FLAG Populated 'Y' if it is final matching
Validated against
INVENTORY_ITEM_ID PO_LINES.INVENTORY_ITEM_ID
Validated against
PO_LINES.INVENTORY_ITEM_DESCRIP
INVENTORY_DESCRIPTION TION
Populated if different
SHIP_TO_LOCATION_CODE from PO shipment
PRICE_CORRECTION_FLAG Populated 'Y' if it is price correction

required and optional columns in the payables invoice import tables


for importingsimple invoices i.e. not matched with any PO or Project Related.
Table: AP_INVOICE_INTERFACE
Required Columns
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
VENDOR_SITE_ID or An active pay site. Validated against
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'
Optional Columns
Column Name Validation
INVOICE_DATE Defaulted to SYSDATE
INVOICE_TYPE_LOOKUP_CODE Defaulted to 'STANDARD'.
It can be 'STANDARD' or 'CREDIT'
Defaulted from
INVOICE_CURRENCY_CODE PO_VENDOR_SITES.INVOICE_CURRENCY_C
ODE

EXCHANGE_RATE_TYPE Defaulted from AP_SYSTEM_PARAMETERS.


DEFAULT_EXCHANGE_RATE_TYPE
TERMS_ID or Defaulted from
TERMS_NAME PO_VENDOR_SITES.TERMS_ID
DOC_CATEGORY_CODE Only populated if using automatic
voucher number

PAYMENT_METHOD_LOOKUP_C Defaulted from PO_VENDOR_SITES.


ODE PAYMENT_METHOD_LOOKUP_CODE
Defaulted from
PO_VENDOR_SITES.PAY_GROUP_LOOKUP_
PAY_GROUP_LOOKUP_CODE CODE

ACCTS_PAY_CODE_COMBINATI Defaulted from PO_VENDOR_SITES


ON_ID .ACCTS_PAY_CODE_COMBINAITON_ID
GROUP_ID Group identifier. Suggest to use it
STATUS DO NOT POPULATE IT
Table: AP_INVOICE_LINES_INTERFACE
LINE_TYPE_LOOKUP_CODE = 'ITEM'
Required Columns
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'
AND SYSDATE BETWEEN NVL(start_date_active, SYSDATE
- 1)
DIST_CODE_CONCATENATED or AND NVL(end_date_active, SYSDATE +
DIST_CODE_COMBINATION_ID 1)
LINE_TYPE_LOOKUP_CODE = 'TAX'
Required Columns
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
TAX_CODE or TAX_CODE_ID Validated against AP_TAX_CODES_ALL
LINE_TYPE_LOOKUP_CODE
'TAX'
AMOUNT

ACCOUNTING_DATE Optional. Defaulted from INVOICE_DATE orSYSDATE


Optional.
Defaulted from AP_TAX_CODES.TAX_CODE_COMBINATION_ID.
If one of them is populated, then 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'
AND SYSDATE BETWEEN NVL(start_date_active, SYSDATE - 1
DIST_CODE_CONCATENATED or )
DIST_CODE_COMBINATION_ID AND NVL(end_date_active, SYSDATE + 1)

LINE_TYPE_LOOKUP_CODE = 'FREIGHT'
Required Columns
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_CO
DE 'FREIGHT'
AMOUNT

ACCOUNTING_DATE Optional. Defaulted from INVOICE_DATE or SYSDATE

Optional. Defaulted from AP_SYSTEM_PARAMETERS.


FREIGHT_CODE_COMBINATION_ID. If one of them is populated,
then 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'
DIST_CODE_CONCATENAT AND summary_flag = 'N'
ED or AND SYSDATE BETWEEN NVL(start_date_active, SYSDATE - 1
DIST_CODE_COMBINATION )
_ID AND NVL(end_date_active, SYSDATE + 1)
information about the parameters related to “Payables Open Interface
Import” Program. Info from R12.1.1 instance.

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
 Oracle Property Manager- Lease invoices from Oracle Property Manager.
 Oracle Assets- Lease payments from Oracle Assets.
 User-defined- For invoice loaded from legacy Systems
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
Optional Parameters:
3. Operating Unit: Filtering predicate when null import program process invoice from all
operating units.
4. Hold Name: When this parameter is provided with the hold name, then the import
program creates the invoices and blocks them with mentioned hold.
5. Hold Reason: Corresponds to Hold Name
6. GL Date: This value is used as a GL date for the invoices whose GL_DATE columnsin
interface tables are not populated.
7. Purge. Enter Yes if you want Payables to delete from the Payables Open Interface
tables all successfully imported invoice records that match the Source and Group ID of
this import
8. Summarize Report: Provides a Summarize report when ‘YES’

Below insert script will insert the minimal information required for creating a invoice
through Payables open interface import program.
Change the values used in the script as per the comments given. We have tested this
script in R12.1.1 instance.

<< Inserting into AP_INVOICES_INTERFACE>>

INSERT
INTO ap_invoices_interface
(
invoice_id,
invoice_type_lookup_code,
invoice_date,
vendor_id,
vendor_site_id,
invoice_amount,
source,
org_id
)
VALUES
(
AP_INVOICES_INTERFACE_S.NEXTVAL
,'STANDARD'
,SYSDATE --
,3003 --,
,106 --,
,100 --
,'TEST' -- It can be retrived by following query
--(select lookup_code
--from ap_lookup_codes
--where lookup_type='SOURCE')
,823
);

<< Inserting into AP_INVOICE_LINES_INTERFACE>>

INSERT
INTO ap_invoice_lines_interface
(
invoice_id,
invoice_line_id,
line_number,
line_type_lookup_code,
amount,
accounting_date,
dist_code_combination_id
)
VALUES
(
AP_INVOICES_INTERFACE_S.CURRVAL
,AP_INVOICE_LINES_INTERFACE_S.NEXTVAL
,1 --,
,'ITEM' --//
,100 -- sum of line_amount should always be equal to invoice_amount,
,SYSDATE
,'612860' --''
);
COMMIT;
After inserting, run the “PAYABLES OPEN INTERFACE IMPORT” program to load the
invoice.
8.AP invoice interface: This interface helps us to import vendor invoices into Oracle applications from external systems
into Oracle Applications.

Pre-requisites:
Set of Books
Code combinations
Employees
Lookups

Interface tables:
AP_INVOICES_INTERFACE
AP_INVOICE_LINES_INTERFACE

Base tables:
AP_INVOICES_ALL – header information
AP_INVOICE_DISTRIBUTIONS_ALL – lines info

Concurrent program: Payables Open Interface Import


Validations:
Check for valid vendor
Check for Source, Location, org_id, currency_code’s validity
Check for valid vendor site code.
Check if record already exists in payables interface table.

Some important columns that need to be populated in the interface tables:


AP_INVOICES_INTERFACE:
INVOICE_ID
INVOICE_NUM
INVOICE_DATE
VENDOR_NUM
VENDOR_SITE_ID
INVOICE_AMOUNT
INVOICE_CURRENCY_CODE
EXCHANGE_RATE
EXCHANGE_RATE_TYPE
EXCHANGE_DATE
DESCRIPTION
SOURCE
PO_NUMBER
PAYMENT_METHOD_LOOKUP_CODE
PAY_GROUP_LOOKUP_CODE
ATTRIBUTE1 TO 15
ORG_ID

AP_INVOICE_LINES_INTERFACE:
INVOICE_ID
INVOICE_LINE_ID
LINE_TYPE_LOOKUP_CODE
AMOUNT
DESCRIPTION
TAX_CODE
PO_NUMBER
PO_LINE_NUMBER
PO_SHIPMENT_NUM
PO_DISTRIBUTION_NUM
PO_UNIT_OF_MEASURE
QUANTITY_INVOICED
DIST_CODE_CONCATENATED
DIST_CODE_COMBINATION_ID
ATTRIBUTE1
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5
ORG_ID

==================================================================

Potrebbero piacerti anche