Search Results copy_uda_attrs




Overview

PO_COPYDOC_S1 is an Oracle E-Business Suite (EBS) PL/SQL package owned by the APPS schema that supports the "Copy Document" feature within Oracle Purchasing. Its primary business function is to duplicate an existing purchasing document — such as a purchase order, quotation, or requisition — into a new document, carrying forward header, line, and distribution information while allowing the user to modify select attributes before saving. This capability is widely used to reduce manual re-entry when creating similar orders, blanket agreements, or contracts. In EBS 12.1.1 and 12.2.2, the package operates as part of the family of copy-document packages (PO_COPYDOC_S1 through PO_COPYDOC_S5 and PO_COPYDOC_SUB) that together form the copy engine invoked primarily from the Purchasing forms. The package status is VALID, and it is classified as an API of type OTHER within the ETRM repository. It is referenced by six other packages, indicating a central role in the document duplication workflow.

Key Procedures and Functions

The documented package exposes ten procedures and functions. COPY_DOCUMENT is the primary entry point that orchestrates the duplication of a source document into a new target document. ONLINE_REPORT manages the online reporting text associated with the copy operation, allowing informational or diagnostic messages to be surfaced to the user. COPYDOC_SQL_ERROR provides centralized error handling for SQL failures encountered during copying, while COPYDOC_DEBUG supports debugging output during development or troubleshooting. The functions PO_IS_DROPSHIP, PO_HAS_CONFIG_ID, and REQ_HAS_CONFIG_ID perform validation checks — identifying drop-ship purchase orders and detecting configuration identifiers on orders and requisitions respectively, which is relevant for configured items. VAL_PARAMS_AND_DUPLICATE_DOC validates the input parameters and verifies whether the document being created duplicates an existing one. RET_AND_DEL_ONLINE_REPORT_REC retrieves and deletes online report records after they have been consumed. Finally, COPY_UDA_ATTRS copies user-defined attribute (UDA) values from the source document to the new document, preserving descriptive flexfield data.

Tables Accessed

The package reads and writes several core Purchasing and inventory tables through APPS synonyms. PO_HEADERS and PO_HEADERS_ALL hold the document header information that serves as the source and target of the copy. PO_DISTRIBUTIONS and PO_DISTRIBUTIONS_ALL store the accounting distributions copied with each line. PO_LINES and PO_LINE_LOCATIONS carry the item lines and shipment or schedule details. PO_REQUISITION_HEADERS_ALL supports copying when the source is a requisition, and PO_ONLINE_REPORT_TEXT stores the online report messages managed by ONLINE_REPORT and RET_AND_DEL_ONLINE_REPORT_REC. Item validation depends on MTL_SYSTEM_ITEMS, MTL_SYSTEM_ITEMS_B, and MTL_UNITS_OF_MEASURE. Approval-related data is read from PO_AME_APPROVALS_S, and supplier-list attributes from PO_ASL_ATTRIBUTES. FINANCIALS_SYSTEM_PARAMETERS and FINANCIALS_SYSTEM_PARAMS_ALL supply operating unit and system-level defaults.

Usage Notes

PO_COPYDOC_S1 is typically invoked indirectly through the Oracle Purchasing forms when a user selects the Copy Document action on an existing order or requisition. It is also callable from custom PL/SQL code or concurrent programs that automate document duplication, though direct invocation requires attention to the companion packages (PO_COPYDOC_S2 through _S5, PO_COPYDOC_SUB, and PO_DOCUMENT_CONTROL_PVT) that reference it. Because several dependencies are documented only at the object level, developers extending copy behavior should trace the cross-references shown in the ETRM metadata before altering calls. The package respects financials system parameters, so behavior can vary by operating unit. Validation routines such as PO_IS_DROPSHIP and the configuration-ID checks ensure that specialized document types are handled correctly during the copy.