Search Results auto_create_pur_req_cr




Overview

APPS.CTO_AUTO_PROCURE_PK is a Configure-to-Order (CTO) and Workflow-enabled PL/SQL package body that provides the application programming interfaces for AutoCreate Purchase Requisitions within Oracle E-Business Suite 12.1.1 and 12.2.2. Its central business purpose is to translate demand generated by configured (CTO) sales order lines into procurement documents: requisitions, purchase orders, blanket agreements, and the associated requisition interface records. The package is therefore a bridge between Oracle Order Management, Oracle Bills of Material (CTO modeling), and Oracle Purchasing.

The header comment identifies the file as CTOPROCB.pls and describes its scope as containing "all CTO and WF related APIs for AutoCreate Purchase Requisitions." The package was introduced in September 2001 and has been maintained continuously, with history entries documenting fixes relating to workflow status, accounting organization derivation, purchase rollup logic, ship-to location handling, user item descriptions, Multi-Language Supply (MLSUPPLY), and Global Agreements. In the ETRM metadata for 12.2.2 the object is classified as API type OTHER and owned by APPS, and it is referenced by five other packages, confirming its role as a shared, callable utility rather than a top-level entry point.

Key Procedures and Functions

The documented API surface comprises thirteen procedures and functions:

  • GET_NEED_BY_DATE — Determines the need-by (required) date for a CTO order line, using the manufacturing calendar and sourcing information.
  • AUTO_CREATE_PUR_REQ_CR — The principal documented procedure. It drives the automatic creation of purchase requisitions for CTO demand, invoking the population and document-creation logic. This is the object most commonly associated with the search term "auto_create_pur_req_cr."
  • POPULATE_REQ_INTERFACE — Populates PO_REQUISITIONS_INTERFACE with the rows needed by the Purchasing Document Open Interface. The header history notes a new parameter was added for the MLSUPPLY feature and that ship-to location and user item description were subsequently included.
  • GET_RESERVED_QTY — Returns the quantity of a component or configuration already reserved, used to net demand before procurement.
  • GET_NEW_ORDER_QTY — Returns the newly ordered quantity eligible for procurement.
  • CHECK_ORDER_LINE_STATUS — Validates the status of a CTO order line to determine whether it should participate in auto-procurement.
  • CREATE_PURCHASING_DOC — Creates a purchasing document (requisition, order, or agreement) from the prepared interface data.
  • ROLLUP_LIST_PRICE — Rolls up list price across the configuration structure.
  • ROLLUP_PURCHASE_PRICE — Rolls up purchase price; obtained from the correct organization per the documented fix.
  • ROLLUP_BLANKET_PRICE — Rolls up blanket agreement price, supporting Global Agreements.
  • CREATE_PURCHASE_DOC_BATCH — Creates purchasing documents for a batch of lines.
  • SUBMIT_PDOI_CONC_PROG — Submits the Purchasing Document Open Interface concurrent program to process the interface rows.
  • IS_LINE_ELIGIBLE — Evaluates whether a given line is eligible for auto-procurement.

Tables Accessed

The package reads and writes the following documented tables via APPS synonyms:

Usage Notes

CTO_AUTO_PROCURE_PK is typically invoked through the AutoCreate Purchase Requisitions workflow for configured items, in which Oracle Workflow calls AUTO_CREATE_PUR_REQ_CR to generate interface rows and then submits the Purchasing Document Open Interface program. It may also be called from Oracle Order Management processing when a CTO configuration requires purchased components, and from custom or extension code that needs CTO-aware procurement logic. The header history indicates that error-report launching behavior was removed in 2002, so callers are responsible for status handling. Because the package is referenced by five other packages, changes to its procedures affect dependent programs; releases must be tested against 12.1.1 and 12.2.2 separately. When the PL/SQL is executed, it relies on the APPS schema and on the concurrent manager for any PDOI submission through SUBMIT_PDOI_CONC_PROG.