Search Results get_dist_change
Overview
PO_DOCUMENT_UPDATE_PVT is a private PL/SQL package in the APPS schema that provides the core engine for applying changes to existing Oracle Purchasing documents. Operating in Oracle E-Business Suite 12.1.1 and 12.2.2, it is the implementation layer behind the public change management APIs, notably PO_CHANGE_API1_S. The package accepts a change record (PO_CHANGES_REC_TYPE) and an error record (PO_API_ERRORS_REC_TYPE), validates the requested modification against the document's current state, and persists the resulting line, shipment, and distribution changes to the transactional tables.
The "PVT" classification indicates that the package is not intended as a published integration interface. External and internal callers are expected to invoke the public wrapper APIs, which delegate to this package for the actual update logic. The package is registered as VALID in the ETRM dictionary and is a dependency of several higher-level change and integration packages.
Key Procedures and Functions
- UPDATE_DOCUMENT — The principal entry point. Drives the update of a purchasing document from a supplied change record and accumulates errors into the API errors structure.
- LAUNCH_PO_APPROVAL_WF — Initiates the Purchasing approval workflow when a document change requires re-approval.
- INIT_CHANGE_INDEXES — Initializes the in-memory change index structures used to track line, shipment, and distribution modifications during a single update call.
- ADD_LINE_CHANGE_TO_INDEX, ADD_SHIP_CHANGE_TO_INDEX, ADD_DIST_CHANGE_TO_INDEX — Populate the change index with the respective line, shipment (line location), and distribution changes parsed from the incoming change record.
- GET_LINE_CHANGE, FIND_LINE_CHANGE — Retrieve an existing line-level change from the index or change record; the "FIND" variant locates the change, while the "GET" variant returns it.
- GET_SHIP_CHANGE, FIND_SHIP_CHANGE — Equivalent retrieval and lookup operations for shipment-level changes.
- GET_DIST_CHANGE, FIND_DIST_CHANGE — Equivalent retrieval and lookup operations for distribution-level changes.
- GET_SPLIT_SHIP_CHANGE — Handles shipment changes arising from a split of an existing shipment quantity or date.
- GET_SPLIT_DIST_CHANGE, FIND_SPLIT_DIST_CHANGE — Retrieval and lookup of distribution changes generated by a distribution split.
- ADD_ERROR, ADD_MESSAGE_LIST_ERRORS — Append validation or processing errors to the API error structure; the second variant accepts a message list.
- VALIDATE_DELETE_ACTION — Confirms that a requested delete action is permissible given the document's state and referencing objects.
- PROCESS_DELETE_ACTION — Performs the actual deletion of lines, shipments, or distributions once validation succeeds.
Tables Accessed
The package reads and writes the primary Purchasing document tables through APPS synonyms: PO_LINES, PO_LINE_LOCATIONS, and PO_DISTRIBUTIONS, which hold the line, shipment, and distribution records being modified. PO_DOCUMENT_TYPES_ALL_B supplies document type attributes that govern allowable actions. Supporting reference data includes FINANCIALS_SYSTEM_PARAMETERS, FND_CURRENCIES, HR_LOCATIONS_ALL, the HZ customer and party site tables (HZ_CUST_ACCT_RELATE_ALL, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL, HZ_LOCATIONS, HZ_PARTY_SITES), and item master tables MTL_SYSTEM_ITEMS, MTL_SYSTEM_ITEMS_B, and MTL_GRADES. These are used for validation defaulting and for resolving values required when changes affect sourcing, pricing, or destination information.
Usage Notes
The package is invoked indirectly. Documented callers include PO_CHANGE_API1_S, PO_DOCUMENT_UPDATE_GRP, PO_OM_INTEGRATION_GRP, PO_RESCHEDULE_PKG, and PO_WIP_INTEGRATION_GRP, each of which calls into PO_DOCUMENT_UPDATE_PVT for the underlying update logic. In practice it is therefore executed when a user modifies a purchase order through the Purchasing forms, when an order-management or WIP integration reschedules or adjusts supply, and when a concurrent program performs scheduled or mass document maintenance. Direct invocation from custom code is not recommended; customizations should call the public PO_CHANGE_API1_S or the appropriate group package so that validation, error handling, and workflow launching are applied consistently.
-
PACKAGE: APPS.PO_DOCUMENT_UPDATE_PVT
12.1.1
-
PACKAGE: APPS.PO_DOCUMENT_UPDATE_PVT
12.2.2
-
APPS.PO_DOCUMENT_UPDATE_PVT dependencies on PO_DISTRIBUTIONS
12.1.1
-
APPS.PO_DOCUMENT_UPDATE_PVT dependencies on PO_DISTRIBUTIONS
12.2.2
-
APPS.PO_DOCUMENT_UPDATE_PVT dependencies on PO_DISTRIBUTIONS
12.1.1
-
APPS.PO_DOCUMENT_UPDATE_PVT dependencies on PO_DISTRIBUTIONS
12.2.2
-
PACKAGE BODY: APPS.PO_DOCUMENT_UPDATE_PVT
12.2.2
-
PACKAGE BODY: APPS.PO_DOCUMENT_UPDATE_PVT
12.1.1