Search Results ap_exp_report_lines_all
Overview
AP_IMPORT_UTILITIES_PKG is a foundational utility package in the Oracle Payables module of Oracle E-Business Suite, operating under the APPS schema. It supports the Payables Invoice Import process, which loads invoice data from the AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE staging tables into the production Payables tables. The package performs the supporting tasks that surround the core import logic: concurrency control, rejection handling, batch creation, invoice insertion, invoice line creation, and lookup of reference information such as vendor sites, employee identifiers, payment terms, and tolerances. It is classified in the ETRM metadata as an OTHER API rather than a public, fully supported interface, meaning it is primarily intended for internal use by Oracle's own import programs and forms rather than by customer extensions.
Key Procedures and Functions
The package exposes 30 documented procedures and functions. Key routines include:
- CHECK_CONTROL_TABLE — Enforces concurrency control at the start of the Import Program, preventing duplicate runs with the same parameter set (source and group ID).
- PRINT — Writes debug messages when the debug switch is enabled, used throughout the package for diagnostics.
- INSERT_REJECTIONS — Records failed interface rows into the rejection table for later correction and resubmission.
- INSERT_AP_INVOICES, INSERT_AP_INVOICE_LINES, INSERT_AP_BATCHES — Perform the actual inserts of invoice headers, lines, and batches into the Payables base tables during import.
- UPDATE_AP_BATCHES, CHANGE_INVOICE_STATUS, UPDATE_TEMP_INVOICE_STATUS — Update batch and invoice status flags as records move through the import lifecycle.
- GET_BATCH_ID, GET_AUTO_BATCH_NAME, GET_INVOICE_INFO, GET_DOC_SEQUENCE — Retrieve identifiers and sequencing information required to construct valid invoice and batch records.
- GET_OVERBILL_FOR_SHIPMENT, GET_OVERBILL_FOR_PO_LINE, GET_TOLERANCE_INFO, GET_INFO, GET_EMPLOYEE_ID — Look up matching, over-billing, tolerance, and reference data used to validate and match invoices.
- FIND_VENDOR_PRIMARY_PAYSITE — Resolves the primary pay site for a supplier during import.
- PA_FLEXBUILD — Assists in building key flexfield combinations for Payables accounting.
The package also contains an internal routine, copy_attachments, which migrates attachments from the interface entity to the final invoice entity.
Tables Accessed
The package reads and writes across the Payables interface and base tables. Interface-side tables include AP_INVOICES_INTERFACE, AP_INVOICE_LINES_INTERFACE, AP_INTERFACE_CONTROLS (concurrency and control state), and AP_INTERFACE_REJECTIONS (failed rows). Base transaction tables include AP_INVOICES_ALL, AP_INVOICES, AP_INVOICE_LINES_ALL, AP_INVOICE_LINES, and AP_INVOICE_DISTRIBUTIONS, which receive the imported invoice headers, lines, and distributions. Batch-related tables AP_BATCHES_ALL, AP_BATCHES_S, and AP_BATCHES_S2 store batch and batch sequence data. Accounting period lookups use AP_OTHER_PERIODS and AP_OTHER_PERIOD_TYPES. The package is referenced by nine other packages, confirming its role as a shared utility layer within the Payables import subsystem.
Usage Notes
AP_IMPORT_UTILITIES_PKG is invoked indirectly through the standard Payables Invoice Import concurrent program and related import forms. It is not typically called directly by end users. Because it is classified as an OTHER API, custom code should avoid calling these routines directly; instead, the supported AP_IMPORT_INVOICES_PKG and related public APIs should be used. The reference to AP_EXP_REPORT_LINES_ALL by users searching this object suggests interest in expense report invoice lines that flow through the import process; however, this package does not directly list AP_EXP_REPORT_LINES_ALL among its documented tables. Any custom debugging should respect the g_debug_switch flag used by the PRINT routine to control diagnostic output.