Search Results check_prepayment_invoice
Overview
APPS.AP_PREPAY_PKG is a core Oracle Payables PL/SQL package that encapsulates the business logic required to create, validate, and apply prepayment invoices within Oracle E-Business Suite Release 12.1.1 and 12.2.2. A prepayment is an advance payment made to a supplier before goods or services are received; it is recorded as a special invoice type in Payables and later applied against standard invoices to offset the amount owed. AP_PREPAY_PKG provides the programmatic foundation for this lifecycle by validating prepayment eligibility, determining applicable amounts, generating application lines and distributions, and updating the underlying prepayment and purchase order receipt information. The package resides in the APPS schema and is classified under the generic API classification "OTHER," meaning it is an internal utility package rather than a formally published open interface. It is nonetheless a load-bearing component of the Payables architecture, referenced directly by five other packages in the module.
Key Procedures and Functions
The package exposes 23 documented procedures and functions, which fall into several functional groups:
- Validation routines — CHECK_SUPPLIER_CONSISTENCY and CHECK_CURRENCY_CONSISTENCY ensure that the supplier and currency of the prepayment align with those of the invoice being applied. CHECK_PREPAYMENT_INVOICE and CHECK_PREPAYMENT_LINE confirm that a given invoice or line qualifies as a prepayment, while CHECK_PERIOD_STATUS verifies that the relevant accounting period permits the transaction.
- Applicability checks — CHECK_NOTHING_TO_APPLY_LINE, CHECK_NOTHING_TO_APPLY_INVOICE, and CHECK_NOTHING_TO_APPLY_VENDOR determine whether any prepayment balance remains available for application at the line, invoice, or supplier level.
- Information retrieval — VALIDATE_PREPAY_INFO, GET_PREPAY_CASE_NAME, and GET_PREPAY_APPLY_AMOUNT derive the prepayment case and calculate the amount that may be applied.
- Line selection and application — SELECT_LINES_FOR_APPLICATION, APPLY_PREPAY_LINE, APPLY_PREPAY_IMPORT, and INSERT_PREPAY_LINE identify candidate prepayment lines and post the corresponding application lines.
- Distribution and update processing — INSERT_PREPAY_DISTS creates accounting distributions, while UPDATE_PREPAYMENT and UPDATE_PO_RECEIPT_INFO maintain the prepayment record and any associated purchase order receipt data.
- Import-specific utilities — CHECK_PREPAY_INFO_IMPORT and GET_PREPAY_INFO_IMPORT support the Payables import pipeline.
Tables Accessed
The package reads and writes the principal Payables transactional tables. AP_INVOICES_ALL, AP_INVOICE_LINES_ALL, and AP_INVOICE_DISTRIBUTIONS_ALL store the prepayment and target invoice headers, lines, and distributions. AP_INVOICE_DISTRIBUTIONS and AP_INVOICE_LINES are accessed through the corresponding synonym layer for line-level processing, and AP_INVOICE_DISTRIBUTIONS_S supports sequence or view-based access. AP_PAYMENT_SCHEDULES and AP_INVOICE_PAYMENTS_ALL are used to evaluate payment status and remaining balances. AP_SYSTEM_PARAMETERS and AP_SYSTEM_PARAMETERS_ALL supply configuration defaults, AP_ALLOCATION_RULE_LINES governs allocation behavior, and AP_CHECKS_ALL records the payment instruments. GL_PERIOD_STATUSES is queried to enforce open-period validation, and PO_LINE_TYPES is referenced to classify purchasing document lines relevant to prepayment against receipts.
Usage Notes
AP_PREPAY_PKG is invoked internally rather than called directly by end users. It is referenced by AP_IMPORT_INVOICES_PKG and AP_IMPORT_VALIDATION_PKG during the Payables Open Interface Import and validation flows, by AP_INVOICE_LINES_PKG during invoice line processing, by AP_MATCHING_UTILS_PKG during matching operations, and by AP_RETRO_PRICING_PKG during retroactive price adjustments. In the EBS Forms UI, prepayment creation and application screens rely on this logic when a user records a prepayment or applies it to an invoice. Custom extensions and interfaces that programmatically create prepayments, or that apply prepayments during import, should route through these subprograms to preserve validation, distribution generation, and period control integrity. Because the package is not a published open API, direct customization should be avoided in favor of the supported import and invoice interfaces.
-
PACKAGE: APPS.AP_PREPAY_PKG
12.2.2
-
PACKAGE: APPS.AP_PREPAY_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_PREPAY_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_PREPAY_PKG
12.2.2
-
APPS.AP_PREPAY_PKG dependencies on APP_EXCEPTION
12.1.1
-
APPS.AP_PREPAY_PKG dependencies on APP_EXCEPTION
12.2.2
-
APPS.AP_PREPAY_PKG dependencies on AP_PREPAY_PKG
12.2.2
-
APPS.AP_PREPAY_PKG dependencies on AP_PREPAY_PKG
12.1.1
-
APPS.AP_PREPAY_PKG dependencies on FND_LOG
12.1.1
-
APPS.AP_PREPAY_PKG dependencies on FND_LOG
12.2.2