Search Results copy_tmpl_lines
Overview
ASO_COPY_TMPL_PUB is the public Order Capture API package in Oracle EBS that creates quote templates from existing quote documents. Its declared purpose is "creating template from quote," and it is published as the public API of Order Capture. The package header carries the identifier asoptcps.pls and is defined with AUTHID CURRENT_USER, meaning it executes under the privilege domain of the calling session rather than the package owner. This design places the responsibility for object access on the invoking user's grants, consistent with the general Oracle Application Object Library public API model.
In Oracle EBS Release 12.1.1 and 12.2.2, quoting functionality exposed by Oracle Advanced Pricing and Order Capture relies on this package to duplicate the header structure, line structure, line details, shipments, and related relationships that comprise a complete quote, then repurpose that content as a reusable template. The package is one of a small number of documented entry points in the ASO_COPY_TMPL_PUB namespace; the ETRM documentation records five procedures in total.
Key Procedures and Functions
- COPY_QUOTE_TO_TMPL — Top-level orchestrating procedure that copies a source quote into a template. It accepts a source quote header identifier and returns the newly created quote (template) header identifier and quote number, along with standard API return status, message count, and message data outputs. It takes the standard API version number, initialization flag, and commit flag. This is the procedure typically called when a user performs a "create template from quote" action.
- COPY_TMPL_HEADER — Copies the quote header portion only. It accepts a quote header record of type ASO_QUOTE_PUB.qte_header_rec_Type and returns the new header identifier plus the standard return status, message count, and message data outputs. This procedure supports callers that need fine-grained control over header duplication independent of lines.
- COPY_TMPL_LINES — Copies the line-level content from an existing quote header to a new quote header. The user's search term "copy_tmpl_lines" maps directly to this procedure. It accepts the source header identifier, the destination (new) header identifier, and a control record of type ASO_QUOTE_PUB.Control_Rec_Type, and returns the standard API status and message outputs. The control record governs behavioral options during the copy.
- COPY_TMPL_SERVICE — Documented companion procedure handling service-related elements of the template copy, allowing service lines to be replicated alongside physical or standard lines.
- CONFIG_COPY_TMPL — Documented procedure that supports copy of configurations associated with the source quote, ensuring configured items retain their structure when converted to a template.
Tables Accessed
- ASO_QUOTE_HEADERS_ALL — read for the source header, written for the new template header, including identifiers and header attributes.
- ASO_QUOTE_LINES_ALL — source and destination line records created by COPY_TMPL_LINES.
- ASO_QUOTE_LINE_DETAILS — line detail attributes replicated to preserve pricing and descriptive content.
- ASO_QUOTE_NUMBER_S — sequence supplying the new quote number for the created template.
- ASO_QUOTE_STATUSES_B — status lookup used to assign the correct quote status to the new template.
- ASO_LINE_RELATIONSHIPS — preserves relationships and dependencies between copied lines.
- ASO_SHIPMENTS — shipment-level data copied with the quote lines.
- PLITBLM — PL/SQL message table used by the API's standard message stack.
Usage Notes
ASO_COPY_TMPL_PUB is a public (PUB classified) API and is not referenced by any other documented package, so it is intended for direct invocation rather than internal chaining. It is typically called from Oracle Quoting and Order Capture forms, from concurrent programs that bulk-create templates, and from custom PL/SQL when an implementation must programmatically convert an existing quote into a reusable template. Callers should pass the standard FND_API initialization, version, and commit parameters exactly as declared; the commit flag controls transaction finality and the message list must be initialized when error handling is required. Because the package is AUTHID CURRENT_USER, all referenced objects must be accessible to the invoking session, and callers should inspect X_Return_Status, X_Msg_Count, and X_Msg_Data on return following standard Oracle API error-handling conventions.