Search Results create_category_assignment




Overview

AMS_ITEM_CATEGORY_PVT is a private PL/SQL package in the APPS schema that supports the Oracle Marketing (AMS) module's item categorization functionality. It provides the programmatic interface used to associate inventory items with marketing categories, and to remove those associations when they are no longer required. Within the Oracle E-Business Suite R12 architecture it operates as an internal helper package, declared with AUTHID CURRENT_USER, and is not intended for direct invocation by external integrators. The package encapsulates the business rules governing category assignment so that item-to-category relationships remain consistent with the constraints enforced by the underlying inventory tables.

Key Procedures and Functions

Two documented procedures constitute the public surface of this package:

  • CREATE_CATEGORY_ASSIGNMENT — Creates an item category assignment. The procedure accepts standard API versioning and messaging parameters (including API version, initialization of the message list, a commit flag, and the return status, error code, message count, and message data out parameters) together with the identifiers that define the assignment: the category, the category set, the inventory item, and the organization. If the operation fails, the assignment is not created and an error code is returned. The procedure documentation notes that an item may be assigned to only one category within a given category set.
  • DELETE_CATEGORY_ASSIGNMENT — Removes an existing item category assignment, reversing the operation performed by CREATE_CATEGORY_ASSIGNMENT and maintaining referential consistency for the item-category relationship.

Because the source header references API version 115.4 (2002), both procedures have remained stable across the 12.1.1 and 12.2.2 releases.

Tables Accessed

The package performs its work against two documented underlying tables, accessed through APPS synonyms:

  • MTL_ITEM_CATEGORIES — The core inventory table that stores item-to-category assignments. This is the primary table written by CREATE_CATEGORY_ASSIGNMENT and from which DELETE_CATEGORY_ASSIGNMENT removes rows. Each row ties an inventory item to a category within a category set for a specified organization.
  • AMS_ITEM_ATTRIBUTES — A Marketing-owned table holding item-level attributes used by the AMS application. It is referenced to validate and maintain the marketing attributes that accompany category assignment, ensuring the marketing view of the item stays synchronized with the inventory categorization.

Usage Notes

AMS_ITEM_CATEGORY_PVT is classified as a PVT (private) API, meaning it is designed for consumption by other Oracle applications and internal AMS components rather than by end users or third-party extensions. The ETRM metadata records that no other packages reference it directly, identifying it as a leaf-level utility invoked through the marketing setup flows, such as item category maintenance forms or concurrent processes that mass-assign items to marketing categories. The p_commit parameter defaulting to FND_API.G_FALSE allows callers to participate in a larger transaction, and the standard x_return_status, x_errorcode, x_msg_count, and x_msg_data out parameters follow the Oracle Application Object Library API conventions so results can be surfaced consistently through FND_MSG_PUB. Custom code should not call this private package directly; the supported approach is to use the corresponding public AMS APIs or standard item category assignment functionality, reserving direct invocation only for controlled extensions that fully replicate the validation and message-handling conventions of the package. Callers must supply a valid API version and initialized message list to obtain reliable error reporting.