Search Results get_attachment_count
Overview
PO_AUTOCREATE_PVT is the private implementation package that supports the Oracle Purchasing AutoCreate feature in Oracle E-Business Suite 12.1.1 and 12.2.2. AutoCreate allows buyers and purchasing users to generate purchase order documents directly from approved requisition demand, either interactively from the AutoCreate form or through batch processing. The package encapsulates the server-side logic required to build PO data in the open interface tables, validate and calculate pricing, replicate documentation attachments, handle descriptive flexfield and UDA (user-defined attribute) population, and finally clean up temporary interface rows when the AutoCreate session quits. The header comment identifies the package as APPS.PO_AUTOCREATE_PVT with a 120.4.12020000.18 version line, indicating this is the R12.x code line. It is classified as a PVT package, meaning it is not a public API and is intended for internal consumption by the AutoCreate framework. The ETRM metadata documents 15 procedures and functions and 15 referenced tables, and the package is referenced by nine other packages, confirming its role as a shared foundation for AutoCreate-dependent processing.
Key Procedures and Functions
The documented entry points cover session lifecycle, document creation, validation, error handling, and attachment propagation:
- WRAPUP – Performs the actions required immediately before AutoCreate quits, deleting the staged interface rows created during the session.
- CREATE_PO – The core routine that constructs the purchase order data from the selected requisition demand.
- CALCULATE_LOCAL – Computes locally derived values used during AutoCreate document assembly.
- REPORT_ERROR – Logs or surfaces errors encountered during processing.
- GET_REQUISITION_LINE_NUM – Retrieves the requisition line number associated with a given requisition line.
- GET_ERROR_CODE_TBL and INITIALIZE_ERROR_CODE_TBL – Retrieve and initialize the error code collection used to accumulate validation failures.
- FORM_ATTR_DISPLAY_NAME – Resolves the display name of a form attribute, typically for UDA or flexfield presentation.
- INSERT_ROW_IN_UDA_INTERFACE and POPULATE_UDA_DATA_IN_INTERFACE – Insert and populate user-defined attribute data into the interface structures.
- DO_POST_PROCESSING_FOR_PAR – Executes post-processing steps specific to PAR (procurement agent relationship) handling.
- COMPLEX_PRICING_VALIDATION – Validates pricing for complex or services-based lines before interface load.
- UPDATE_MOD_LINE_ID – Updates the modified line identifier on affected records.
- COPY_PAR_ATTACHMENTS – Copies attachments associated with PAR records onto the generated document.
- GET_ATTACHMENT_COUNT – Returns the count of attachments associated with a source entity, used to determine whether attachment copy logic should execute and to drive related validations.
Tables Accessed
The package operates primarily on the Purchasing open interface tables. It inserts and subsequently deletes staged data from PO_HEADERS_INTERFACE, PO_LINES_INTERFACE, PO_LINE_LOCATIONS_INTERFACE, PO_DISTRIBUTIONS_INTERFACE, and PO_PRICE_DIFF_INTERFACE; the WRAPUP procedure removes rows from each of these by interface_header_id, which is carried in PO_AUTOCREATE_PARAMS. Draft tables — PO_DRAFTS, PO_HEADERS_DRAFT_ALL, PO_LINES_DRAFT_ALL, PO_LINE_LOCATIONS_DRAFT_ALL, and PO_DISTRIBUTIONS_DRAFT_ALL — support draft and change-order scenarios. PO_REQUISITION_HEADERS_ALL and PO_REQUISITION_LINES_ALL provide the source demand read during document creation. PO_ENTITY_DIFFERENCES and PO_ENTITY_LOCKS support change-document comparison and concurrency control, while FND_ATTACHED_DOCUMENTS supplies the attachment records queried by GET_ATTACHMENT_COUNT and COPY_PAR_ATTACHMENTS.
Usage Notes
PO_AUTOCREATE_PVT is a private package and should not be called directly from custom code; developers should use public AutoCreate APIs such as PO_AUTOCREATE_S or PO_AUTOCREATE_PUB instead. It is invoked internally by the AutoCreate form (POXPOACR / AutoCreate window) as the user builds and submits documents, and by AutoCreate-related concurrent and batch programs. Because the nine referencing packages depend on its routines, changes to this package carry broad impact. For diagnosing attachment behavior — the context behind searches for get_attachment_count — the function is best traced through the AutoCreate form's attachment flow and the FND_ATTACHED_DOCUMENTS records tied to the source requisition or PAR entity.
-
PACKAGE BODY: APPS.PO_AUTOCREATE_PVT
12.2.2
-
PACKAGE: APPS.PO_AUTOCREATE_PVT
12.2.2
-
APPS.PO_AUTOCREATE_PVT SQL Statements
12.2.2
-
APPS.PO_AUTOCREATE_PVT dependencies on FND_ATTACHED_DOCUMENTS2_PKG
12.2.2
-
APPS.PO_AUTOCREATE_PVT dependencies on FND_ATTACHED_DOCUMENTS
12.2.2
-
APPS.PO_AUTOCREATE_PVT dependencies on FND_API
12.2.2
-
APPS.PO_AUTOCREATE_PVT dependencies on PO_AUTOCREATE_PVT
12.2.2
-
APPS.PO_AUTOCREATE_PVT dependencies on PO_LOG
12.2.2