Search Results reset_g_inv_count
Overview
FA_LOAD_TBL_PKG is an Oracle E-Business Suite Fixed Assets (FA) package owned by APPS. It is classified as an "OTHER" API in ETRM, indicating it is an internal support package rather than a published public interface. The package provides the in-memory staging infrastructure used by the Fixed Assets transfer, invoice, and depreciation processing logic. It defines PL/SQL collection types and global variables used to accumulate rows before they are applied to the Fixed Assets base tables, and it exposes procedures for loading those collections and resetting their associated counters.
The package header declares two primary record/table type pairs: dist_line_rec / dist_line_tbl, which stages distribution lines for asset transfers, and inv_line_rec, which stages invoice and cost lines. A global table dist_table of type dist_line_tbl and a global counter g_dist_count (initialized to 0) hold the accumulated distribution data. Each distribution record includes semantics such as record_status ('UPDATE', 'INSERT', or 'DELETE'), which informs the caller which SQL transaction must be performed on the distribution line, a pattern specific to the Transfer transaction.
Key Procedures and Functions
The package documents seven procedures/functions. Their names and purposes are:
LOAD_DIST_TABLE— Populates the globaldist_tablecollection with distribution line records and maintains the associated distribution line counter.LOAD_INV_TABLE— Populates the global invoice line collection with invoice/cost records for downstream processing.RESET_G_DIST_COUNT— Resets the global distribution line counter (g_dist_count) back to zero so a new processing cycle begins with an empty count.RESET_G_INV_COUNT— Resets the global invoice line counter, the counter named in the user's search term, so the invoice staging collection can be reused for a subsequent batch.LOAD_DEPRN_RULES_TBL— Loads depreciation rules into a staging structure for valuation processing.GET_DEPRN_RULES— Retrieves depreciation rule information previously loaded or directly from the source tables.FIND_POSITION_DEPRN_RULES— Locates the depreciation rule applicable to a given position or context, based on the loaded rule set.
The RESET_G_INV_COUNT procedure is closely related to RESET_G_DIST_COUNT; both exist because the package maintains separate global counters for its two staging areas. Any calling process that performs multiple passes must invoke the appropriate reset procedure between passes to avoid stale counts.
Tables Accessed
The package references the following tables through APPS synonyms:
FA_BOOK_CONTROLS— Provides book-level control parameters such as the current depreciation period and rule settings.FA_CATEGORY_BOOKS— Supplies the category-to-book assignment that ties a category to its depreciation book.FA_CATEGORY_BOOK_DEFAULTS— Supplies default depreciation rule and account values for a category/book combination, used by the depreciation rule lookup procedures.PLITBLM— The standard Oracle Applications temporary table structure used to marshal data between client PL/SQL and the database.
Usage Notes
Because this package is classified as OTHER rather than a public API, it is not intended for direct customer invocation. It is referenced by eight other packages within the Fixed Assets module, which drive the load–process–reset sequence. Typical invocation patterns include the asset transfer workflow, invoice and cost adjustment processing, and depreciation rule resolution during depreciation runs. The global counter variables mean the package is not re-entrant across concurrent sessions; each session maintains its own package state, but within a session the reset procedures must be called before reloading. Custom code should not call FA_LOAD_TBL_PKG directly, since its state model is tied to the internal sequencing of the Fixed Assets concurrent programs and forms that reference it.