Search Results update_step_resources




Overview

GMP_APS_WRITER is an Oracle EBS Process Manufacturing (OPM) package owned by APPS and classified as an OTHER API. Its central role is to serve as the write-back layer for Advanced Planning and Scheduling (APS) results against Process Manufacturing batches. In the OPM-to-APS integration flow, planning engines compute adjusted schedules, dates, priorities, and resource consumption outside of EBS; GMP_APS_WRITER accepts those computed values and persists them to the GME batch, step, activity, resource, and charge tables. The package header declares AUTHID CURRENT_USER and carries a version stamp of 120.3.12020000.1 (2012/06/27), consistent with R12.1.1 and R12.2.2 deployments. Notably, several parameters are annotated "For R12.0" (required completion date, order priority, organization id, sequence dependent usage), reflecting the package's evolution across release boundaries while retaining backward-compatible signatures. A package-level debug flag is driven by the profile option GMP_DEBUG_ENABLED, defaulting to 'N'.

Key Procedures and Functions

The package exposes fifteen documented procedures and functions. MAIN_PROCESS is the principal entry point, orchestrating the full write-back for a given batch, group, and header across a date range and action type. LOCK_BATCH_DETAILS obtains a concurrency lock on the batch and returns its current status and last-update timestamp, guarding against lost updates. UPDATE_BATCH_HEADER writes batch-level scheduling attributes such as start and end dates, required completion date, order priority, batch status, and firm flag. UPDATE_MATERAILS refreshes material detail records for an organization. UPDATE_BATCH_STEPS updates individual batch step scheduling, accepting step number, step id, start, end, and due dates. UPDATE_STEP_RESOURCES records resource usage and sequence-dependent usage for a step resource, distinguishing GME and APS resource identifiers. UPDATE_RESOURCE_TRANSACTIONS maintains resource transaction rows. UPDATE_BATCH_ACTIVITIES and UPDATE_ACTIVITY_OFFSETS maintain step activity sequencing and offset information. UPDATE_BATCHES applies updates across a broader batch set. VALIDATE_STRUCTURE verifies referential integrity of the batch structure before writes. INSERT_CHARGES creates batch step charge rows. Supporting utilities include LOG_MESSAGE, TIME_STAMP, and GMP_DEBUG_MESSAGE, which provide auditing, timestamping, and conditional debug output.

Tables Accessed

All tables are referenced through APPS synonyms. GME_BATCH_HEADER receives header-level schedule and status updates. GME_BATCH_STEPS, GME_BATCH_STEP_ACTIVITIES, GME_BATCH_STEP_RESOURCES, and GME_BATCH_STEP_CHARGES store step, activity, resource, and charge detail respectively. GME_MATERIAL_DETAILS holds material requirements written by UPDATE_MATERAILS. GME_RESOURCE_TXNS captures resource transactions. CR_RSRC_DTL provides resource detail master data, and MTL_UNITS_OF_MEASURE supplies unit-of-measure validation. GMP_APS_OUTPUT_TBL and GMP_APS_OUTPUT_DTL hold the APS staging/output data that the writer consumes or reconciles.

Usage Notes

GMP_APS_WRITER is typically invoked by the APS integration concurrent programs and by the OPM scheduling engine when committing planned schedule changes back to EBS batches, rather than being called directly from a form. Because it is declared AUTHID CURRENT_USER, execution requires appropriate grants against the underlying GME and GMP tables. One other package references it, indicating it participates in a coordinated API chain. Custom code invoking the package should follow the established pattern: call LOCK_BATCH_DETAILS first, execute the relevant update procedures, and rely on return_status for error handling, enabling GMP_DEBUG_ENABLED only for diagnostics. The update_batch_steps procedure is the targeted routine when adjusting step-level scheduling dates for a batch.