OracleFree generatorPDF, Excel, Word exportOracle E-Business Suite

Oracle EBS AP Invoice Interface Template (Payables Open Interface)

The Payables Open Interface lets you load supplier invoices through two staging tables, AP_INVOICES_INTERFACE for headers and AP_INVOICE_LINES_INTERFACE for lines. This generator writes the inserts and a rejection check so you can build a conversion or integration script quickly.

Fill in

Must exist as a value in the SOURCE lookup.

Generated code
Download:

Header insert

INSERT INTO ap.ap_invoices_interface (
  invoice_id, invoice_num, invoice_type_lookup_code, invoice_date,
  vendor_num, vendor_site_code, invoice_amount, invoice_currency_code,
  gl_date, source, org_id, creation_date, created_by, last_update_date, last_updated_by
) VALUES (
  ap_invoices_interface_s.NEXTVAL, 'INV-2026-0001', 'STANDARD', TO_DATE('2026-10-15', 'YYYY-MM-DD'),
  '10045', 'MAIN-US', 1250.00, 'USD',
  TO_DATE('2026-10-31', 'YYYY-MM-DD'), 'XX_LEGACY', 204, SYSDATE, fnd_global.user_id, SYSDATE, fnd_global.user_id
);

Line insert

INSERT INTO ap.ap_invoice_lines_interface (
  invoice_id, invoice_line_id, line_number, line_type_lookup_code,
  amount, description, dist_code_concatenated, accounting_date,
  creation_date, created_by, last_update_date, last_updated_by
) VALUES (
  ap_invoices_interface_s.CURRVAL, ap_invoice_lines_interface_s.NEXTVAL, 1, 'ITEM',
  1250.00, 'Office equipment maintenance October', '01-000-6210-0000-000', TO_DATE('2026-10-31', 'YYYY-MM-DD'),
  SYSDATE, fnd_global.user_id, SYSDATE, fnd_global.user_id
);

Check rejections after import

SELECT i.invoice_num, r.reject_lookup_code, r.parent_table
FROM ap.ap_interface_rejections r
JOIN ap.ap_invoices_interface i ON i.invoice_id = r.parent_id AND r.parent_table = 'AP_INVOICES_INTERFACE'
WHERE i.source = 'XX_LEGACY'
ORDER BY i.invoice_num;

Run the insert in an apps session with the correct operating unit context (fnd_global.apps_initialize and mo_global.set_policy_context) so fnd_global.user_id and org-striped views behave. Then submit the Payables Open Interface Import program with the same source. Column lists vary by release and by features you use (taxes, PO matching, attachments), so verify against the interface table definitions on your version and test in a non-production instance. Free text and numbers here are examples only.

Need help validating a legacy AP load

An optional look at pre-load validation and reconciliation for your Payables conversion.

Optional. The tool and every export work without this. No spam.

How to use the template

Fill in the header values, supplier, site, currency, amount, operating unit and source. The generator produces one header insert, one item line insert and a rejection query. Copy the script into your loader, repeat the line insert for each line, and make sure the sum of line amounts matches the header amount. Then run the Payables Open Interface Import program for the same source and review the output.

  • One header row per invoice
  • One or more lines linked by invoice_id
  • Line amounts should add up to the header amount
  • Use a dedicated source for each interface

How the import works

The Open Interface Import validates each header and line, creates invoices in the base tables and marks processed rows. Rows that fail are not imported and the reasons are recorded in AP_INTERFACE_REJECTIONS with a reject code. You fix the data in the interface table or purge and reload, then run import again. The source value must be defined in the SOURCE lookup, and the supplier, site, currency and distribution account must already exist and be valid for the operating unit.

Common mistakes

Most rejections come from a handful of causes: an unknown source, a supplier site that is not valid for the operating unit, a GL date in a closed period, a distribution account that is invalid or disabled, or line totals that do not match the header. Loading without setting the operating unit context is another frequent problem on multi-org systems. Test with five invoices before sending five thousand, and keep the reject query next to the load script.

  • Check the Payables period for the GL date is open
  • Check supplier site is active for the org
  • Validate the account against the chart of accounts first
  • Purge processed rows with the standard purge program

Frequently Asked Questions

What tables does the Payables open interface use?

Invoices are staged in AP_INVOICES_INTERFACE for headers and AP_INVOICE_LINES_INTERFACE for lines, and rejections are written to AP_INTERFACE_REJECTIONS. You then run the Payables Open Interface Import concurrent program, which creates invoices in the base AP tables.

Can I import invoices without PO matching?

Yes. Item lines with a distribution account import as standard invoices without matching. For PO matched invoices you add PO fields on the lines, and the data must satisfy the matching rules for your operating unit. Start with the simple case and add matching after it works.

Why does my invoice stay in the interface table?

Either the import has not run for that source yet or the row was rejected. Check AP_INTERFACE_REJECTIONS for the reject lookup code, fix the data, and rerun the import. The query in this template shows the rejections by invoice number.

Is this safe to run in production?

Test first in a non-production instance. The script writes to interface tables, which is the supported path, but wrong data creates wrong invoices after import. Confirm column names on your release and keep a rollback plan for the loaded batch.

If you are converting from a legacy ERP, we can help build validation and reconciliation around your interface loads and run it on your own infrastructure.