Search Results truncate_sales_order




Overview

XNB_SALES_ORDER_PVT is a private PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified as a PVT (private) API within the ETRM reference. It supports the sales order and billing-to-address processing functionality associated with the XNB application module, which is part of Oracle's order capture and fulfillment extensions. The package is compiled with AUTHID CURRENT_USER, meaning its database objects are resolved using the privileges of the invoking user rather than the package owner, a common pattern for packages that participate in Oracle Workflow business event processing and need to operate across multiple schema contexts.

The package bridges customer master data, installed base records, and the Oracle Order Management order tables. It handles bill-to and ship-to address publication, sales order creation and cleanup, and account validation logic, and it exposes workflow-callable entry points conforming to the standard Oracle Workflow PL/SQL signature (itemtype, itemkey, actid, funcmode, resultout).

Key Procedures and Functions

  • CHECK_NONINVOICEABLE_ITEM — Workflow function-mode procedure that evaluates whether an item is non-invoiceable and returns the outcome through the resultout parameter.
  • PUBLISH_BILL_TO_ADDRESS — Workflow procedure that publishes bill-to address information for downstream consumption.
  • GET_BILL_TO_ADDRESS — Retrieves bill-to address components for a given inventory organization, returning party, account, address, country, state, county, city, and postal code details along with a result code. This is the address resolution routine underlying the bill-to workflow.
  • CREATE_SALES_ORDER — Creates a sales order in Order Management using document, party, account, and address inputs, including primary-bill-to and bill-to-owner flags.
  • TRUNCATE_SALES_ORDER — Workflow procedure that clears sales order staging data associated with a given item key.
  • CHECK_ACCOUNT — Workflow procedure validating customer account information and returning the result through resultout.
  • RETURN_INSTALL_AT_ADDR — Returns the installed-at address for a given instance identifier, emitting address line and city components. This procedure corresponds directly to the user search term "return_install_at_addr" and is the documented entry point for resolving the installation address associated with a customer product instance.
  • RETURN_SHIP_TO_ADDRESS — Returns ship-to address details, complementing the bill-to and install-at address routines.
  • PUBLISH_LINE_BILL_TO_ADDRESS — Publishes bill-to address information at the order line level.
  • TRUNCATE_ALL_LINES — Clears all order line staging records associated with the processing context.

Tables Accessed

The package reads from and writes to several core EBS data model tables through APPS synonyms. Customer master data is sourced from HZ_PARTIES, HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL, HZ_LOCATIONS, and HZ_PARTY_SITES. Order data is persisted in OE_ORDER_HEADERS_ALL and OE_ORDER_LINES_ALL. Installed base context used by RETURN_INSTALL_AT_ADDR comes from CSI_ITEM_INSTANCES, while MTL_SYSTEM_ITEMS_B supplies item definitions. Collection history is tracked through CLN_COLL_HIST_HDR and CLN_COLL_HIST_DTL, and ECX_TP_DETAILS supports trading partner mapping. XNB_BILL_TO_PARTY_DETAILS is the application-specific staging table for bill-to party data.

Usage Notes

XNB_SALES_ORDER_PVT is not referenced by any other documented package, confirming its private classification. It is typically invoked from Oracle Workflow processes, from the XNB application's forms and concurrent programs, and from custom code that needs to resolve bill-to, ship-to, or installed-at addresses or to create and clear sales order records. Because it is a private API, it is not part of Oracle's supported public interface, and implementations that call it directly should expect signature changes between releases, particularly across the 12.1.1 and 12.2.2 code lines.