Search Results g_runtime_level




Overview

CSD_INTERNAL_ORDERS_PVT is a private PL/SQL package body in the APPS schema that supports the Internal Orders functionality within Oracle Depot Repair (CSD). Internal orders are the mechanism by which a depot repair organization moves serviceable or repaired inventory between internal organizations, subinventories, and locations using Oracle Order Management and Oracle Inventory transactions rather than conventional sales orders. The package encapsulates all of the procedures and functions required to create requisitions, internal sales orders, internal move orders, pick releases, ship confirmations, and receipts associated with this flow. The header comment explicitly restricts its usage to Oracle Depot Repair development, confirming that the package is not a public API and that its signature may change without notice.

The package declares several logging globals that govern diagnostic output, including G_LEVEL_PROCEDURE bound to FND_LOG.LEVEL_PROCEDURE and G_RUNTIME_LEVEL bound to FND_LOG.G_CURRENT_RUNTIME_LEVEL. The identifier g_runtime_level is therefore central to the package's FND_LOG instrumentation: procedures compare the current runtime level against configured logging thresholds to decide whether to emit debug messages during execution. Additional globals include standard FND_API return status constants and G_DELIVERY_DETAIL_ID, which carries delivery detail context across procedure calls within a session.

Key Procedures and Functions

The documented program units cover the end-to-end internal order lifecycle:

  • CREATE_INTERNAL_REQUISITION — Creates the requisition that initiates the internal procurement of goods from a source organization.
  • CREATE_INTERNAL_SALES_ORDERS — Generates the internal sales order in Order Management that corresponds to the internal requisition.
  • CREATE_INTERNAL_MOVE_ORDERS — Builds move orders to relocate material between subinventories as part of the depot repair flow.
  • GET_ALL_INTERNAL_ORDERS — Retrieves the set of internal orders relevant to the current repair context for display or downstream processing.
  • PICK_RELEASE and PICK_RELEASE_INTERNAL_ORDER — Release picking activity against the internal order, with the latter scoped specifically to internal orders.
  • SHIP_CONFIRM_INTERNAL_ORDER — Performs ship confirmation, driving inventory issue and shipment of the material.
  • RECEIVE_INTERNAL_ORDER — Receives the shipped goods into the destination organization, invoking receiving interfaces as needed.
  • IS_SERIAL_RANGE_VALID — Validates that a range or set of serial numbers conforms to expected formatting and inventory rules before processing.

The internal procedure populate_rcv_int_tables is also visible in the source excerpt; it populates the receiving interface tables required to stage receipt transactions.

Tables Accessed

The package reads and writes a broad set of inventory and repair tables through APPS synonyms. CSD_PRODUCT_TRANSACTIONS and its sequence CSD_PRODUCT_TRANSACTIONS_S1 anchor the package to the Depot Repair transaction model. MTL_SYSTEM_ITEMS_B and MTL_SYSTEM_ITEMS_KFV supply item attributes, while MTL_ITEM_SUB_DEFAULTS and MTL_PARAMETERS provide subinventory defaults and organization-level inventory controls. Transactional tables include MTL_MATERIAL_TRANSACTIONS, MTL_MATERIAL_TRANSACTIONS_TEMP, MTL_RESERVATIONS, and MTL_TXN_REQUEST_HEADERS, supporting moves and reservations. Serial-controlled items are handled through MTL_SERIAL_NUMBERS, MTL_SERIAL_NUMBERS_TEMP, and MTL_SERIAL_NUMBERS_INTERFACE. FND_USER and HR_ORGANIZATION_INFORMATION resolve user and organization context.

Usage Notes

Because the package is classified as PVT and the header restricts usage to Oracle Depot Repair development, it is invoked internally by Depot Repair forms, concurrent programs, and related CSD packages rather than by customer extensions. The metadata records that two other packages reference it. Customizations that must interact with internal orders should use supported public APIs; direct calls to CSD_INTERNAL_ORDERS_PVT risk breakage on patching or upgrade. The g_runtime_level global means FND_LOG profile settings directly control the volume of diagnostic output produced at runtime.