Search Results update_sup_inv_dtls




Overview

OKL_SUPP_INVOICE_DTLS_PVT is a private (PVT-classified) PL/SQL API package in the Oracle E-Business Suite Applications (APPS) schema, owned by the Oracle Lease Management (OKL) module. Its primary business function is to maintain supplier invoice detail records associated with lease contracts and contract lines. The package encapsulates the create, lock, update, delete, and validation logic required to keep the OKL_SUPP_INVOICE_DTLS entity consistent with its parent contract structures. Because it is classified as PVT, it is intended as an internal building block rather than a public integration interface; external callers are expected to reach it indirectly through higher-level public APIs.

The package is declared with AUTHID CURRENT_USER and defines a small set of global constants (G_PKG_NAME, G_APP_NAME, G_SQLERRM_TOKEN, G_SQLCODE_TOKEN) plus a control exception, G_EXCEPTION_HALT_VALIDATION, that signals validation short-circuits. It also reuses record and table types defined in OKL_SID_PVT through subtypes (sid_rec_type, sid_tbl_type, sidv_rec_type, sidv_tbl_type), which is why the Create_sup_inv_dtls API accepts a single sidv_rec or a bulk sidv_tbl payload.

Key Procedures and Functions

  • CREATE_SUP_INV_DTLS — Inserts supplier invoice detail records. It is overloaded: one version processes a single sidv_rec_type record, the other processes a sidv_tbl_type collection for bulk creation. Both follow the OKC_API standard signature (p_api_version, p_init_msg_list, x_return_status, x_msg_count, x_msg_data) and return the created record or table.
  • LOCK_SUP_INV_DTLS — Obtains a lock on the supplier invoice detail record so concurrent transactions cannot modify the same row during an update sequence.
  • UPDATE_SUP_INVOICE_DTLS / UPDATE_SUP_INV_DTLS — Applies changes to existing supplier invoice detail rows, reusing the same message-handling convention as the create path.
  • DELETE_SUP_INV_DTLS — Removes supplier invoice detail records, typically invoked when an invoice line is reversed or a contract line is terminated.
  • VALIDATE_SUP_INV_DTLS — Performs business-rule validation on the supplier invoice detail payload. It raises G_EXCEPTION_HALT_VALIDATION when a condition prevents further processing, allowing callers to abort cleanly.

Tables Accessed

The package interacts with several core OKL and OKC tables through APPS synonyms:

  • OKL_SUPP_INVOICE_DTLS — The principal entity this package inserts, updates, locks, and deletes.
  • OKC_K_HEADERS_B and OKC_K_LINES_B — Contract header and line base tables, used to validate that the invoice detail is tied to a valid contract and line.
  • OKC_K_PARTY_ROLES_B — Contract party role base table, referenced to confirm the supplier/party context of the invoice detail.
  • WF_PARAMETER_LIST_T — Used in conjunction with the workflow/notification infrastructure, typically when validation errors or document events must be surfaced to a workflow process.

Internationalization is supported by an optional add_language procedure, which populates the translated (_TL) columns associated with this entity.

Usage Notes

Because OKL_SUPP_INVOICE_DTLS_PVT is a PVT package, it is not intended as a direct integration point for customer extensions. It is invoked by three other OKL packages, which act as the public-facing layer for supplier invoice processing. In practice, the package is exercised when lease-related supplier invoices are entered, adjusted, or cancelled — from the Lease Management forms, from concurrent programs that batch-load invoice details, and from internal workflow processes that need to validate invoice data before posting. Custom code should call the documented public packages rather than OKL_SUPP_INVOICE_DTLS_PVT directly; doing so preserves the validation and locking behavior encapsulated here. Calls should always supply p_api_version and honor x_return_status, x_msg_count, and x_msg_data before proceeding, consistent with the standard EBS API error-handling pattern.