Search Results update_instances




Overview

APPS.GMP_RESOURCE_DTL_PUB is a public PL/SQL package body in Oracle E-Business Suite that exposes the application programming interface for maintaining resource detail and resource instance data used by Oracle Process Manufacturing (OPM). The package provides a controlled, business-logic-aware entry point for creating, updating, and deleting resource records that underpin capacity planning, scheduling, and shop-floor resource availability. Rather than allowing direct DML against the underlying resource tables, the API validates input, derives surrogate keys from sequences, and propagates changes across the resource master, resource detail, and resource instance structures in a single logical unit of work. It is classified as a PUB package under the APPS schema and carries the header identifier GMPRSDTB.pls 120.6.12020000.2, consistent with the 12.1.1 and 12.2.2 code lines. The procedures accept standard concurrent-processing conventions such as p_api_version, p_init_msg_list, and p_commit, and return diagnostics through x_message_count, x_message_list, and x_return_status, allowing callers to inspect success or failure deterministically.

Key Procedures and Functions

The documented API comprises ten procedures. INSERT_RESOURCE_DTL creates a new resource detail row in CR_RSRC_DTL together with any associated resource instances; it is the entry point that also performs unit-of-measure and capacity validation. UPDATE_RESOURCE_DTL applies modifications to an existing resource detail record, while UPDATE_DETAIL_ROWS and UPDATE_INSTANCE_ROW handle the row-level persistence of detail and instance changes respectively. UPDATE_INSTANCES is the procedure most directly relevant to the search term; it synchronizes the collection of resource instance rows supplied by the caller against the stored instances, inserting, amending, or removing entries as required, and is typically invoked after a resource detail update. INSERT_RESOURCE_INSTANCE adds individual instance records, and CHECK_INSTANCE_DATA validates instance input before persistence. CHECK_DATA performs equivalent validation for the resource header and detail attributes. DELETE_RESOURCES removes resource records and their dependent data. INSERT_DETAIL_ROWS supports bulk insertion of detail rows during creation.

Tables Accessed

The package reads and writes CR_RSRC_DTL, the resource detail table that stores per-resource capacity and usage attributes, and CR_RSRC_MST, the resource master header holding standard usage UOM, capacity UOM, minimum capacity, and maximum capacity. Instance data is persisted in GMP_RESOURCE_INSTANCES, with key generation from GMP_RESOURCE_INSTANCES_S, and resource identifiers from BOM_RESOURCES_S. Validation joins reach MTL_UNITS_OF_MEASURE for UOM verification, MTL_PARAMETERS for inventory organization context, and IC_ITEM_MST where resources correspond to inventory items. BOM_CALENDARS supplies calendar references, while GMP_RESOURCE_AVAIL, GMP_RSRC_EXCP_ASNMT, and GMP_RSRC_UNAVAIL_MAN provide resource availability, exception assignment, and unavailability windows. PLITBLM is used as a PL/SQL index-by table type for bulk collections.

Usage Notes

GMP_RESOURCE_DTL_PUB is intended for programmatic invocation from Oracle Forms resource maintenance windows, from concurrent programs that load or mass-maintain resources and instances, and from custom integration code performing bulk updates. Callers must pass p_api_version, set p_init_msg_list to request message stack initialization, and control transaction scope through p_commit; when p_commit is FALSE the caller retains responsibility for commit and rollback. The API is not referenced by any other packaged object, so it is a terminal public interface rather than a shared internal utility. Because validation and key derivation are centralized here, direct DML against CR_RSRC_DTL or GMP_RESOURCE_INSTANCES should be avoided in favour of these procedures to preserve data integrity across the resource and instance tables.