Search Results new_item_revision




Overview

APPS.BOMPINRV is a PL/SQL package body in Oracle E-Business Suite that supports automatic revision numbering for item revisions in Oracle Bills of Material and Inventory. The package name follows the EBS convention for item revision-related PL/SQL units, and its header comment ($Header: BOMINRVB.pls 120.3) confirms it is maintained as part of the BOM (Bills of Material) module rather than as a standalone utility. The single documented procedure, INCREMENT_REVISION, encapsulates the business rule that governs how a new item revision identifier is generated when a user or process creates a subsequent revision of an item within a specific inventory organization.

The package addresses the common requirement that item revisions be sequential, for example moving from "A" to "B" or from "1" to "2", rather than requiring users to manually determine the next available value. Because revisions are organization-specific and effectivity-dated, the logic must identify the currently effective revision before producing the next value, and it must guard against collisions with revisions that already exist in the item revision tables.

Key Procedures and Functions

INCREMENT_REVISION is the only documented program unit in this package. Based on the source excerpt and ETRM classification, it accepts an item identifier, an organization identifier, and an effectivity date/time, together with a Who/ProgramInfoStruct (the standard EBS concurrent/API context carrying user, login, and request identifiers). It returns the newly derived revision in an OUT parameter and returns an error message in a second OUT parameter rather than raising an unhandled exception.

Internally, the procedure opens a cursor (GET_CURRENT_REV) that selects the revision with the maximum effectivity date less than or equal to the supplied date/time, restricted to the given item and organization, and ordered so that the most recent revision is retrieved. This establishes the baseline revision. The procedure then determines whether the current revision is strictly numeric by measuring the length of the revision string after trimming the digits 0-9; a length of zero indicates a digits-only revision. In that case it increments the numeric value by one and converts the result back to a character string. A second cursor, CHECK_DUPLICATE_REV, tests whether the candidate revision already exists for the same item and organization, preventing duplicate revision identifiers. The comment history preserved in the source ("commented for bug 4637312", "Added for Bug #3483066") indicates the procedure has been patched to relax an implementation-date filter and to control the ordering of the revision lookup.

Tables Accessed

The procedure reads MTL_ITEM_REVISIONS_B and its base-table/translation counterparts MTL_ITEM_REVISIONS (the exposed synonym), MTL_ITEM_REVISIONS_B_S, and MTL_ITEM_REVISIONS_TL. These tables hold the item revision records, including the revision value, effectivity date, item, and organization context. The current-revision cursor queries MTL_ITEM_REVISIONS_B for the latest effectivity date at or before the input date, while the duplicate-check cursor validates the proposed new revision against the same table. The documentation also lists FND_LANGUAGES, reflecting the multilingual read of revision descriptions, and DUAL, used for scalar conversions and simple lookups. The new revision value is returned to the caller through the OUT parameter; the package does not itself commit the new revision row.

Usage Notes

BOMPINRV is an internal server-side package invoked by Oracle EBS forms and concurrent processes in the Bills of Material and Inventory modules when a user requests that the system assign the next revision. It is not intended as a public extension point, and the ETRM classification of OTHER indicates it is neither a fully documented public API nor a pure utility. The single downstream reference identified in the metadata suggests it is called by one other package rather than directly by external applications.

Custom code should invoke INCREMENT_REVISION only through the supported item-revision maintenance flows, passing a valid item, organization, effectivity date, and ProgramInfoStruct, then inspect the returned revision and error message before attempting to insert the new revision record. Direct calls are best avoided because the procedure depends on the caller to persist the returned value and to perform the accompanying multilingual and organization validation.