Constraints, indexes, Table Structure

AP_INVOICES_ALL: Invoice Table in Oracle

AP_Invoices_All table is an integral part of P2P cycle in Oracle. In this post we shall talk about the AP invoice table structure in Oracle Fusion Finance. But before that a very basic question: why is Payable Invoice used for in the first place. Simple answer: To pay the suppliers for the items/ services you bought from them, most probably using a purchase order. Table name is AP_INVOICES_ALL & primary key is invoice_id. As you know an AP Invoice contains the invoices from the vendors who your company is supposed to pay. it means that every combination of supplier and invoice number will give you a unique row in this table . This post contains the information about:
1. Table Columns
2. Indexes

By the way, Here ( India) or Here ( Other Geographies) are few UNCONVENTIONAL tricks which I have learnt to improve the performance of BI reports or SQL queries. Try them only when nothing else works.. kind of SOS...
https://www.amazon.in/gp/product/B093CC1CLD?ie=UTF8&tag=oraclebytes-21&camp=3638&linkCode=xm2&creativeASIN=B093CC1CLD

AP_Invoices_All has the unique key on invoice_id. Use it if possible to enhance the performance.

AP_INVOICES_ALL is the parent table of AP_INVOICE_LINES_ALL table which is used to store the Invoice Line Details.

There can be only one record for the combination of Supplier and the invoice number. To get the details of the supplier, click here .

Of course the end objective to create an AP Invoice is to make the payments, in case you are looking for the query to fetch the payment details, click here.

Want to know the accounting details of the Invoice, this post can help you.

Looking for account related info, most probably ap_invoice_distributions_all is your table.

Table Columns

COLUMN NAMEDATA TYPEDATA LENGTHNULLABLE
 INVOICE_IDNUMBER22
 LAST_UPDATE_DATETIMESTAMP(6)11
 LAST_UPDATED_BYVARCHAR2256
 VENDOR_IDNUMBER22
 INVOICE_NUMVARCHAR2200
 SET_OF_BOOKS_IDNUMBER22
 INVOICE_CURRENCY_CODEVARCHAR260
 PAYMENT_CURRENCY_CODEVARCHAR260
 PAYMENT_CROSS_RATENUMBER22
 INVOICE_AMOUNTNUMBER22
 VENDOR_SITE_IDNUMBER22
 AMOUNT_PAIDNUMBER22
 DISCOUNT_AMOUNT_TAKENNUMBER22
 INVOICE_DATEDATE7
 SOURCEVARCHAR2100
 INVOICE_TYPE_LOOKUP_CODEVARCHAR2100
 DESCRIPTIONVARCHAR2960
 BATCH_IDNUMBER22
 AMOUNT_APPLICABLE_TO_DISCOUNTNUMBER22
 TERMS_IDNUMBER22
 TERMS_DATEDATE7
 PAYMENT_METHOD_LOOKUP_CODEVARCHAR2100
 PAY_GROUP_LOOKUP_CODEVARCHAR2100
 ACCTS_PAY_CODE_COMBINATION_IDNUMBER22
 PAYMENT_STATUS_FLAGVARCHAR24
 CREATION_DATETIMESTAMP(6)11
 CREATED_BYVARCHAR2256
 BASE_AMOUNTNUMBER22
 LAST_UPDATE_LOGINVARCHAR2128
 EXCLUSIVE_PAYMENT_FLAGVARCHAR24
 PO_HEADER_IDNUMBER22
 FREIGHT_AMOUNTNUMBER22
 GOODS_RECEIVED_DATEDATE7
 INVOICE_RECEIVED_DATEDATE7
 VOUCHER_NUMVARCHAR2200
 APPROVED_AMOUNTNUMBER22
 RECURRING_PAYMENT_IDNUMBER22
 EARLIEST_SETTLEMENT_DATEDATE7
 DOC_SEQUENCE_IDNUMBER22
 DOC_SEQUENCE_VALUENUMBER22
 DOC_CATEGORY_CODEVARCHAR2120
 ATTRIBUTE1 –  ATTRIBUTE15VARCHAR2600
 ATTRIBUTE_CATEGORYVARCHAR2600
 APPROVAL_STATUSVARCHAR2100
 APPROVAL_DESCRIPTIONVARCHAR2960
 POSTING_STATUSVARCHAR260
 CANCELLED_DATEDATE7
 CANCELLED_BYVARCHAR2256
 CANCELLED_AMOUNTNUMBER22
 TEMP_CANCELLED_AMOUNTNUMBER22
 USSGL_TRANSACTION_CODEVARCHAR2120
 USSGL_TRX_CODE_CONTEXTVARCHAR2120
 PROJECT_IDNUMBER22
 TASK_IDNUMBER22
 EXPENDITURE_TYPEVARCHAR2120
 EXPENDITURE_ITEM_DATEDATE7
 PA_QUANTITYNUMBER22
 EXPENDITURE_ORGANIZATION_IDNUMBER22
 PA_DEFAULT_DIST_CCIDNUMBER22
 PAYMENT_AMOUNT_TOTALNUMBER22
 AWT_FLAGVARCHAR24
 AWT_GROUP_IDNUMBER22
 REFERENCE_1VARCHAR2120
 REFERENCE_2VARCHAR2120
 ORG_IDNUMBER22
 PRE_WITHHOLDING_AMOUNTNUMBER22
 GLOBAL_ATTRIBUTE_CATEGORYVARCHAR2600
 GLOBAL_ATTRIBUTE1 –  GLOBAL_ATTRIBUTE20VARCHAR2600
 GLOBAL_ATTRIBUTE_NUMBER1 –  GLOBAL_ATTRIBUTE_NUMBER5NUMBER22
 ATTRIBUTE_NUMBER1 –  ATTRIBUTE_NUMBER5NUMBER22
 GLOBAL_ATTRIBUTE_DATE1 – GLOBAL_ATTRIBUTE_DATE5DATE7
 ATTRIBUTE_DATE1 –  ATTRIBUTE_DATE5DATE7
 PAYMENT_CROSS_RATE_TYPEVARCHAR2120
 PAYMENT_CROSS_RATE_DATEDATE7
 PAY_CURR_INVOICE_AMOUNTNUMBER22
 MRC_BASE_AMOUNTVARCHAR24000
 MRC_EXCHANGE_RATEVARCHAR24000
 MRC_EXCHANGE_RATE_TYPEVARCHAR24000
 MRC_EXCHANGE_DATEVARCHAR24000
 MRC_POSTING_STATUSVARCHAR24000
 GL_DATEDATE7
 AWARD_IDNUMBER22
 PAID_ON_BEHALF_EMPLOYEE_IDNUMBER22
 AMT_DUE_CCARD_COMPANYNUMBER22
 AMT_DUE_EMPLOYEENUMBER22
 APPROVAL_READY_FLAGVARCHAR24
 APPROVAL_ITERATIONNUMBER22
 WFAPPROVAL_STATUSVARCHAR2200
 REQUESTER_IDNUMBER22
 VALIDATION_REQUEST_IDNUMBER22
 VALIDATED_TAX_AMOUNTNUMBER22
 QUICK_CREDITVARCHAR24
 CREDITED_INVOICE_IDNUMBER22
 DISTRIBUTION_SET_IDNUMBER22
 APPLICATION_IDNUMBER22
 PRODUCT_TABLEVARCHAR2120
 REFERENCE_KEY1 –  REFERENCE_KEY5VARCHAR2600
 TOTAL_TAX_AMOUNTNUMBER22
 SELF_ASSESSED_TAX_AMOUNTNUMBER22
 TAX_RELATED_INVOICE_IDNUMBER22
 TRX_BUSINESS_CATEGORYVARCHAR2960
 USER_DEFINED_FISC_CLASSVARCHAR2960
 TAXATION_COUNTRYVARCHAR2120
 DOCUMENT_SUB_TYPEVARCHAR2960
 SUPPLIER_TAX_INVOICE_NUMBERVARCHAR2600
 SUPPLIER_TAX_INVOICE_DATEDATE7
 SUPPLIER_TAX_EXCHANGE_RATENUMBER22
 TAX_INVOICE_RECORDING_DATEDATE7
 TAX_INVOICE_INTERNAL_SEQVARCHAR2600
 LEGAL_ENTITY_IDNUMBER22
 HISTORICAL_FLAGVARCHAR24
 FORCE_REVALIDATION_FLAGVARCHAR24
 BANK_CHARGE_BEARERVARCHAR2120
 REMITTANCE_MESSAGE1VARCHAR2600
 REMITTANCE_MESSAGE2VARCHAR2600
 REMITTANCE_MESSAGE3VARCHAR2600
 UNIQUE_REMITTANCE_IDENTIFIERVARCHAR21024
 URI_CHECK_DIGITVARCHAR28
 SETTLEMENT_PRIORITYVARCHAR2120
 PAYMENT_REASON_CODEVARCHAR2120
 PAYMENT_REASON_COMMENTSVARCHAR2960
 PAYMENT_METHOD_CODEVARCHAR2120
 DELIVERY_CHANNEL_CODEVARCHAR2120
 QUICK_PO_HEADER_IDNUMBER22
 NET_OF_RETAINAGE_FLAGVARCHAR24
 RELEASE_AMOUNT_NET_OF_TAXNUMBER22
 CONTROL_AMOUNTNUMBER22
 PARTY_IDNUMBER22
 PARTY_SITE_IDNUMBER22
 PAY_PROC_TRXN_TYPE_CODEVARCHAR2120
 PAYMENT_FUNCTIONVARCHAR2120
 CUST_REGISTRATION_CODEVARCHAR2200
 CUST_REGISTRATION_NUMBERVARCHAR2120
 PORT_OF_ENTRY_CODEVARCHAR2120
 EXTERNAL_BANK_ACCOUNT_IDNUMBER22
 VENDOR_CONTACT_IDNUMBER22
 INTERNAL_CONTACT_EMAILVARCHAR24000
 DISC_IS_INV_LESS_TAX_FLAGVARCHAR24
 EXCLUDE_FREIGHT_FROM_DISCOUNTVARCHAR24
 OBJECT_VERSION_NUMBERNUMBER22
 EXCHANGE_RATE_TYPEVARCHAR2120
 EXCHANGE_RATENUMBER22
 EXCHANGE_DATEDATE7
 EMPLOYEE_ADDRESS_CODEVARCHAR260
 INTERCOMPANY_FLAGVARCHAR24
 IMPORT_DOCUMENT_NUMBERVARCHAR2200
 IMPORT_DOCUMENT_DATEDATE7
 CORRECTION_YEARNUMBER22
 CORRECTION_PERIODVARCHAR28
 CHECK_VAT_AMOUNT_PAIDVARCHAR24
 REQUEST_IDNUMBER22
 JOB_DEFINITION_NAMEVARCHAR2400
 JOB_DEFINITION_PACKAGEVARCHAR23600
 TRANSACTION_DEADLINENUMBER22
 MERGE_REQUEST_IDNUMBER22
 BUDGET_DATEDATE7
 DATA_SET_IDNUMBER22
 FUNDS_STATUSVARCHAR2120
 FIRST_PARTY_REGISTRATION_IDNUMBER22
 THIRD_PARTY_REGISTRATION_IDNUMBER22
 ROUTING_ATTRIBUTE1VARCHAR21080
 ROUTING_ATTRIBUTE2VARCHAR21080
 ROUTING_ATTRIBUTE3VARCHAR21080
 ROUTING_ATTRIBUTE4VARCHAR21080
 ROUTING_ATTRIBUTE5VARCHAR21080
 IMAGE_DOCUMENT_NUMVARCHAR2200
 FISCAL_DOC_ACCESS_KEYVARCHAR2200
 REMIT_TO_SUPPLIER_NAMEVARCHAR2960
 REMIT_TO_SUPPLIER_IDNUMBER22
 REMIT_TO_ADDRESS_NAMEVARCHAR2960
 REMIT_TO_ADDRESS_IDNUMBER22
 RELATIONSHIP_IDNUMBER22
 PO_MATCHED_FLAGVARCHAR24
 VALIDATION_WORKER_IDNUMBER22
 LOCKED_BYVARCHAR2256
 LOCK_TIMETIMESTAMP(6)11
 ROUTING_STATUS_LOOKUP_CODEVARCHAR2120
Table Structure: AP_Invoices_All

Indexes

INDEX NAMEINDEX TYPEUNIQUENESSCOLUMN NAME
 AP_INVOICES_ALL_U1NORMALUNIQUEINVOICE_ID
 AP_INVOICES_ALL_U2NORMALUNIQUEDOC_SEQUENCE_ID
 AP_INVOICES_ALL_U2NORMALUNIQUEDOC_SEQUENCE_VALUE
 AP_INVOICES_ALL_U3NORMALUNIQUEVENDOR_ID
 AP_INVOICES_ALL_U3NORMALUNIQUEINVOICE_NUM
 AP_INVOICES_ALL_U3NORMALUNIQUEORG_ID
 AP_INVOICES_ALL_U3NORMALUNIQUEPARTY_ID
 AP_INVOICES_N1NORMALNONUNIQUEBATCH_ID
 AP_INVOICES_N10NORMALNONUNIQUEPO_HEADER_ID
 AP_INVOICES_N11NORMALNONUNIQUEPROJECT_ID
 AP_INVOICES_N11NORMALNONUNIQUETASK_ID
 AP_INVOICES_N12NORMALNONUNIQUEVOUCHER_NUM
 AP_INVOICES_N16NORMALNONUNIQUEWFAPPROVAL_STATUS
 AP_INVOICES_N17NORMALNONUNIQUEVALIDATION_REQUEST_ID
 AP_INVOICES_N2NORMALNONUNIQUEVENDOR_ID
 AP_INVOICES_N2NORMALNONUNIQUEINVOICE_TYPE_LOOKUP_CODE
 AP_INVOICES_N21FUNCTION-BASED NORMALNONUNIQUESYS_NC00231$
 AP_INVOICES_N21FUNCTION-BASED NORMALNONUNIQUEINVOICE_TYPE_LOOKUP_CODE
 AP_INVOICES_N22NORMALNONUNIQUEPARTY_ID
 AP_INVOICES_N23NORMALNONUNIQUESOURCE
 AP_INVOICES_N23NORMALNONUNIQUEORG_ID
 AP_INVOICES_N23NORMALNONUNIQUEROUTING_ATTRIBUTE5
 AP_INVOICES_N24NORMALNONUNIQUEORG_ID
 AP_INVOICES_N24NORMALNONUNIQUEAPPROVAL_READY_FLAG
 AP_INVOICES_N24NORMALNONUNIQUEVALIDATION_REQUEST_ID
 AP_INVOICES_N24NORMALNONUNIQUEPAYMENT_STATUS_FLAG
 AP_INVOICES_N24NORMALNONUNIQUEHISTORICAL_FLAG
 AP_INVOICES_N25NORMALNONUNIQUEINVOICE_NUM
 AP_INVOICES_N25NORMALNONUNIQUEPARTY_ID
 AP_INVOICES_N25NORMALNONUNIQUEPAYMENT_STATUS_FLAG
 AP_INVOICES_N27NORMALNONUNIQUEDATA_SET_ID
 AP_INVOICES_N28NORMALNONUNIQUELAST_UPDATE_DATE
 AP_INVOICES_N28NORMALNONUNIQUEORG_ID
 AP_INVOICES_N3NORMALNONUNIQUEPAYMENT_STATUS_FLAG
 AP_INVOICES_N3NORMALNONUNIQUEPAY_GROUP_LOOKUP_CODE
 AP_INVOICES_N3NORMALNONUNIQUEORG_ID
 AP_INVOICES_N5NORMALNONUNIQUEINVOICE_DATE
 AP_INVOICES_N5NORMALNONUNIQUEORG_ID
 AP_INVOICES_N7NORMALNONUNIQUEVENDOR_SITE_ID
 AP_INVOICES_N8NORMALNONUNIQUECREATION_DATE
Index Details: AP_Invoices_All

Related Posts:

How To Fetch (Query) The Payment Details In Fusion
Query to fetch the details of a Payment Process Request in Fusion

Accounting Detail Query for AP Invoice

Feedback:
Hope the article helped you. If it did, please rate the post. In case it didn’t, do leave a comment to let us know what did we miss.

Reference:
support.oracle.com

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?