Search Results submit_draft




Overview

APPS.OE_OE_FORM_REASONS is a PL/SQL package in Oracle E-Business Suite that supports the Order Management (OM) module by managing reason codes and audit comments associated with order modifications. When users change, cancel, or otherwise amend order information through the Order Management forms, the application can be configured to require an audit reason and accompanying comments. This package encapsulates the logic that determines whether a reason is mandatory for a given entity, applies the selected reason to the affected record, tracks version numbers for orders, and submits draft orders. It is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user rather than the package owner, which is consistent with many Oracle Forms support packages in EBS. The package header carries a revision marker dated 2005, reflecting the long-standing stability of this functionality across EBS releases including 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes four documented procedures, each addressing a distinct facet of reason and order handling:

  • APPLY_REASON — Applies a specified reason type and reason code, together with associated comments, to a particular entity identified by entity ID, version number, and entity code. It returns the standard EBS API status triplet (return status, message count, message data) so callers can detect and handle failures.
  • SUBMIT_DRAFT — Submits a draft order identified by its header ID. This procedure is the object most commonly sought by users searching for "submit_draft," as it provides programmatic submission of an order currently held in draft status. It likewise returns the standard return status, message count, and message data outputs.
  • POPULATE_VERSION_NUMBER — Derives and populates the version number for an order based on its header ID and an order version number input. This supports the versioning behavior that underpins audit tracking of order changes.
  • GET_REASON_RQD_INFO — Determines whether an audit reason is required for a given entity, returning flags indicating whether reason capture is enabled and whether a reason is mandatory, along with any existing reason and comments values. This allows form logic to decide whether to prompt the user before permitting a change.

Tables Accessed

The ETRM metadata for this package does not enumerate specific tables referenced through APPS synonyms, and no other packages are documented as calling it. Based on its functional role within Order Management, the package operates against Order Management transactional and reference data — principally order header and line records that carry version information, and the reason/audit configuration data that establishes whether reason capture is required for a given entity. The APPLY_REASON procedure writes reason and comment values to the affected order entity, while GET_REASON_RQD_INFO reads the reason-requirement configuration and any previously stored reason values. Because the documented table list is absent, implementers should treat the exact table inventory as internal and avoid depending on direct table access; the supported integration point is the package API itself.

Usage Notes

This package is primarily invoked from the Oracle Forms-based Order Management user interface, where it enforces audit-reason capture during order entry and maintenance, and handles draft order submission. It may also be called from custom PL/SQL code, concurrent programs, or personalizations that need to programmatically apply a reason to an order change or submit a draft order. Because it is classified as "OTHER" rather than as a formally published public API, Oracle does not guarantee interface stability, and the absence of documented table references reinforces that callers should rely only on the documented procedure signatures. The standard x_return_status, x_msg_count, and x_msg_data outputs should always be checked for error handling. The AUTHID CURRENT_USER declaration means callers must possess the necessary object privileges on the underlying Order Management tables, which is normally satisfied when the package is invoked within the EBS application schema context.