Search Results compare_req
Overview
POR_AMENDMENT_PKG is a core PL/SQL package in the Oracle E-Business Suite Purchasing module, owned by the APPS schema. Its primary business function is to manage the amendment lifecycle of purchasing documents, particularly requisitions and related procurement objects. The package provides the programmatic foundation for detecting changes between document versions, recording a revision history, generating amendment records, and controlling whether a given document is eligible for amendment. It underpins the comparison and audit trail needed when buyers modify requisitions or when purchasing documents move through conformed or non-conformed versioning, ensuring that changes are accurately captured, stored, and made visible to downstream processing such as encumbrance handling.
Key Procedures and Functions
The package exposes 51 documented procedures and functions. The comparison routines, including COMPARE, COMPARE_TABLE, and COMPARE_REQ, examine current versus prior document data to identify differences at the header, line, and distribution level. VERIFY_NO_DIFFERENCES confirms whether an amendment genuinely contains no changes. CHANGE_HISTORY and INSERT_CHANGES persist detected differences into the amendment and revision history structures.
The versioning and copy routines—CREATE_BASE_COPY, CREATE_BASE_VERSION, COPY_HEADER, COPY_LINES, and COPY_DISTRIBUTIONS—build new document versions by copying existing requisition and purchase order components. MERGE_AMENDMENT and MERGE_INTO_CONFORM_VERSION reconcile pending amendments into a conformed version. UPDATE_AMENDMENT and SET_AMENDMENT_STATUS maintain amendment state transitions, while IS_REQ_AMENDABLE determines whether a requisition may be modified at all. Supporting utilities include CREATE_XML for amendment serialization, MAP_ID_TO_NUM for identifier translation, GETAMENDMENTATTRIBUTES for attribute retrieval, and PURGE for cleanup of obsolete amendment data. These routines collectively form the internal engine that Purchasing forms invoke when a user edits a document.
Tables Accessed
POR_AMENDMENT_PKG reads and writes several documented tables through APPS synonyms. PO_UDA_AG_TEMPLATE_USAGES and POR_ITEM_ATTRIBUTE_VALUES supply user-defined attribute and item attribute context. FINANCIALS_SYSTEM_PARAMETERS and FINANCIALS_SYSTEM_PARAMS_ALL provide operating unit and system-level configuration. FND_APPLICATION and FND_USER identify application and user context, while GL_PERIOD_STATUSES governs open-period validation. ICX_PO_HISTORY_DETAILS_S and ICX_PO_REVISIONS_TEMP support revision history and temporary amendment staging during comparison. MTL_CATEGORIES_TL, MTL_SYSTEM_ITEMS, MTL_SYSTEM_ITEMS_KFV, and MTL_UOM_CONVERSIONS supply item, category, and unit-of-measure data. PA_PROJECTS_ALL links amendments to project accounting, and PON_AUCTION_HEADERS_ALL ties the logic to sourcing auctions. The package references other objects including EGO_ATTRS_V and PO_TBL_NUMBER, and is itself referenced by PO_ENCUMBRANCE_PREPROCESSING, reflecting its role in encumbrance-relevant change detection.
Usage Notes
POR_AMENDMENT_PKG is classified as an OTHER-type API rather than a public open interface, so it is not intended for general external integration. It is typically invoked internally by Purchasing forms and concurrent programs, most notably PO_ENCUMBRANCE_PREPROCESSING, and by other APPS packages one level removed. Custom development should avoid direct calls to its internal comparison and copy procedures, since the expected entry points are governed by the standard Purchasing form logic. The dependency on FND_USER and GL_PERIOD_STATUSES indicates that activity should occur within an open purchasing period and under a valid user session. Because the package manages revision history, amendment status, and conformed version merging, any customization that manipulates amendments must preserve its sequencing of comparison, insertion, and merge operations to avoid orphaned revisions or inconsistent amendment status.