Search Results create_repair_order




Overview

CSP_REPAIR_ORDER_PKG is a public PL/SQL package in the APPS schema that supports the depot repair and service logistics functionality of Oracle E-Business Suite. It provides programmatic access to repair order data and the logic required to create repair orders. The package is declared AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the calling user rather than the definer, and it returns data through weakly typed REF CURSOR types (REF_CURSOR and ORD_CURSOR) so that callers receive result sets directly. In the context of EBS 12.1.1 and 12.2.2, the package is classified as an "OTHER" API — it is a documented, callable interface rather than a formalized Open Interface or public business API. It is most commonly relevant to repair-order creation flows driven by service, field service, or depot repair processing, including scenarios where repair orders are generated from planning results or from external order capture.

Key Procedures and Functions

The documented package exposes two functions, both of which return REF CURSOR result sets.

  • REPAIR_ORDER_DETAILS — Returns detailed repair order information for a given item, organization, item number, unit of measure, quantity, and subinventory. It is used to retrieve or derive the attributes and context needed to describe a repair order, typically as a preceding step to creation or as a query interface for repair-order data.
  • CREATE_REPAIR_ORDER — The primary function, and the one matching the search term "create_repair_order." It accepts identifiers for the source item, source organization, destination organization, need-by date, unit of measure, quantity, and repair supplier, and returns an ORD_CURSOR containing the resulting order information. It encapsulates the logic required to instantiate a repair order and is the customary entry point for custom code that programmatically generates repair orders.

Tables Accessed

The package references the following tables through APPS synonyms, which indicates its role in validating and creating repair order data:

  • MTL_SYSTEM_ITEMS — The item master, used to validate the item being repaired and to derive item attributes such as unit of measure and organization association.
  • HR_ALL_ORGANIZATION_UNITS — Provides organization (operating unit) validation and descriptions for the source and destination organizations involved in the repair.
  • CSP_PLANNING_PARAMETERS — Supplies configuration and planning defaults that govern repair order behavior, aligning creation with depot repair planning setup.
  • OE_ORDER_HEADERS_ALL — The Order Management order header table, reflecting that repair orders are represented as sales order headers, and the create function writes or reads from it to establish the order.
  • DUAL — Used for single-row selection and function initialization semantics.

Usage Notes

CSP_REPAIR_ORDER_PKG is typically invoked from server-side PL/SQL — custom forms, concurrent programs, or bespoke integration code — rather than through a standard EBS user interface. Because CREATE_REPAIR_ORDER returns a REF CURSOR, calling code must declare a matching cursor variable and fetch the rows explicitly; the function does not commit or return a scalar status. Callers should therefore treat it as part of a larger transaction that must be explicitly committed and validated. The package is documented as being referenced by no other packages, indicating it is a leaf dependency invoked directly by application or custom code rather than through nested package chains. Before use, ensure the required setup exists in CSP_PLANNING_PARAMETERS and that the source and destination organizations are valid, since these are validated against HR_ALL_ORGANIZATION_UNITS and MTL_SYSTEM_ITEMS. As with most APPS package APIs, test in a non-production environment and confirm behavior against the specific 12.1.1 or 12.2.2 patch level, as the internal implementation may vary between releases.