Search Results okl_fan_seq




Overview

The APPS.OKL_LIKE_KIND_EXCHANGE_PVT package body implements the private application logic layer for the Like-Kind Exchange business process within Oracle Lease and Finance Management (OKL), part of the Oracle E-Business Suite ETRM (Enterprise Transaction and Revenue Management) stack. A like-kind exchange under US tax code Section 1031 allows a lessee or lessor to defer capital gains when an asset is exchanged for a replacement asset of like kind. In EBS Release 12.1.1 and 12.2.2, this PL/SQL package coordinates the accounting, asset book, and contract-side activity required to recognize and defer gain on such an exchange. It is classified as a PVT (private) API, meaning it is not intended as a public integration entry point; callers are expected to reach it through the corresponding public wrapper or via the like-kind exchange UI. The package body depends on a wide set of Oracle Assets public APIs (FA_ADDITION_PUB, FA_ADJUSTMENT_PUB, FA_API_TYPES) and OKL sub-APIs such as OKL_ASD_PVT, OKL_TAL_PVT, OKL_TAS_PVT, and OKC_API, confirming that its role is to orchestrate transactional processing across the lease contract and fixed-asset ledgers.

Key Procedures and Functions

  • CREATE_LIKE_KIND_EXCHANGE — The primary driver procedure. It creates the like-kind exchange transaction, instantiating the associated contract and asset records and invoking downstream API calls to post the necessary accounting and asset entries. This routine embodies the core business event the package exists to support.
  • GET_TOTAL_MATCH_AMT — A query function that computes the total matching amount for an exchange, comparing the values of the relinquished and replacement assets to determine the qualifying like-kind value used in gain deferral calculation.
  • GET_BALANCE_SALE_PROCEEDS — A query function returning the residual or balance of sale proceeds associated with the exchange, used to determine the portion of proceeds not reinvested that may trigger recognized gain.
  • GET_DEFERRED_GAIN — A query function calculating the deferred gain amount, the taxable benefit postponed under Section 1031 rules. Together, these three getters expose the quantitative values needed by the creation process and by reporting.

The package exposes four documented procedures/functions in total, and it is itself referenced by five other packages and objects within the OKL schema, indicating it is a foundational component for like-kind exchange flows.

Tables Accessed

  • OKC_K_HEADERS_B and OKC_K_LINES_B — Core contract header and line base tables from Oracle Contracts, used to persist the contract that represents the exchange.
  • OKL_FAN_SEQ — The sequence generator used to obtain unique identifiers for financial asset notes or related records, referenced when creating new transactional rows.
  • OKL_TRX_ASSETS — Stores asset-level details for the lease transaction, read and written to link the exchanged assets to the transaction.
  • OKL_TRX_CONTRACTS — Associates the transaction with its governing contract record.
  • OKL_TRX_TYPES_TL — The transaction type lookup (translated table) that classifies the exchange transaction.
  • OKL_LIKE_KIND_EXCHANGE_V — A view exposing like-kind exchange data, queried during processing.
  • Asset book views such as OKX_ASST_BK_CONTROLS_V, OKX_AST_BKS_V, OKX_AST_CAT_BKS_V, OKX_AST_DPRTNS_V, and OKX_AST_DST_HST_V are used to retrieve asset book, category, depreciation, and distribution history information. DUAL and PLITBLM support utility operations.

Usage Notes

Because this is a private (PVT) package, it is not intended to be called directly by external integrations. It is typically invoked from the OKL Like-Kind Exchange forms, from concurrent programs that process exchange transactions, or from the public OKL contract APIs (such as OKL_TRX_CONTRACTS and OKC_API related flows) that delegate the exchange-specific work to this package. The user's search term "okl_fan_seq" corresponds to the sequence referenced in the dependency list, which this package consumes when generating new record identifiers during exchange creation. Developers performing customizations on Release 12.1.1 or 12.2.2 should call the supported public API rather than this PVT package, since the private layer's signature and behavior may change between patches.