Results for “insert_status_history”
24 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
The APPS.INV_MATERIAL_STATUS_PKG package body encapsulates the business logic used by Oracle Inventory to manage and validate Material Status codes within Oracle E-Business Suite 12.1.1 and 12.2.2. Material statuses represent user-defined lifecycle states (for example, Quarantine, Inspection Pending, Released, or Scrap) that can be applied to subinventories, locators, lots, serials, and on-hand quantities. The package provides the server-side logic that Forms and concurrent programs rely upon to determine whether a status is already in use, to resolve default status assignments, to maintain the material status history audit trail, and to enforce valid-status rules during transactions.
The header comment ($Header: INVMSPVB.pls 120.9.12010000.2) indicates the package was last patched under the 12.1 release family but remains shipped and active in 12.2.2. The package also contains an Enterprise Resource for E-Signatures (ERES) profile check via FND_PROFILE.VALUE('EDR_ERES_ENABLED'), meaning electronic signature enforcement is conditionally applied when material status changes are committed. This makes the package central to audit and compliance requirements in regulated industries.
Key Procedures and Functions
- STATUS_ASSIGNED — Determines whether a given status id is currently in use. It sequentially checks subinventories, locators, lots, serials, and finally on-hand quantities (via
MTL_ONHAND_QUANTITIES_DETAILjoined toMTL_PARAMETERS). Returns a Boolean TRUE/FALSE based on the existence of an assignment in any of these objects. - GET_DEFAULT_LOCATOR_STATUS — Retrieves the default material status associated with a locator, providing the fallback status used when no explicit status is supplied.
- INITIALIZE_STATUS_REC — Initializes a PL/SQL record structure representing a material status, used as a staging construct before validation and history insertion.
- INSERT_STATUS_HISTORY — Writes an audit record into the material status history tables, capturing the change event for reporting and compliance.
- VALIDATE_MTSTATUS — The primary validation routine requested by the search term. It confirms that a material status id passed by a caller is valid and usable within the intended transaction context before any assignment or update proceeds.
- VALIDATE_MTSTATUS2 — An overloaded or extended variant of the same validation, providing additional contextual checks (for example, organization-specific or object-type-specific validation).
- SET_MS_FLAGS — Sets internal flags used by the package, likely governing ERES enablement and status-change behavior during a session.
Tables Accessed
The package reads and writes through APPS synonyms across the Inventory schema. MTL_MATERIAL_STATUSES holds the status definitions being validated. MTL_SECONDARY_INVENTORIES, MTL_ITEM_LOCATIONS, MTL_LOT_NUMBERS, and MTL_SERIAL_NUMBERS are queried by STATUS_ASSIGNED to detect existing usage. MTL_ONHAND_QUANTITIES_DETAIL and MTL_PARAMETERS are joined to find on-hand quantities referencing a status. History and audit records are written to MTL_MATERIAL_STATUS_HISTORY, MTL_MATERIAL_STATUS_HISTORY_S, and MTL_ONHAND_STATUS_GROUP_S. MTL_GRADE_STATUS_ERES_GTMP supports ERES temporary staging, while MTL_RESERVATIONS and DUAL complete the referenced set.
Usage Notes
This package is invoked primarily by the Material Status definition Form and related Inventory setup forms, which call VALIDATE_MTSTATUS before saving a status assignment. Concurrent programs that mass-update or purge material statuses also depend on it for validation and history capture. Because it is referenced by twelve other packages, customizations should treat INV_MATERIAL_STATUS_PKG as a shared dependency and avoid modifying its specification. When extending the package for custom validation, wrapper APIs should be created rather than altering VALIDATE_MTSTATUS directly, to preserve upgrade safety across 12.1.1 and 12.2.2 patching.