Search Results po_copydoc_s5




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

APPS.PO_COPYDOC_S5 is a PL/SQL package within the Oracle E-Business Suite Purchasing module. The naming convention identifies it as the fifth helper package (S5) in the PO_COPYDOC family, a set of packages that collectively implement the "Copy Document" feature. This functionality allows users to create a new purchasing document — a purchase order, blanket agreement, contract, or quotation — by copying line, shipment, distribution, and pricing information from an existing source document. Rather than re-entering extensive detail, a buyer selects a source document and the copy engine replicates the relevant structures into the new document.

Within that architecture, PO_COPYDOC_S1 acts as the top-level driver, orchestrating the overall copy flow and delegating specific processing steps to subordinate modules such as PO_COPYDOC_S5. This package therefore occupies a specialized role: it handles the distribution-level accounting and validation logic that must be performed so that copied purchasing documents carry forward correctly derived charge account assignments. Its status is documented as VALID in the ETRM reference for both 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes two documented procedures:

  • VALIDATE_DISTRIBUTION — Performs validation of distribution records associated with the copied document. This includes checking that required accounting flexfield segments resolve to a valid combination and that the distribution data is internally consistent before the record is committed. Validation protects the integrity of downstream receiving, matching, and invoicing activities, which depend on a well-formed distribution row.
  • GENERATE_ACCOUNTS — Derives and populates the charge account information for distributions on the new document. When a source document's account assignments cannot simply be reused — for example, when the target document header carries different default accounting or when distribution-level overrides apply — this routine reconstructs the appropriate account combination using the applicable sourcing hierarchy and system accounting defaults.

Together these procedures support the accounting integrity step of the copy process, ensuring that a cloned document is financially valid and not merely a structural replica.

Tables Accessed

The documented dependency list shows the package reading and writing the core Purchasing document tables, resolved through APPS synonyms:

Usage Notes

PO_COPYDOC_S5 is not intended for direct invocation by end users. It is called internally by PO_COPYDOC_S1, as confirmed by the documented reference relationship (it is referenced by that single package and by itself for internal recursive calls). The typical entry point is the Oracle Purchasing "Copy Document" form, where a user selects a source document and initiates the copy; the form engine invokes the PO_COPYDOC chain, which routes to PO_COPYDOC_S5 for distribution validation and account generation.

Because the package is classified as OTHER and is not a published, supported API, customizations that call it directly should be avoided. Any custom code requiring distribution validation or account generation should instead use the sanctioned Purchasing open interfaces or documented public APIs. The procedures run within the transaction of the calling process, so rollback and error handling are governed by the parent PO_COPYDOC_S1 invocation rather than being self-managed. Changes to this package should be expected only through Oracle-supplied patches or upgrades.