Search Results gme_batch_step_chg_pvt




Overview

GME_BATCH_STEP_CHG_PVT is a private PL/SQL package in the APPS schema that supports the Oracle Process Manufacturing (OPM) batch chargeability engine. Its role is to manage the linkage between batch steps, batch step activities, and the resource charges that are generated when a batch is created or rescheduled. Within the OPM data model, a batch step consumes resources defined on the associated recipe, and those resources translate into charge records in GME_BATCH_STEP_CHARGES. The package governs the population, sequencing, and clearing of those charge rows, and it maintains the sequence numbers that tie activities to their parent steps and to one another.

The package is classified as a PVT (private) API, meaning it is intended for consumption by other OPM application modules rather than by external integrations. It is documented as VALID in both Oracle EBS 12.1.1 and 12.2.2 and is referenced by nine other database objects, confirming its position as a shared internal utility rather than a standalone entry point.

Key Procedures and Functions

Eight documented procedures and functions comprise the public surface of this package body.

  • POPULATE_CHARGES_TABLE — The core routine. It builds the set of charge records for a batch step by resolving the resources and activities applicable to that step and writing the resulting rows into the charge structures.
  • CLEAR_CHARGES — Removes charge records associated with a batch step or batch, typically invoked before a re-population so that stale charges do not persist.
  • CLEAR_CHARGE_DATES — Removes or nullifies date attributes on existing charge records, supporting recost or scheduling recalculation scenarios.
  • SET_ALL_BATCH_ACTIVITIES — Establishes the complete set of activities for a batch, iterating steps and assigning activities where required.
  • SET_ALL_BATCH_SEQUENCES — Assigns sequence numbers across the batch's steps and activities, ensuring a consistent ordering for display and processing.
  • SET_ACTIVITY_SEQUENCE_NUM — Sets the sequence number for an individual activity within a step.
  • SET_SEQUENCE_DEPENDENT_ID — Populates the dependent identifier used to relate a sequence entry to its predecessor or parent record.
  • CALC_ACTIVITY_SEQUENCE_NUMBER — Computes the next or derived sequence number for an activity based on existing ordering rules.

Tables Accessed

The package reads and writes the central OPM batch tables. Batch header data is drawn from GME_BATCH_HEADER. Step-level detail comes from GME_BATCH_STEPS, with activity rows in GME_BATCH_STEP_ACTIVITIES and resource rows in GME_BATCH_STEP_RESOURCES. The charge records themselves are written to GME_BATCH_STEP_CHARGES, with the database-level trigger or handler GME_BATCH_STEP_CHARGE_DBL providing denormalization support. Resource definitions are resolved from CR_RSRC_DTL, recipe validity is checked against GMD_RECIPE_VALIDITY_RULES, and sequence types are looked up in GMP_SEQUENCE_TYPES. Item and category validation draws on MTL_SYSTEM_ITEMS, MTL_ITEM_CATEGORIES, and MTL_DEFAULT_CATEGORY_SETS. Error handling and messaging rely on FND_API and FND_MSG_PUB, with debugging routed through GME_DEBUG and shared utilities in GME_COMMON_PVT.

Usage Notes

GME_BATCH_STEP_CHG_PVT is not exposed to end users directly. It is invoked by the OPM batch maintenance forms and by concurrent processes that create, copy, or reschedule batches, and it is called by higher-level public APIs such as those that manage batch step charges. Because the package has no inbound references from outside the OPM module set, customizations should call the supported public APIs rather than this private body. Sites upgrading from 12.1.1 to 12.2.2 should note that the package remains valid and its dependency footprint is unchanged, but any custom code that has been built on top of its procedures should be re-validated after patching, since the body may be regenerated by the application.