Search Results g_eres_enabled




Overview

INV_GRADE_PKG is an Oracle E-Business Suite inventory package owned by the APPS schema and classified under the generic "OTHER" API category. Its principal business function is to manage lot grade changes within Oracle Inventory. A "grade" in EBS provides a quality or classification attribute attached to a lot or serial number (for example, Grade A, Grade B, or rejected stock). When an organization reclassifies a received lot — whether as a result of a quality inspection, a downgrade after rework, or an upgrade following reinspection — the change must be applied to the lot master record and simultaneously recorded in grade history for audit and traceability. INV_GRADE_PKG encapsulates both of these operations inside a single transactional unit, ensuring that the MTL_LOT_NUMBERS record and the corresponding MTL_LOT_GRADE_HISTORY record stay consistent.

The documented package body carries a header identifying it as an inventory upload component (INVUPLGB.pls) and includes references to E-Records and Electronic Signatures (ERES) functionality, which is significant for regulated industries subject to 21 CFR Part 11 requirements.

Key Procedures and Functions

  • UPDATE_GRADE — The single documented procedure in the package. It performs the core grade change transaction: it updates the grade code on the lot, inserts a history row capturing the old and new grade along with the reason, and returns a status and message to the caller through OUT parameters. Its signature accepts the organization, the inventory item, the source and target grade codes, a reason identifier, the lot number, an update method indicator, quantity values for primary and secondary units of measure, and a flag indicating whether the update originated from mobile. The procedure honors the g_eres_enabled global — assigned from the EDR_ERES_ENABLED profile option, defaulting to 'N' — which governs whether electronic signature and e-record processing is engaged when the grade change is committed.
  • print_debug — A private helper that emits trace output to the mobile tracing log when the INV_DEBUG_TRACE profile option is set to 1. It is used internally for diagnostic purposes rather than as a public API.

Tables Accessed

  • MTL_LOT_NUMBERS — The lot master table. UPDATE_GRADE issues an UPDATE against this table to set the new grade_code for the specified lot number, organization, and inventory item.
  • MTL_LOT_GRADE_HISTORY — The audit table that stores each grade transition, including the grade update identifier, item, organization, and the from/to grade codes. Rows are inserted for every successful grade change.
  • MTL_LOT_GRADE_HISTORY_S — The sequence used to generate the GRADE_UPDATE_ID primary key for the history insert.
  • MTL_GRADE_STATUS_ERES_GTMP — A global temporary table used in support of the ERES/e-signature processing path when g_eres_enabled is enabled.
  • DUAL — Used to retrieve the next value of the history sequence.

Usage Notes

INV_GRADE_PKG is typically invoked from the Inventory lot grade maintenance forms and from mobile receiving or quality applications — the p_update_from_mobile parameter and the reference to INV_MOBILE_HELPER_FUNCTIONS confirm a mobile entry point. The package is also referenced by two other packages, indicating it is called programmatically by higher-level inventory APIs rather than executed directly by end users.

Because the procedure manipulates inventory data and participates in ERES, callers should invoke it within a controlled transaction and commit explicitly; the source shows the internal COMMIT deliberately commented out in favor of savepoint management. Implementations using electronic signatures must ensure the EDR_ERES_ENABLED profile is set so that g_eres_enabled resolves to 'Y' and the grade history records are captured as signed e-records.