Search Results get_bill_to_address




Overview

XNB_SALES_ORDER_PVT is a private PL/SQL package body in the Oracle E-Business Suite APPS schema that supports the Oracle Electronic Tax Reporting and Management (ETRM) / eBTax integration for sales order tax determination. The package belongs to the XNB module, whose name derives from the "XNB" transaction type defined by the constant g_xnb_transation_type, and carries forward the header identifier XNBVPSOB.pls. Its central business purpose is to publish sales order data from Oracle Order Management into the ETRM tax repository so that indirect tax can be calculated, stored, and reported against sales order lines. The package assembles transactional facts — sold-to and bill-to party details, addresses, inventory items, and account associations — from Order Management, Oracle Receivables party model, and inventory tables, then persists them into the ETRM collection structures. Because it is a PVT (private) package, it is not a public API; it is designed to be invoked from within the ETRM workflow and other ETRM application code that rely on its procedures to move sales order payloads into the tax engine.

Key Procedures and Functions

The documented package exposes ten procedures and functions, organized around publishing, retrieving, and cleaning up sales order tax data:

  • CREATE_SALES_ORDER — Creates the sales order header record within the ETRM data store, establishing the parent key used by line-level operations.
  • PUBLISH_BILL_TO_ADDRESS — Publishes the bill-to address of a sales order so the tax engine can determine the jurisdiction for tax calculation.
  • GET_BILL_TO_ADDRESS — Retrieves the bill-to address details for a sales order, typically as a helper to PUBLISH_BILL_TO_ADDRESS. This is the object referenced by the search "get_bill_to_address."
  • PUBLISH_LINE_BILL_TO_ADDRESS — Performs the equivalent bill-to address publication at the sales order line level, supporting line-specific tax treatment.
  • CHECK_ACCOUNT — Validates that the customer account associated with the sales order exists and is valid for tax processing.
  • CHECK_NONINVOICEABLE_ITEM — A private API that determines whether a sales order line references a non-invoiceable item by reading the invoiceable_item_flag from MTL_SYSTEM_ITEMS_B; this evaluation is embedded in the ETRM workflow as a function activity with itemtype, itemkey, actid, funcmode, and resultout arguments.
  • RETURN_SHIP_TO_ADDRESS and RETURN_INSTALL_AT_ADDR — Return ship-to and install-at address information for a line, supporting tax rules that depend on delivery destination or installation location.
  • TRUNCATE_SALES_ORDER and TRUNCATE_ALL_LINES — Remove previously published sales order and line data from the ETRM structures, used for reprocessing and correction scenarios.

Tables Accessed

The package reads and writes across Order Management, Receivables, inventory, and ETRM-specific tables, accessed through APPS synonyms:

Usage Notes

XNB_SALES_ORDER_PVT is a private package and is referenced by zero other documented packages, meaning it is invoked directly by ETRM application logic, Oracle Workflow function activities, or the ETRM concurrent programs that populate the tax repository rather than by third-party extension code. The CHECK_NONINVOICEABLE_ITEM procedure is clearly registered as a workflow function activity, using wf_engine.getitemattrtext to read item attributes such as SALE_ORG_ID and SALES_ORDER_ID. Note that the R12 MOAC uptake comment (revision 120.4, dated 2005/10/17) indicates that the legacy dbms_application_info.set_client_info call was disabled, so org context is derived from the workflow item attributes instead. Customers on 12.1.1 and 12.2.2 should treat this package as an internal ETRM artifact: do not call its procedures directly from custom code, and expect behavior to change with ETRM patches. Development focused on sales order tax data should use the supported public ETRM APIs.