Search Results validate_actual_qty




Overview

GME_MATERIAL_DETAIL_PVT is a private (PVT-classified) PL/SQL package in the APPS schema that encapsulates the core logic for creating and validating material detail lines associated with process manufacturing batches. In Oracle EBS Process Manufacturing (OPM), material detail records in GME_MATERIAL_DETAILS represent the individual ingredient, product, and byproduct lines that make up a batch. This package provides the programmatic interface through which batch material lines are inserted, validated against item, revision, unit of measure, and quantity rules, and subsequently transacted into inventory. The package header carries the AUTHID CURRENT_USER directive, meaning its SQL executes with the privileges of the calling user rather than the definer, which is significant because callers must themselves hold the necessary privileges on the underlying inventory and process tables.

Although the user searched for delete_material_line, no such procedure exists in the documented interface. Deletion or reversal of material lines is not part of this package's published contract; the package is oriented toward insert and actual-quantity processing. This distinction is important when troubleshooting or extending OPM batch material functionality.

Key Procedures and Functions

The package exposes thirty-five documented procedures and functions. The principal entry points and validators include:

  • INSERT_MATERIAL_LINE — the primary insertion routine. It accepts batch header, material detail, and batch step records together with a transaction identifier, returning a transaction status flag, a return status, and the resulting material detail record.
  • VALIDATE_BATCH_FOR_MATL_INS — confirms that the batch is in a state that permits material line insertion.
  • VALIDATE_MATERIAL_FOR_INS — validates the proposed material detail record against batch and step context, returning a corrected or populated detail record and a return status.
  • VALIDATE_ACTUAL_QTY — checks the supplied actual quantity for validity.
  • OPEN_AND_PROCESS_ACTUAL_QTY — a combined routine that opens the material line for actual-quantity processing and then performs the processing. It takes batch header, material detail, and optional batch step records, a transaction id, and an insert flag.
  • OPEN_ACTUAL_QTY — a function returning a numeric result that determines whether a material line may accept actual quantities, based on batch status, inventory-update indicator, step status, lot control code, locator control code, restricted locators code, and an insert flag.
  • PROCESS_ACTUAL_QTY — performs the actual-quantity transaction once the line is open.
  • CONSTRUCT_TRANS_ROW — builds the transaction interface row used for inventory posting.
  • GET_CONVERTED_QTY and GET_ITEM_REC — utility helpers for UOM conversion and item record retrieval.

A further set of validators underpins the insertion logic, including VALIDATE_ITEM_ID, VALIDATE_REVISION, VALIDATE_LINE_TYPE, VALIDATE_BYPRODUCT_TYPE, VALIDATE_LINE_NO, VALIDATE_DTL_UM, VALIDATE_PLAN_QTY, VALIDATE_WIP_PLAN_QTY, VALIDATE_RELEASE_TYPE, and VALIDATE_SCRAP_FACTOR. Each enforces a specific domain rule on the material detail record before it is committed.

Tables Accessed

The package references process manufacturing and inventory tables through APPS synonyms:

Usage Notes

GME_MATERIAL_DETAIL_PVT is a private package and is not intended for direct external invocation from standard forms or concurrent programs; it is consumed by nine other packages within the OPM application suite. Because it is classified PVT and carries AUTHID CURRENT_USER, customizations should call the supported public API layer rather than this package directly. When developers do reference it, the correct pattern is to pass populated GME_BATCH_HEADER, GME_MATERIAL_DETAILS, and GME_BATCH_STEPS record variables and to inspect x_return_status and x_transacted after each call. There is no documented delete_material_line routine in this package, so deletion of material lines must be handled through whatever supporting mechanism the calling application provides rather than through this interface. The header revision GMEVMTLS.pls 120.6 (dated 2006) indicates the package has been stable across the 12.1.1 and 12.2.2 releases.