Search Results get_okl_period_status
Overview
OKL_ACCOUNTING_UTIL is a utility package body in the APPS schema within Oracle E-Business Suite Release 12.1.1 and 12.2.2, belonging to the Enterprise Contracts (ETRM/OKL) module. Its API classification is UTIL, indicating that it is not a business-document-facing API with its own concurrency and validation framework, but rather a shared library of accounting helper routines invoked internally by other Oracle Lease and Financing packages. The package encapsulates cross-cutting accounting logic — value set and segment resolution, currency and conversion-rate validation, period status checks, code combination validation, flexfield description assembly, lookup translation, and message and error retrieval — so that higher-level accounting engines do not duplicate these operations. The body is reported VALID in the data dictionary and is referenced by 393 other packages, which makes it one of the more widely depended-upon PL/SQL units in the OKL accounting layer. It does not itself post journal entries; instead it supplies the validated inputs and translated values needed by consumers that do post.
Key Procedures and Functions
The ETRM documentation enumerates 58 procedures and functions in this body. Representative members, grouped by purpose, include:
- Segment and account resolution: GET_SEGMENT_ARRAY, GET_ACCOUNTING_SEGMENT, and GET_CONCATE_DESC assemble and format accounting flexfield segment values and their concatenated descriptions.
- Validation routines: VALIDATE_LOOKUP_CODE, VALIDATE_CURRENCY_CODE, VALIDATE_GL_CCID, and VALIDATE_SOURCE_ID_TABLE confirm that a proposed lookup, currency, code combination, or source identifier is legitimate before a caller relies on it.
- Period status: GET_OKL_PERIOD_STATUS and GET_GL_PERIOD_STATUS return the open/closed state of the OKL and General Ledger periods respectively, supporting period-gating decisions by callers.
- Ledger and set of books: GET_SET_OF_BOOKS, GET_SET_OF_BOOKS_ID, and GET_SET_OF_BOOKS_NAME retrieve ledger identity information (set of books terminology reflecting 12.1.x heritage).
- Currency and conversion: GET_CURR_CON_RATE obtains a conversion rate, while ROUND_AMOUNT applies currency-appropriate rounding.
- Lookup translation: GET_LOOKUP_MEANING, GET_LOOKUP_MEANING_LANG, GET_FA_LOOKUP_MEANING, and GET_RULE_MEANING return user-facing meanings for lookup codes and rule definitions.
- Message and error handling: GET_ERROR_MESSAGE and GET_ERROR_MSG retrieve formatted error text from the Oracle message stack.
No parameter lists are documented in the ETRM metadata excerpt, and none are asserted here.
Tables Accessed
The package reads reference and setup data through APPS synonyms. Flexfield and descriptive-flexfield metadata are sourced from FND_ID_FLEX_SEGMENTS, FND_ID_FLEX_SEGMENTS_TL, FND_FLEX_VALUES, FND_FLEX_VALUE_SETS, and GL_CODE_COMBINATIONS (with its _KFV view). Currency and rate data come from FND_CURRENCIES, FND_CURRENCIES_VL, and GL_DAILY_CONVERSION_TYPES. Lookup values are drawn from FND_LOOKUP_VALUES, FND_LOOKUP_TYPES, FA_LOOKUPS, and AK_ATTRIBUTES_TL / AK_REGION_ITEMS / AK_REGION_ITEMS_TL for descriptive flexfield attributes. Fixed asset context is supplied by FA_BOOKS, FA_BOOK_CONTROLS, and FA_DEPRN_PERIODS. Contract and lease identifiers are read from OKC_K_HEADERS_B and OKL_K_HEADERS. System accounting options come from OKL_SYSTEM_PARAMS_ALL and OKL_SYS_ACCT_OPTS. Writes, where they occur, are not itemized in the supplied metadata; the package is predominantly read-oriented against these reference tables.
Usage Notes
OKL_ACCOUNTING_UTIL is invoked internally rather than directly from user entry points. Typical callers include the OKL accounting generation and distribution programs (which read OKL_TRNS_ACC_DSTRS and OKL_TRX_ASSETS), contract and transaction processing logic built on OKC_API and OKL_API, and any custom client extension that needs consistent currency validation, period checking, or flexfield description formatting. Because it depends on FND_GLOBAL, FND_PROFILE, FND_MSG_PUB, and MO_GLOBAL, callers must ensure that a valid application and session context is established before invocation. Its heavy reuse (393 dependents) means signature changes carry wide regression risk. Custom code should treat the package as a read-only utility and should not modify reference tables through it.