Results for “process_delete_line_loc”
14 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
PO_SHIPMENTS_SV4 is a server-side PL/SQL package in the Oracle Purchasing (PO) module of Oracle E-Business Suite, owned by the APPS schema and classified as an "OTHER" API. Its core responsibility is the deletion and validation of purchasing shipment records, which are physically stored as line location rows in the PO_LINE_LOCATIONS_ALL table. Shipment (line location) records represent the scheduled, deliverable portion of a purchase order, RFQ, or quotation line, and they carry receipt, invoicing, and tax-relevant attributes. Because these rows are referenced by downstream documents and, in Release 12, by the eBusiness Tax (eTax) integration, deletion cannot be a simple DML operation. PO_SHIPMENTS_SV4 encapsulates the validation logic and the cascading delete logic required to remove shipments safely, including cleanup of associated attachments and the propagation of shipment data to the tax engine. The package header source carries a revision header dated 2007, reflecting its stability across the 12.1.1 and 12.2.2 codelines.
Key Procedures and Functions
The package exposes six documented program units, of which the following are the principal ones relevant to the delete-line-location use case:
- VALIDATE_DELETE_LINE_LOC — Performs the pre-deletion validation for a shipment (line location) row. It determines whether the specified line location may be deleted given the entity level and document type supplied by the caller, and returns success or failure so that the caller can abort before any irreversible DML occurs.
- PROCESS_DELETE_LINE_LOC — The execution counterpart to the validation procedure. Once validation succeeds, this unit performs the actual deletion of the line location and its related subordinate data, including shipment-level attachments and tax-integration notification.
- delete_all_shipments — A private helper procedure that deletes every shipment belonging to a given parent, driven by the X_delete_id, X_entity_level, and X_type_lookup_code inputs. It opens one of three internal cursors (C_LINE for line-level deletes, C_RELEASE for release-level deletes, and C_HEADER for header-level deletes) and iterates over the affected PO_LINE_LOCATIONS_ALL rows. Line-level deletion is skipped for RFQ and QUOTATION document types, and the package explicitly filters on shipment type for tax-handling purposes.
- NAME — A standard package-level identifier construct maintained in the documented procedure list.
The Release 12 eTax integration block declares a nested table type over PO_LINE_LOCATIONS_ALL.SHIPMENT_TYPE and a ZX_API_PUB.transaction_line_rec_type record, together with header, release, line-location, and org-id collections, so that deleted shipments can be reported to the tax service before the rows disappear.
Tables Accessed
The package reads and writes the following objects through APPS synonyms:
- PO_LINE_LOCATIONS_ALL / PO_LINE_LOCATIONS — The primary shipment table; rows here are selected for validation and removed during processing. The _ALL variant is used to span operating units, and the base table is referenced directly rather than the view (per Bug 6632095).
- PO_HEADERS_ALL, PO_LINES_ALL — Parent purchasing documents and lines, consulted to establish the ownership chain from shipment back to header.
- PO_DISTRIBUTIONS — Accounting distributions attached to the line location; relevant to deleting shipments that carry accounting detail.
- PO_PRICE_DIFFERENTIALS — Price differential records linked to shipments.
- PLITBLM — The Purchasing line/location temporary/interface table, used in the deletion and validation flow.
Usage Notes
PO_SHIPMENTS_SV4 is not intended for direct ad hoc invocation. It is called by the Purchasing forms and by other server-side packages that must remove or validate shipment rows; the ETRM metadata records four dependent packages referencing it. Customizations should call VALIDATE_DELETE_LINE_LOC before PROCESS_DELETE_LINE_LOC to honor the same business rules the standard forms apply, and should supply the correct entity level and type lookup code so that the header, release, or line cursor is chosen correctly. Because deletion of line locations affects receipts, invoices, and tax reporting, this package should only be used within the standard Purchasing transaction flow or in carefully controlled concurrent processing.