Search Results generate_dist_tab_for_dist_set
Overview
APPS.AP_INVOICE_LINES_PKG is a core Oracle Payables package in Oracle E-Business Suite 12.1.1 and 12.2.2 that manages invoice line records and the generation of invoice distributions. It sits at the intersection of invoice line maintenance and distribution creation, and it is the package that bridges the AP_INVOICE_LINES/AP_INVOICE_LINES_ALL tables with the AP_INVOICE_DISTRIBUTIONS/AP_INVOICE_DISTRIBUTIONS_ALL tables. Its principal business role is to expand invoice lines into accounting distributions using distribution sets, allocation rules, and rounding logic, and to reverse or discard those distributions when an invoice is cancelled, reversed, or corrected. The package is classified as OTHER and has a VALID status in the APPS schema. It is referenced by eight other packages, several of which are distribution-related, confirming its role as a low-level utility used across the Payables module.
Key Procedures and Functions
The documented API surface consists of six procedures and functions:
- GENERATE_DIST_TAB_FOR_DIST_SET — Generates a table (PL/SQL collection) of distributions for a distribution set, expanding the set's allocation rules into individual distribution rows.
- INSERT_FROM_DIST_SET — Inserts distributions into the invoice distribution tables based on the generated distribution set table. Works in conjunction with the generator above.
- GET_MAX_DIST_LINE_NUM — Returns the maximum distribution line number currently assigned to an invoice, used to determine the next available line number when inserting new distributions.
- ROUND_BASE_AMTS — Applies rounding to base (functional currency) amounts so that distributions sum correctly against the invoice total and account for currency precision.
- DISCARD_INV_LINE — Removes or invalidates an invoice line, typically when a line is no longer required during invoice maintenance.
- REVERSE_CHARGE_DISTRIBUTIONS — Handles the creation of reverse-charge tax distributions, used in self-assessed tax scenarios where tax is accounted for by the buyer.
Tables Accessed
The package reads and writes the primary Payables invoice and distribution tables. It inserts and updates AP_INVOICE_LINES and AP_INVOICE_LINES_ALL, and AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_DISTRIBUTIONS_ALL, and AP_INVOICE_DISTRIBUTIONS_S. Distribution set logic draws on AP_DISTRIBUTION_SETS, AP_DISTRIBUTION_SET_LINES, AP_ALLOCATION_RULES, and AP_ALLOCATION_RULE_LINES. Invoice header context comes from AP_INVOICES and AP_INVOICES_ALL, while AP_SYSTEM_PARAMETERS and AP_SYSTEM_PARAMETERS_ALL supply operating options. GL_SETS_OF_BOOKS provides accounting book context. AP_SELF_ASSESSED_TAX_DIST_ALL supports reverse-charge tax handling, and AP_SUPPLIERS supplies supplier information. AP_INVOICES_PKG is called as a dependency for invoice-level operations.
Usage Notes
This package is an internal Payables API rather than a public interface. It is typically invoked indirectly: from Oracle Payables forms when users enter distributions or apply a distribution set, from concurrent programs such as invoice validation and accounting, and from other Payables packages including AP_INVOICE_DISTRIBUTIONS_PKG, AP_APPROVAL_PKG, AP_CANCEL_PKG, AP_PREPAY_PKG, AP_RETAINAGE_PKG, and the eTax packages AP_ETAX_SERVICES_PKG and AP_ETAX_UTILITY_PKG. Custom code should prefer the supported AP_INVOICE_DISTRIBUTIONS_PKG interface where one exists, because AP_INVOICE_LINES_PKG relies on internal data structures and its procedures may be tightly coupled to Payables' own processing sequence. Direct calls should be reserved for controlled scenarios such as generating distribution sets or reversing charge distributions, and must be executed within the APPS schema with appropriate Payables context initialized.
-
PACKAGE: APPS.AP_INVOICE_LINES_PKG
12.1.1
-
PACKAGE: APPS.AP_INVOICE_LINES_PKG
12.2.2
-
PACKAGE BODY: APPS.AP_INVOICE_LINES_PKG
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES_PKG
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES_PKG
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES_PKG
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_INVOICE_LINES_PKG
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICE_LINES_PKG
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICES
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICE_LINES_PKG
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_UTILITIES_PKG
12.2.2
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICE_LINES
12.1.1
-
APPS.AP_INVOICE_LINES_PKG dependencies on AP_INVOICE_LINES
12.2.2