Search Results full_load




Overview

The APPS.OZF_REFRESH_SALES_PVT package body is a private (PVT-classified) PL/SQL component within the Oracle E-Business Suite Trade Management (formerly Oracle Trade Management / OZF) module. Its principal business function is to refresh and repopulate the sales transaction staging structures used by Trade Management for accrual, promotion, and rebate processing. The package reads transactional sales data from Oracle Order Management and enriches it with customer, site, and item attribute information before writing the results into the OZF sales transaction tables.

The excerpt confirms that the package operates under the header revision ozfvrfsb.pls 120.2 and is dependent on several system profile options that govern its runtime behaviour, notably OZF_TP_GLOBAL_START_DATE, OZF_TP_COMMON_UOM, OZF_TP_COMMON_CURRENCY, and OZF_CURR_CONVERSION_TYPE. The reference to OZF_TP_COMMON_CURRENCY — the term the user searched — reflects the package's use of a globally configured reporting currency into which sales amounts are normalised during the refresh process. This ensures that Trade Management calculations are performed in a single, consistent currency regardless of the transactional currency of the originating order.

Key Procedures and Functions

  • FULL_LOAD — The main driver procedure. It accepts an outbound return status parameter and orchestrates the complete refresh of the sales transaction data. It retrieves the profile-driven start date, common UOM, common currency, and conversion type, then drives the cursor logic that identifies and processes eligible source records. Its error-handling cursor (error_csr) and profile-name cursor (prf_name_csr) support diagnostics and profile validation during the load.
  • GET_PRIMARY_UOM — A helper function that returns the primary unit of measure for a given inventory item. It reads from MTL_SYSTEM_ITEMS and, in the documented implementation, uses ROWNUM = 1 to guarantee a single-row result. It returns a sentinel value ('LLLPP') on exception to signal a lookup failure.
  • GET_PARTY_ID — A helper function that resolves the Trading Community Architecture (TCA) party identifier associated with a customer account. It queries HZ_CUST_ACCOUNTS and returns a negative sentinel on failure.
  • GET_PARTY_SITE_ID — A helper function that resolves the party site identifier from a site-use identifier. It joins HZ_CUST_ACCT_SITES_ALL and HZ_CUST_SITE_USES_ALL and returns a sentinel on exception.

The documented metadata lists four procedures/functions; the excerpt additionally implies the presence of LOAD as a documented entry point.

Tables Accessed

The package reads from MTL_SYSTEM_ITEMS to resolve item UOM attributes, and from the TCA customer model — HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_SITES_ALL, and HZ_CUST_SITE_USES_ALL — to map customer, account, and site identifiers. Source sales data is drawn from OE_ORDER_HEADERS_ALL and OE_ORDER_LINES_ALL. Refreshed results are written to OZF_SALES_TRANSACTIONS_ALL and its DFF/sequence companion OZF_SALES_TRANSACTIONS_ALL_S, which together constitute the Trade Management sales transaction repository.

Usage Notes

This is a private package (PVT) and is not intended for direct invocation by external custom code. It is referenced by zero other packages in the documented metadata, indicating that it is invoked from within the OZF refresh subsystem itself — typically from a wrapper public API or a concurrent program responsible for the Trade Management sales data refresh. Administrators configure the profile options (OZF_TP_COMMON_CURRENCY, OZF_TP_COMMON_UOM, OZF_CURR_CONVERSION_TYPE, OZF_TP_GLOBAL_START_DATE) prior to execution, since these values directly determine the scope, currency normalisation, and UOM normalisation applied during the full load. Because the helper functions suppress exceptions and return sentinel values, downstream logic must interpret these markers rather than relying on raised errors.