AP Interface Tables Explanation
AP Interface Tables Explanation
INVOICE_ID
INVOICE_NUM
VENDOR_ID or VENDOR_NUM
or VENDOR_NAME
VENDOR_SITE_ID or
VENDOR_SITE_CODE
INVOICE_AMOUNT
ORG_ID
SOURCE
Columns
Column Name
Validation
Populated from
AP_INVOICES_INTERFACE_S.NEXT
VAL
Must be unique to the supplier
An active vendor. Validated
against PO_VENDORS
An active pay site. Validated
against PO_VENDOR_SITES
Positive amount for 'STANDARD'
type, Negative amount for
'CREDIT' type
Required in Multi-Org
Environment. Validated against
AP_SYSTEM_PARAMETERS.ORG_I
D
Must be in
SELECTlookup_code
FROMap_lookup_codes
WHERElookup_type='SOURCE'
Validation
INVOICE_DATE
INVOICE_TYPE_LOOKUP_CO
DE
Defaulted to SYSDATE
Defaulted to 'STANDARD'.
It can be 'STANDARD' or 'CREDIT'
INVOICE_CURRENCY_CODE
Defaulted from
PO_VENDOR_SITES.INVOICE_CURRE
NCY_CODE
EXCHANGE_RATE_TYPE
TERMS_ID or
TERMS_NAME
Defaulted from
AP_SYSTEM_PARAMETERS.
DEFAULT_EXCHANGE_RATE_TYPE
Defaulted from
PO_VENDOR_SITES.TERMS_ID
Op
tional
DOC_CATEGORY_CODE
PAYMENT_METHOD_LOOKUP
_CODE
PAY_GROUP_LOOKUP_CODE
Defaulted from
PO_VENDOR_SITES.PAY_GROUP_LO
OKUP_CODE
ACCTS_PAY_CODE_COMBINA
TION_ID
GROUP_ID
STATUS
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
LINE_NUMBER
LINE_TYPE_LOOKUP_CODE
Populated from
AP_INVOICE_LINES_INTERFACE_S.NEXTV
AL
A unique number to the invoice
'ITEM'
AMOUNT
ACCOUNTING_DATE
DIST_CODE_CONCATENAT
ED or
DIST_CODE_COMBINATION
_ID
ANDNVL(end_date_activ
e,SYSDATE+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
A unique number to the invoice
LINE_NUMBER
TAX_CODE or
TAX_CODE_ID
LINE_TYPE_LOOKUP_CO
DE
AMOUNT
ACCOUNTING_DATE
Optional.
Defaulted from
AP_TAX_CODES.TAX_CODE_COMBINATION_I
D. 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
DIST_CODE_CONCATENA
TED or
DIST_CODE_COMBINATI
ON_ID
SELECTcode_combination_id
FROMgl_code_combinations
WHEREaccount_type='E'
ANDenabled_flag='Y'
ANDsummary_flag='N'
ANDSYSDATEBETWEENNVL(start_date_active
,SYSDATE1)
ANDNVL(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
LINE_NUMBER
LINE_TYPE_LOOKUP_
CODE
AMOUNT
ACCOUNTING_DATE
Populated from
AP_INVOICE_LINES_INTERFACE_S.NEXTVA
L
A unique number to the invoice
'FREIGHT'
DIST_CODE_CONCATEN
ATED or
DIST_CODE_COMBINAT
ION_ID
SELECTcode_combination_id
FROMgl_code_combinations
WHEREaccount_type='E'
ANDenabled_flag='Y'
ANDsummary_flag='N'
ANDSYSDATEBETWEENNVL(start_date_activ
e,SYSDATE1)
ANDNVL(end_date_active,
SYSDATE+1)
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
2.
3.
4.
5.
6.
7.
8.
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
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:
Operating Unit: Filtering predicate when null import program process
invoice from all operating units.
Hold Name: When this parameter is provided with the hold name, then
the import program creates the invoices and blocks them with mentioned
hold.
Hold Reason: Corresponds to Hold Name
GL Date: This value is used as a GL date for the invoices whose
GL_DATE columnsin interface tables are not populated.
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
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
);