You are on page 1of 7

AP Interface Tables Explanation

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

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

Only populated if using automatic


voucher number

PAYMENT_METHOD_LOOKUP
_CODE

Defaulted from PO_VENDOR_SITES.


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

Defaulted from PO_VENDOR_SITES


.
ACCTS_PAY_CODE_COMBINAITON_ID
Group identifier. Suggest to use it
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
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

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
SELECTcode_combination_id
FROMgl_code_combinations
WHEREaccount_type='E'
ANDenabled_flag='Y'
ANDsummary_flag='N'
ANDSYSDATEBETWEENNVL(start_date_act
ive,SYSDATE1)

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

Validated against AP_TAX_CODES_ALL


'TAX'

Optional. Defaulted from INVOICE_DATE


orSYSDATE

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'

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

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)

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

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
);

<< 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.

You might also like