Search Results final_complete




Overview

WIP_WEIGHTED_AVG is an Oracle Applications-owned PL/SQL package in the APPS schema that supports cost processing for Work in Process (WIP) discrete jobs. Its documented purpose centers on the final completion of a job: recording the last completion transaction and relieving the correct amount of cost from the job to inventory using a weighted average basis. Because weighted average costing spreads actual accumulated job costs across the units produced, the final completion is the transaction at which remaining balances must be settled, residuals disposed of, and job cost variances resolved before the job can be closed. The package header declares AUTHID CURRENT_USER, so it executes with the privileges of the calling session rather than as definer, which is significant when it is invoked from concurrent programs, forms, or custom code that runs under a different schema or responsibility.

Key Procedures and Functions

The package exposes two overloaded procedures, both named FINAL_COMPLETE, giving a single logical entry point with two calling signatures.

  • FINAL_COMPLETE (primary overload) — Processes the final completion for a specific discrete job identified by organization and WIP job identifier, taking a primary quantity. It returns a completion indicator plus a return code and return message to the caller.
  • FINAL_COMPLETE (transaction-specific overload) — A variant that accepts a material transaction header identifier in place of the primary quantity, allowing the final completion to be driven from a specific existing transaction record. It likewise returns a return code and message and, like the first overload, delivers status through OUT NOCOPY parameters.

The presence of the completion flag in the first overload indicates that the caller can query whether the job was actually taken to final completion, enabling callers to branch between “final completion performed” and “job still open, ordinary completion” outcomes. No additional public procedures or functions are documented in the package specification.

Tables Accessed

ETRM metadata records the following base tables as referenced through APPS synonyms:

  • WIP_DISCRETE_JOBS — The primary job record. Read to validate the job, its status, quantities and cost context, and updated as the job moves through final completion.
  • WIP_OPERATIONS — Operation-level information used to determine operation completion state and to support associated cost and move transactions.
  • MTL_MATERIAL_TRANSACTIONS — The permanent inventory transaction table where the completion and any residual or variance-related movements are recorded.
  • MTL_MATERIAL_TRANSACTIONS_TEMP — The staging table used by the transaction manager interface to build the pending transaction rows prior to processing and validation.
  • MTL_PARAMETERS — Organization-level inventory parameters, including costing and transaction defaults that govern how the completion is processed.
  • WIP_PARAMETERS — WIP cost and accounting defaults for the organization, such as WIP accounting class behavior and variance handling controls.

Usage Notes

WIP_WEIGHTED_AVG is an internal worker package rather than an end-user interface. It is invoked indirectly by the Oracle WIP cost and completion transaction flows — typically when a user final-completes a discrete job from the WIP Material Transactions form or when a transaction is processed by the WIP transaction manager and its associated concurrent programs. It is also referenced by at least one other shipped package, and custom integrations that need to drive final completion programmatically may call FINAL_COMPLETE directly. Callers must supply a valid organization and job, must already have created or staged the completion transaction, and should always inspect the returned return code and message before committing, since the procedure reports failures through parameters rather than exceptions. Because the package executes with invoker's rights, custom callers must be granted the necessary object privileges and run under a context that can access the WIP and inventory tables referenced above.