Search Results check_item_exists




Overview

APPS.INV_ABC_ASSIGNMENTS_PVT is a private (PVT) PL/SQL package body in Oracle E-Business Suite that encapsulates the business logic for creating and maintaining ABC assignment records used by Oracle Inventory. ABC assignments classify inventory items into ABC classes (such as A, B, or C) within an ABC assignment group, which drives ABC analysis and cycle counting prioritization. The package serves as the internal implementation layer behind the ABC assignment workflow, validating input combinations before determining whether an insert or update operation is required.

The package header identifies itself through the global constant g_pkg_name set to 'INV_ABC_Assignments_PVT' and includes a Mydebug helper procedure that traces diagnostic messages via inv_log_util.Trace. This trace facility is gated by the INV_DEBUG_TRACE profile option, which is commonly used when diagnosing ABC assignment issues in a 12.1.1 or 12.2.2 environment.

Key Procedures and Functions

  • CREATE_ABC_ASSIGNMENTS — The primary entry point for establishing or modifying an ABC assignment. It validates the combination of assignment group, ABC class, and inventory item, then decides whether to insert a new assignment or update an existing one. The procedure follows the standard EBS API error-handling convention, exposing x_return_status, x_msg_count, and x_msg_data for callers to inspect outcome and messages.
  • INSERT_ABC_ASSIGNMENTS — Performs the physical insert of a new ABC assignment row when no prior assignment exists for the supplied group/class/item combination.
  • UPDATE_ABC_ASSIGNMENTS — Performs the update path when an existing assignment must be changed, preserving audit columns such as created_by, creation_date, last_updated_by, and last_update_date.

All three procedures are documented; the excerpt notably shows CREATE_ABC_ASSIGNMENTS declaring cursor check_assignment_group to validate the assignment group and organization, and a cursor named check_item_exists — the object matched by the user search — which tests whether the supplied item exists in the target organization before proceeding.

Tables Accessed

  • MTL_ABC_ASSIGNMENT_GROUPS — Read to retrieve the organization context (organization_id) for a given assignment_group_id. This establishes the warehouse/organization scope of the assignment.
  • MTL_ABC_ASSGN_GROUP_CLASSES — Associates ABC classes with assignment groups, supporting validation of the class-to-group relationship.
  • MTL_ABC_ASSIGNMENTS — The target table where item-to-class assignments are inserted or updated, and where existing assignment state is queried via the check_item_exists cursor.

These tables are referenced through APPS synonyms, consistent with standard EBS multi-org security and the private API's role of operating within the APPS schema.

Usage Notes

As a PVT package, INV_ABC_ASSIGNMENTS_PVT is not intended for direct customer invocation. It is instead consumed by the ABC assignment forms and by one other documented package in the EBS codebase. The typical invocation path is the ABC Assignment window in Oracle Inventory, which calls the package to persist user selections; the package in turn decides between insert and update based on its validation cursors, including check_item_exists and check_assignment_group.

Customizations should not call this private package directly because its interface is subject to change between 12.1.1 and 12.2.2 and does not carry the same compatibility guarantee as public APIs. When diagnostics are required, enabling the INV_DEBUG_TRACE profile causes Mydebug output to be written through inv_log_util.Trace, allowing troubleshooting of failed validations such as a missing item or an invalid assignment group.