Search Results ap_mc_invoice_lines




Overview

AP_LINES_UPGRADE_SYNC_PKG is a PL/SQL package body in the APPS schema that supports the Oracle Payables invoice lines upgrade and synchronization process. Its role is to reconcile and migrate invoice distribution and line data that exists across the transient staging structures used during upgrade, ensuring that source distributions are correctly transformed and populated into their target representations. The package operates entirely in the context of the Oracle E-Business Suite 12.1.1 and 12.2.2 upgrade path, where legacy invoice distribution rows must be reorganized to satisfy the multi-organization and subledger accounting data model introduced in Release 12.

The package depends heavily on the AP_INV_DISTS_SOURCE and AP_INV_DISTS_TARGET synonyms, which define the input and output sides of the synchronization. It also draws on global temporary tables such as AP_DIST_LINE_GT, AP_LINE_TEMP_GT, and AP_TAX_ALLOC_AMOUNT_GT to stage intermediate results. The presence of AP_INVOICES_UPG_CONTROL confirms that the package is driven by the upgrade control framework, and its dependencies on ZX_LINES_SUMMARY_S, ZX_RATES_B, and ZX_REC_NREC_DIST_S indicate that tax line and tax rate information is preserved and re-created during the migration.

Key Procedures and Functions

  • TRANSACTION_UPGRADE_SYNC — The principal driver procedure. It coordinates the synchronization of invoice distribution data between the source and target structures, applying the upgrade rules that translate pre-Release 12 distributions into their Release 12 equivalents. It relies on AP_INVOICES_UPG_CONTROL to determine the scope of work and raises failures through APP_EXCEPTION and AP_DEBUG_PKG.
  • POPULATE_LINES — Populates the line-level staging structures from the surviving invoice, line, and distribution tables. This procedure assembles the rows required by the synchronization step, drawing on AP_INVOICE_LINES_ALL, AP_INVOICE_DISTRIBUTIONS_S, and the temporary AP_LINE_TEMP_GT table before the target records are written.

Both programs are classified as OTHER rather than as public APIs, confirming they are internal upgrade utilities rather than supported integration entry points. Additional helper logic is referenced through AP_CHRG_ALLOCATIONS_ALL, AP_TAX_ALLOC_AMOUNT_GT, and AP_TAX_CODES_ALL to carry forward charge allocations and tax allocation amounts.

Tables Accessed

  • AP_INV_DISTS_SOURCE / AP_INV_DISTS_TARGET — The central source and destination structures for distribution synchronization.
  • AP_INVOICES_ALL, AP_INVOICE_LINES_ALL, AP_INVOICE_DISTRIBUTIONS_S — Source invoice, line, and distribution records read during population.
  • AP_INVOICES_UPG_CONTROL — Upgrade control state governing which invoices are processed.
  • AP_DIST_LINE_GT, AP_LINE_TEMP_GT, AP_TAX_ALLOC_AMOUNT_GT, AP_LINES_UPG_SYNC_DATA — Global temporary and staging tables holding intermediate results.
  • AP_CHRG_ALLOCATIONS_ALL, AP_TAX_CODES_ALL, PO_DISTRIBUTIONS_ALL, PO_LINES_ALL — Charge allocation, tax code, and purchasing match reference data.
  • ZX_LINES_SUMMARY_S, ZX_RATES_B, ZX_REC_NREC_DIST_S — E-Business Tax summary, rate, and recoverable/non-recoverable distribution data.
  • AP_SYSTEM_PARAMETERS_ALL, FND_CURRENCIES, FND_GLOBAL, FND_INSTALLATION — System options, currency definitions, session context, and installation status.

Usage Notes

The package is invoked exclusively during the Payables upgrade and is not exposed through any Oracle Forms interface or concurrent program. Its procedures are called by the upgrade driver chain, as evidenced by the dependency on AP_INVOICES_UPG_CONTROL and the fact that one other package references it. The searches for AP_INV_DISTS_SOURCE in ETRM metadata typically originate from the dependency listing of this package, which is the documented consumer of that synonym.

Because the procedures are classified as OTHER and are not referenced by external database objects, they should not be invoked from custom code. Debug output is routed through AP_DEBUG_PKG and errors are raised via APP_EXCEPTION, so diagnostics appear in the standard upgrade log rather than in application-level error handling.