Search Results dist_tab_type
Overview
APPS.AP_INVOICE_CORRECTIONS_PKG is a PL/SQL package in Oracle Payables that supports the invoice correction process in Oracle E-Business Suite 12.1.1 and 12.2.2. Invoice correction is used when a previously validated or accounted invoice must be adjusted without performing a full cancellation and re-entry. The package encapsulates the logic required to reverse or prorate the original invoice lines and distributions and to build the corrected lines and distributions that represent the adjusted invoice. It is classified as an OTHER API, meaning it is intended primarily for internal use by Oracle Payables and by tightly coupled components rather than as a general-purpose public interface. Because it operates directly on AP_INVOICE_LINES_ALL and AP_INVOICE_DISTRIBUTIONS_ALL, it participates in the core accounting and matching flow of Payables and is sensitive to the state of the invoice, its distributions, and the open accounting period.
Key Procedures and Functions
The documented interface exposes a single procedure, INVOICE_CORRECTION. The procedure accepts identifiers for the original invoice and line, the corrected invoice and line, proration flags for lines and distributions, and the correction quantity, amount, and price. It also receives two IN OUT NOCOPY associative array parameters, one of type LINE_TAB_TYPE and one of type DIST_TAB_TYPE, which carry the corrected line and distribution information through the call. A calling sequence parameter is included for diagnostic traceability. The PL/SQL specification defines two record types, r_corr_line_info and r_corr_dist_info, and the corresponding table types line_tab_type and dist_tab_type, indexed by BINARY_INTEGER. The r_corr_dist_info record includes corrected_inv_dist_id, invoice_distribution_id, amount, base_amount, and rounding_amt. The r_corr_line_info record includes corrected_line_number, line_amount, base_amount, rounding_amt, line_number, and included_tax_amount. The presence of included_tax_amount, added under Bug 5597409, is significant because it aligns the correction logic with tax-inclusive line amounts, ensuring that corrections preserve the tax component embedded in the original line. This field directly addresses the common search term "included_tax_amount." No standalone functions are documented; the package's public surface is limited to the single procedure and its supporting types.
Tables Accessed
The package references AP_INVOICE_LINES_ALL and AP_INVOICE_DISTRIBUTIONS_ALL to read and write line and distribution records during correction. It accesses AP_INVOICES and AP_INVOICES_ALL for invoice header data, and AP_INVOICE_LINES and AP_INVOICE_DISTRIBUTIONS (and AP_INVOICE_DISTRIBUTIONS_S) for related line and distribution views. AP_AWT_GROUPS and AP_BATCHES support withholding tax and batch context, while AP_SUPPLIERS and AP_SUPPLIER_SITES_ALL provide supplier and site information needed for validation. AP_SYSTEM_PARAMETERS supplies Payables system options, FND_CURRENCIES supports currency conversion and rounding, GL_CODE_COMBINATIONS provides the accounting flexfield combinations for distributions, and GL_PERIOD_STATUSES is used to confirm that the relevant accounting period is open before accounting entries are created or reversed.
Usage Notes
AP_INVOICE_CORRECTIONS_PKG is normally invoked by Oracle Payables forms and internal processes rather than by standalone custom code. In EBS 12.1.1 and 12.2.2, invoice correction is reached through the Invoice Workbench, where the user selects a line and requests a correction; the form then calls this package to compute prorated lines and distributions and to populate the LINE_TAB_TYPE and DIST_TAB_TYPE structures. The proration flags allow the caller to distribute the correction across lines or distributions proportionally, and the correction quantity, amount, and price parameters determine the magnitude of the adjustment. Because the package writes directly to base Payables tables and assumes specific invoice and period states, custom callers must supply consistent invoice identifiers, provide the IN OUT arrays with valid entries, and preserve the calling sequence for support diagnostics. Any direct invocation should be limited to controlled extensions and should be accompanied by revalidation and accounting checks to avoid inconsistencies in invoice balances, distributions, and included tax amounts.
-
PACKAGE: APPS.AP_INVOICE_CORRECTIONS_PKG
12.1.1
-
PACKAGE: APPS.AP_INVOICE_CORRECTIONS_PKG
12.2.2
-
PACKAGE: APPS.AP_MATCHING_PKG
12.1.1
-
PACKAGE: APPS.AP_MATCHING_PKG
12.2.2
-
PACKAGE BODY: APPS.AP_INVOICE_CORRECTIONS_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_INVOICE_CORRECTIONS_PKG
12.2.2
-
APPS.AP_INVOICE_CORRECTIONS_PKG SQL Statements
12.1.1
-
APPS.AP_INVOICE_CORRECTIONS_PKG SQL Statements
12.2.2
-
PACKAGE: APPS.AP_INVOICE_LINES_PKG
12.2.2
-
PACKAGE: APPS.AP_INVOICE_LINES_PKG
12.1.1
-
APPS.AP_MATCHING_PKG SQL Statements
12.2.2
-
APPS.AP_MATCHING_PKG SQL Statements
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_ALLOCATION_RULE_LINES
12.1.1
-
APPS.AP_MATCHING_UTILS_PKG dependencies on PO_LINE_LOCATIONS_ALL
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_ALLOCATION_RULE_LINES
12.2.2
-
APPS.AP_MATCHING_UTILS_PKG dependencies on PO_LINE_LOCATIONS_ALL
12.2.2
-
APPS.AP_ISP_UTILITIES_PKG dependencies on AP_INVOICE_DISTRIBUTIONS
12.1.1
-
APPS.AP_MATCHING_UTILS_PKG dependencies on PO_LINE_LOCATIONS
12.1.1
-
APPS.AP_MATCHING_UTILS_PKG dependencies on PO_LINE_LOCATIONS
12.2.2
-
APPS.AP_INVOICE_CORRECTIONS_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL
12.1.1
-
PACKAGE BODY: APPS.AP_MATCHING_PKG
12.1.1
-
APPS.AP_INVOICE_CORRECTIONS_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL
12.2.2
-
PACKAGE BODY: APPS.AP_MATCHING_PKG
12.2.2
-
APPS.AP_MATCHING_PKG dependencies on AP_INVOICE_DISTRIBUTIONS
12.2.2
-
APPS.AP_MATCHING_PKG dependencies on AP_INVOICE_DISTRIBUTIONS
12.1.1
-
APPS.AP_ISP_UTILITIES_PKG dependencies on AP_INVOICE_DISTRIBUTIONS
12.2.2
-
APPS.AP_INVOICE_CORRECTIONS_PKG dependencies on AP_INVOICE_LINES_ALL
12.1.1
-
APPS.AP_INVOICE_CORRECTIONS_PKG dependencies on AP_INVOICE_LINES_ALL
12.2.2
-
PACKAGE BODY: APPS.AP_MATCHING_UTILS_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_MATCHING_UTILS_PKG
12.2.2
-
PACKAGE BODY: APPS.AP_ISP_UTILITIES_PKG
12.1.1
-
APPS.AP_MATCHING_PKG dependencies on PO_DISTRIBUTIONS
12.2.2
-
APPS.AP_MATCHING_PKG dependencies on PO_DISTRIBUTIONS
12.1.1
-
PACKAGE BODY: APPS.AP_ISP_UTILITIES_PKG
12.2.2
-
APPS.AP_MATCHING_UTILS_PKG dependencies on AP_INVOICE_DISTRIBUTIONS
12.2.2
-
APPS.AP_MATCHING_UTILS_PKG dependencies on AP_INVOICE_DISTRIBUTIONS
12.1.1
-
APPS.AP_INVOICE_CORRECTIONS_PKG dependencies on AP_INVOICE_LINES
12.2.2
-
APPS.AP_INVOICE_CORRECTIONS_PKG dependencies on AP_INVOICE_LINES
12.1.1
-
APPS.AP_MATCHING_PKG dependencies on PO_DISTRIBUTIONS
12.2.2
-
APPS.AP_MATCHING_PKG dependencies on PO_DISTRIBUTIONS
12.1.1