Search Results create_hist_corr_upd
Overview
APPS.PNT_PAYMENT_TERMS_PKG is a PL/SQL package body in the Oracle Property Manager (PNT) module of Oracle E-Business Suite, available in releases 12.1.1 and 12.2.2. It encapsulates the core business logic required to maintain payment terms, payment items, distributions, and related agreement data within the property and lease management domain. The package is classified as OTHER in the ETRM API registry, meaning it functions primarily as an internal implementation package rather than a formally published public API. Its procedures manipulate rows in the PN_PAYMENT_TERMS and PN_PAYMENT_ITEMS families of tables, calculate and validate payment amounts, apply rate changes to payment items, manage distribution history records, and expose helper logic for retrieving agreement numbers and source module types. The source header of the package body references PNTPYTRB.pls revision 120.16, dated 2007, confirming its long-standing stability across multiple EBS releases, including the 12.1.1 and 12.2.2 code lines.
Key Procedures and Functions
The package exposes eleven documented program units:
- INSERT_ROW — Inserts a new payment terms row, including the area_type_code and area attributes noted in the header history.
- LOCK_ROW — Acquires a row-level lock on a payment terms record, typically prior to update or delete operations.
- UPDATE_ROW — Updates an existing payment terms record with modified attribute values.
- DELETE_ROW — Removes a payment terms record from the underlying table.
- CHECK_PAYMENT_AMOUNTS — Validates that at least one of the actual or estimated payment amounts is populated; when both are null, it raises the PN_PAYMENT_AMOUNT_NULL message and sets the return status to 'E'.
- UPDATE_VENDOR_AND_CUST — Maintains vendor and customer references associated with payment terms, supporting payment routing.
- CHECK_APPROVED_SCHEDULE_EXISTS — Determines whether an approved payment schedule already exists, a prerequisite for certain downstream processing.
- CREATE_HIST_CORR_UPD — Creates history and correction records for update operations, preserving an auditable trail of changes to payment terms and associated distributions.
- RETURN_AGREEMENT_NUMBER — Returns the agreement number linked to the payment terms context.
- GET_SOURCE_MODULE_TYPE — Retrieves the source module type, allowing callers to identify the originating application context.
- MODIFY_ROW — Performs a combined modify operation, orchestrating validation and row changes.
Additional internal procedures such as UPDATE_PNT_ITEMS_AMT and UPDATE_PNT_ITEMS_RATE recalculate estimated amounts and rates on payment items in response to term changes; the parameter p_new_est_amt and p_trm_str_dt/p_trm_end_dt drive those recalculations.
Tables Accessed
The package reads and writes a broad set of Property Manager and shared application tables through APPS synonyms:
- PN_PAYMENT_TERMS_ALL, PN_PAYMENT_ITEMS, and PN_PAYMENT_ITEMS_ALL — the primary terms and payment item records maintained by the package.
- PN_DISTRIBUTIONS, PN_DISTRIBUTIONS_ALL, PN_DISTRIBUTIONS_S — distribution rows generated from payment schedules.
- PN_DISTRIBUTIONS_HISTORY, PN_DISTRIBUTIONS_HISTORY_S, PN_DISTRIBUTIONS_HISTORY_S1 — history and audit sequences used by CREATE_HIST_CORR_UPD.
- PN_LEASES and PN_LEASES_ALL — lease headers to which payment terms attach.
- PN_INDEX_LEASES_ALL and PN_INDEX_LEASE_PERIODS_ALL — index-based lease periods used in escalation calculations.
- PN_OPEX_AGREEMENTS_ALL and PN_OPEX_EST_PAYMENTS_ALL — operating expense agreements and estimated payment records.
Usage Notes
PNT_PAYMENT_TERMS_PKG is referenced by at least eight other APPS packages and is invoked from the Property Manager forms layer when users maintain payment terms, payment items, and distributions, as well as from concurrent programs that process lease payments and generate distributions. Custom code should exercise caution: because the package is classified as OTHER rather than a public API, its signatures are not guaranteed across patches. The recommended integration pattern is to call the higher-level public APIs that in turn reference this package, or to invoke it under a controlled savepoint when row-level DML and history creation must be performed transactionally. The CHECK_PAYMENT_AMOUNTS procedure should be called before committing payment terms to ensure that either an actual or an estimated amount has been supplied, avoiding the PN_PAYMENT_AMOUNT_NULL error.
-
PACKAGE BODY: APPS.PNT_PAYMENT_TERMS_PKG
12.1.1
-
PACKAGE BODY: APPS.PNT_PAYMENT_TERMS_PKG
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG SQL Statements
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG SQL Statements
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PNP_DEBUG_PKG
12.1.1
-
PACKAGE: APPS.PNT_PAYMENT_TERMS_PKG
12.1.1
-
PACKAGE: APPS.PNT_PAYMENT_TERMS_PKG
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PNP_DEBUG_PKG
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_HISTORY
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_ALL
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_PAYMENT_TERMS_HISTORY
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_HISTORY_S1
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_PAYMENT_TERMS
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_PAYMENT_TERMS_HISTORY
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_PAYMENT_TERMS_ALL
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_ALL
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_HISTORY
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_HISTORY_S
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_PAYMENT_TERMS_ALL
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_HISTORY_S
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on DUAL
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_PAYMENT_TERMS
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_HISTORY_S1
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on DUAL
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PNT_PAYMENT_TERMS_PKG
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PNT_PAYMENT_TERMS_PKG
12.2.2
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_S
12.1.1
-
APPS.PNT_PAYMENT_TERMS_PKG dependencies on PN_DISTRIBUTIONS_S
12.2.2