Search Results process_pending_status




Overview

APPS.INV_ITEM_STATUS_CP is an Oracle E-Business Suite concurrent processing package that manages the lifecycle of item status assignments, with particular emphasis on the deferred processing of pending item status changes. The package is owned by the APPS schema and is classified under the ETRM API classification "OTHER," indicating that it is a processing utility rather than a formally published public API.

The package header carries the identifier $Header: INVCIPSS.pls 120.0.12010000.2 2010/02/10 22:49:24 mshirkol ship $, and is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking user rather than the definer. The suffix "_CP" denotes concurrent program behavior: the package is designed to be invoked from concurrent manager context or as the PL/SQL body of a concurrent program, with the standard concurrent request parameter set (program application, program ID, request ID, user ID, login ID) surfaced as procedure arguments.

A significant portion of the package addresses a specific defect resolution documented as bug#9297937, described in the source as "ERES in Deferred during Item Creation." This confirms that the package provides the mechanism by which Enterprise Resource Event System (ERES) events associated with item creation are deferred rather than fired synchronously, allowing item creation to complete before event generation is triggered.

Key Procedures and Functions

The package exposes two documented procedures, one of which is overloaded.

  • PROCESS_PENDING_STATUS — The primary worker procedure. It processes rows from the pending item status queue, applying status assignments that were previously deferred. It returns standard concurrent program OUT parameters (ERRBUF and RETCODE) and accepts an optional organization identifier, item identifier, commit flag, the standard concurrent request context parameters, a message list initialization flag, and a message log file name. The default of FND_API.G_TRUE for commit and message-list initialization reflects that the procedure is typically run as a batch job where a full unit of work is expected.
  • CREATE_ITEM_ERES_EVENT — Overload 1. This version accepts the commit flag, message-list initialization flag, event name, event key, caller type, organization identifier, and inventory item identifier. It creates the ERES event record without returning status information to the caller, making it suitable for fire-and-forget invocation from deferred processing logic.
  • CREATE_ITEM_ERES_EVENT — Overload 2. This version accepts the identical IN parameter set and adds three standard OUT parameters: a return status, message count, and message data. This overload is appropriate when the caller requires programmatic confirmation of success or failure and needs to inspect the error stack via FND_MSG_PUB.

Both overloads default the commit and message-list initialization flags to FND_API.G_FALSE, in contrast to PROCESS_PENDING_STATUS, indicating that they are intended to participate in a larger transaction controlled by the caller.

Tables Accessed

  • MTL_SYSTEM_ITEMS and MTL_SYSTEM_ITEMS_B — The core item definition tables, read to resolve item identity and organization context when constructing and validating pending status requests.
  • MTL_ITEM_STATUS — The item status definition table, providing the valid status codes and their associated properties.
  • MTL_PENDING_ITEM_STATUS — The queue table holding deferred status assignments awaiting processing by PROCESS_PENDING_STATUS.
  • MTL_STATUS_ATTRIBUTE_VALUES — Stores attribute-level values controlled by a given item status, used to determine what attribute changes accompany a status transition.
  • MTL_ITEM_ATTRIBUTES — The item attribute storage table, updated when a status change alters attribute values.
  • MTL_PARAMETERS — The organization parameters table, consulted to resolve organization-level defaults and validation rules.
  • DUAL — Used for singleton function evaluation and constants within PL/SQL logic.

Usage Notes

PROCESS_PENDING_STATUS is typically registered as a concurrent program and scheduled to run on a periodic basis, draining the MTL_PENDING_ITEM_STATUS queue and applying deferred status assignments. The concurrent request parameters exposed in the signature allow it to be scoped to a single organization or a single item when a targeted run is required.

CREATE_ITEM_ERES_EVENT is invoked from item creation and update flows — including the item master forms and interface processing — when ERES event generation must be deferred so that the item record is fully committed before downstream subscribers evaluate it. Custom code invoking this package should use the overload with OUT parameters when error handling is required, and should be aware that FND_API.G_FALSE defaults mean transaction control remains with the caller. Because the package is declared AUTHID CURRENT_USER and references APPS synonyms, grants on the underlying tables must be in place for the invoking schema.