Search Results fa_mass_ret_pub




Overview

FA_MASS_RET_PUB is a public PL/SQL package body in the Oracle E-Business Suite Fixed Assets (FA) module, owned by the APPS schema. It supports the mass retirement business process, allowing users to retire multiple assets in a single transaction rather than processing them individually. The package is classified as a public API (PUB), meaning it is intended for external invocation from forms, concurrent programs, or custom code rather than serving as an internal private routine.

The package header carries the revision marker $Header: FAPMRLDB.pls 120.7 2005/07/28 00:19:21 tkawamur noship $, indicating a long-maintained codebase that remains stable across the 12.1.1 and 12.2.2 releases. A package-level variable, g_log_level_rec, of type fa_api_types.log_level_rec_type, is declared for logging control, reflecting the standard Oracle EBS API logging pattern. The package body also declares a private exception, validation_error, and numerous local variables used to validate fiscal year, book class, category, retirement type, date, status, location, and asset number ranges before mass retirement records are committed.

Key Procedures and Functions

The documented public interface exposes a single procedure:

  • CREATE_CRITERIA — The central routine of the package. It accepts a mass retirement criteria record (typed as FA_CUSTOM_RET_VAL_PKG.mass_ret_rec_tbl_type, passed as an IN OUT NOCOPY parameter) along with standard Oracle EBS API parameters: API version, initial message list flag, commit flag, validation level, calling function identifier, and the standard OUT parameters for return status, message count, and message data. Internally the procedure declares a local mr_count NUMBER variable — the term the user searched for — which is used to accumulate or track the number of mass retirement records processed during criteria creation.

The procedure performs validation cursor logic against book controls and depreciation periods (cursor c_bc), checking fiscal year name, current fiscal year, book class, and calendar period close date. It rejects budget books and honors the date_ineffective column, ensuring criteria are only created for active, valid asset books.

Tables Accessed

Through APPS synonyms, the package reads and writes the following Fixed Assets tables:

Usage Notes

FA_MASS_RET_PUB.CREATE_CRITERIA is typically invoked from the Mass Retirements form in Oracle Assets, where users define selection criteria (book, category, location, asset number range, retirement type, and retirement date) and submit the mass retirement. It may also be called from custom PL/SQL code or concurrent programs that programmatically generate mass retirement batches. The package is referenced by zero other database packages, confirming its role as a top-level public entry point rather than an internal dependency. Callers should initialize the message list and check x_return_status for FND_API.G_RET_STS_ERROR or FND_API.G_RET_STS_UNEXP_ERROR, then retrieve messages via x_msg_count/x_msg_data or the message list. The mr_count variable remains internal to the procedure and is not exposed through the public interface.