Search Results merge_to_org_assign_draft




Overview

APPS.PO_AUTO_HEADER_PROCESS_PVT is a private (PVT) PL/SQL package within the Oracle Purchasing module of Oracle E-Business Suite, valid in both 12.1.1 and 12.2.2. It forms the header-processing layer of the Automatic Document Creation (AutoCreate) facility, which converts approved requisition demand into draft purchase orders, blanket releases, or RFQs. The package is deliberately classified as an internal, private API: it is not intended for direct invocation by external or customer-written code, but rather acts as a subordinate component invoked by the AutoCreate orchestration packages. Its primary business responsibility is to take the raw candidate header rows selected by the AutoCreate selection criteria, derive and default the attribute values that are required for a valid Purchasing document header, validate those headers against Purchasing setup and business rules, and persist them as draft header and organization assignment records. In doing so it centralises the header-level logic — sourcing, defaulting, validation, and draft persistence — that would otherwise be duplicated across the AutoCreate flows.

Key Procedures and Functions

The documented ETRM metadata records five callable units within the package:

  • FETCH_HEADERS — Retrieves the candidate header rows that satisfy the caller's AutoCreate selection and grouping criteria, establishing the working set of headers to be processed.
  • DERIVE_AND_DEFAULT_HEADERS — Applies Purchasing defaulting rules and derivation logic to populate header attributes that were not supplied by the source demand or by the caller, using system parameters and product setup information.
  • VALIDATE_HEADER — Performs header-level validation of the assembled data, enforcing Purchasing business rules before the header is promoted to the draft tables.
  • MERGE_TO_HEADERS_DRAFT — Writes the validated header information into the draft purchase order header structures, creating or updating the draft header representation.
  • MERGE_TO_ORG_ASSIGN_DRAFT — Writes the corresponding organization assignment information into the draft organization assignment structures, linking the draft header to its operating unit/organization context.

Parameter lists are not documented in the ETRM extract and are therefore not reproduced here; callers should treat these procedures as internal and version-sensitive.

Tables Accessed

The package reads and writes a defined set of Purchasing, Financials, and HR tables through APPS synonyms. Header and draft persistence uses PO_HEADERS, PO_HEADERS_ALL, PO_HEADERS_S, PO_HEADERS_DRAFT_ALL, PO_DRAFTS, PO_GA_ORG_ASSIGNMENTS_S, and PO_GA_ORG_ASSIGN_DRAFT. Interface and staging access is provided through PO_HEADERS_INTERFACE. Defaulting and validation depend on setup tables including PO_SYSTEM_PARAMETERS_ALL, FINANCIALS_SYSTEM_PARAMETERS, FINANCIALS_SYSTEM_PARAMS_ALL, and AP_PRODUCT_SETUP. Location defaulting draws on HR_LOCATIONS_ALL.

Usage Notes

PO_AUTO_HEADER_PROCESS_PVT is referenced only by PO_AUTOCREATE_MAINPROC_PVT (and recursively by itself), confirming its role as a private helper within the AutoCreate processing stack rather than a public interface. It is consequently reached indirectly, primarily when users run the AutoCreate concurrent program or the AutoCreate window in the Purchasing responsibility. All header-level derivation, defaulting, validation, and draft writing for an AutoCreate run flow through this package. Because it is a PVT package, Oracle does not guarantee its specification across patches or releases; custom code must not call it directly. Integrators seeking equivalent behaviour should use the supported public AutoCreate APIs or the documented open interfaces rather than this private component.