Using SQL*Loader to Populate the Payables Open Interface Tables

You can create a SQL*Loader program that produces a flat file containing the invoice or supplier details you want to bring into Payables. For detailed information on the tables, refer to Payables Open Interface Tables, Oracle Payables Reference Guide.

To use SQL*Loader to populate the Payables Open Interface tables:

  1. For each invoice, the program should identify the supplier by providing a value for at least one of the following columns: VENDOR_ID, VENDOR_NUM, VENDOR_SITE_ID, or PO_NUMBER. In addition, for each record, you must populate the following required columns in AP_INVOICES_INTERFACE:

    For each invoice line, include the following values to populate the columns in the AP_INVOICE_LINES_INTERFACE:

    In addition, if you are importing foreign currency invoices, include information to populate the following columns in AP_INVOICES_INTERFACE:

    If this exchange rate information is the same for all invoices and invoice distributions you import, you can include this information in your SQL*Loader control file, instead of entering it separately for each invoice.

    Finally, ensure that your invoice flat file has the appropriate information to populate AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE as indicated in the preceding table descriptions. If a value is not required for a column, you may leave the column empty.

    For each supplier record, you must populate the following required columns in AP_SUPPLIERS_INT:

    For each supplier site record, you must populate the following required columns in AP_SUPPLIER_SITES_INT:

    For each supplier site contact record, you must populate the following required columns in AP_SUP_SITE_CONTACT_INT:

  2. Create a SQL*Loader control file.

    Read the SQL*Loader documentation to learn how to write a SQL*Loader control file. The file you write will vary greatly depending on the nature and format of the invoice or supplier flat file you use. Your control file must populate the open interface tables as indicated in the previous table descriptions. See also: SQL*Loader in your Oracle Server documentation.

    Code your control file to populate the SOURCE column in AP_INVOICES_INTERFACE with the Source code exactly as you defined it in the Oracle Payables Lookups window.

    If all your invoices are in the same currency, you can hard code the value for DEFAULT_CURRENCY_CODE in AP_INVOICES_INTERFACE and CURRENCY_CODE in AP_INVOICE_LINES_INTERFACE in your control file.

  3. Use the SQL*Loader program you created to load your invoice or supplier information from your flat file into the interface tables. Indicate your control file as the SQL*Loader control file, your invoice or supplier flat file as the SQL*Loader input file, and your Payables SQL*Plus username and password as the database sign on. For more information see your Oracle server documentation.

  4. For invoice information, use the Open Interface Invoices window to review and edit the data in the Payables Open Interface tables.