Results for “exec_controller_prg2”
8 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
OKL_BOOK_CONTROLLER_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Suite Applications (APPS) schema, belonging to the Oracle Lease and Finance Management (OKL) product family within the ETRM (Enterprise Transaction and Resource Management) module set. In Oracle EBS 12.1.1 and 12.2.2, this package orchestrates the booking and activation lifecycle of lease and finance contracts. Its central business responsibility is to drive a contract from a validated state through pricing, upfront tax calculation, quality assurance (QA) checking, approval submission, stream generation, journal entry creation, and final activation.
The package is declared with AUTHID CURRENT_USER, meaning it executes under the privileges of the calling user rather than the definer, and it relies on the APPS synonym layer to resolve all underlying OKL tables. It also exposes global constants that define controller task identifiers (for example, G_VALIDATE_CONTRACT = 'OKLBCTQA', G_CALC_UPFRONT_TAX = 'OKLBCTUT', G_PRICE_CONTRACT = 'OKLBCTST', and G_SUBMIT_CONTRACT = 'OKLBCTBK') and standard program status values (PENDING, RUNNING, COMPLETE, ERROR), which are used to track the progress of controller-driven processes.
Key Procedures and Functions
The documented metadata lists 17 procedures and functions that collectively implement the contract booking workflow:
- CALCULATE_UPFRONT_TAX — Computes upfront tax amounts for a contract, invoked as part of the controller program execution.
- CALC_UPFRONTTAX_NXTBTN — Performs validation when the Next button is clicked on the Upfront Tax page.
- VALIDATE_CONTRACT_NXTBTN — Validates the contract when the Next button is pressed during contract entry.
- INIT_BOOK_CONTROLLER_TRX — Initializes a book controller transaction record.
- UPDATE_BOOK_CONTROLLER_TRX — Updates the book controller transaction records during processing.
- CANCEL_CONTRACT_ACTIVATION — Handles cancellation of a contract activation in progress.
- SUBMIT_CONTROLLER_PRG1 / SUBMIT_CONTROLLER_PRG2 — Submit the two stage controller programs for asynchronous execution.
- EXEC_CONTROLLER_PRG1 / EXEC_CONTROLLER_PRG2 — Execute the two controller programs; the first stage invokes
calculate_upfront_taxaccording to the package comments. - EXECUTE_QA_CHECK_LIST — Runs the quality assurance check list against the contract.
- GENERATE_STREAMS — Generates the payment/accounting streams associated with the contract.
- GENERATE_JOURNAL_ENTRIES — Creates the corresponding journal entries for the contract.
- SUBMIT_FOR_APPROVAL — Submits the contract for approval workflow.
- ACTIVATE_CONTRACT — Activates the contract, completing the booking lifecycle.
- IS_PRB_UPGRADE_REQUIRED and SUBMIT_PRB_UPGRADE — Determine whether a price-rule-based upgrade is required and submit it if so.
Tables Accessed
The package reads and writes several core OKL and OKC tables via APPS synonyms:
- OKC_K_HEADERS_B — The contract header base table, used to key processing by header ID, passed as
p_khr_id. - OKL_BOOK_CONTROLLER_TRX, OKL_BOOK_CONTROL_TRX_ALL, OKL_TRX_CONTRACTS, OKL_TRX_QUOTES_B — Store and track book controller transaction state and contract/quote transaction data.
- OKL_K_HEADERS — Lease contract headers keyed to OKC headers.
- OKL_PRODUCTS — Defines lease products that govern contract behavior.
- OKL_AE_TMPT_SETS, OKL_ST_GEN_TMPT_SETS, OKL_STREAM_INTERFACES, OKL_STREAM_TRX_DATA, OKL_BKG_CONTL_SEQ — Temporary sets and interfaces used in stream generation and accounting event processing.
- OKL_SYS_ACCT_OPTS — System accounting options influencing journal entries.
- DBMS_LOCK and DUAL — Used for locking and utility lookups.
Usage Notes
OKL_BOOK_CONTROLLER_PVT is a private package and is not intended for direct customer invocation; it is called internally by the OKL booking controller framework. It is typically invoked from Oracle Forms during contract entry (through Next-button validation procedures), and from concurrent programs that execute the staged controller programs (SUBMIT_CONTROLLER_PRG1/EXEC_CONTROLLER_PRG1 and their stage-two counterparts). It is also referenced by approximately 10 other packages in the OKL schema, forming part of the contract booking service layer. Customizations should extend or wrap this package rather than modify it directly, since it ships under the APPS schema and is subject to Oracle support and patching.