Search Results get_target_pkey




Overview

OZF_ALLOCATION_ENGINE_PVT is a private PL/SQL package in the APPS schema that implements the core allocation engine for Oracle Trade Management (formerly Oracle Marketing) within Oracle E-Business Suite 12.1.1 and 12.2.2. Its responsibility is to distribute trade management targets, funds, products, and time-based allocations across accounts and territories according to the allocation rules configured by the marketing or trade promotions administrator. The package belongs to the OZF (Oracle Funds) module and is classified as a PVT ("private") API, meaning it is intended for internal consumption by other OZF packages rather than as a public, customer-facing API.

In business terms, the engine answers questions such as how much of a promotional fund or quota target should be assigned to each account, how product-level and time-period spreads should cascade through a hierarchy of allocations, and how sales achievements should be retrieved and compared against targets. It underpins quota allocation, funds management, and account/product allocation workflows that drive trade promotion planning and settlement.

Key Procedures and Functions

  • SETUP_PRODUCT_SPREAD — Establishes the initial product-level spread used to distribute an allocation across a set of products.
  • CASCADE_PRODUCT_SPREAD — Propagates a product spread down through dependent allocation records, applying the spread logic across the hierarchy.
  • ALLOCATE_TARGET — Performs the primary allocation of a target value to accounts or territories based on the configured allocation method.
  • GET_TARGET — Retrieves the target value associated with a given allocation record.
  • GET_TARGET_PKEY — Returns the primary key of the target entity, used for linking and lookups.
  • GET_SALES — Fetches sales (actual) figures to compare against allocated targets, leveraging activity metric data.
  • GET_PROD_ALLOC_COUNT — Returns the count of product allocation records, typically used to control iteration or validation logic.
  • ADJUST_ACCOUNT_TARGETS — Adjusts account-level targets, allowing reallocation or correction after initial distribution.

The package depends on FND_API for standard Oracle Application Object Library error handling and message conventions, and STANDARD for basic PL/SQL utilities.

Tables Accessed

Usage Notes

Because OZF_ALLOCATION_ENGINE_PVT is a private package, it is not invoked directly through a standard concurrent program submission form; instead, it is called from public OZF APIs and loaders. The documented reference chain shows it is referenced by OZF_ALLOCATION_ENGINE_PVT_W (a wrapper), OZF_PARTY_MKT_SEG_LOADER_PVT, OZF_QUOTA_ALLOCATIONS_PVT, and OZF_QUOTA_PUB, indicating that quota allocation and party market segment loading processes drive its procedures.

Typical invocation occurs when an administrator runs allocation or quota-related concurrent programs, or when the Trade Management allocation UI triggers the public wrapper package. Custom code should call the public packages (such as OZF_QUOTA_PUB) rather than this private package, and should pass the standard FND_API initialization parameters so that error handling remains consistent with Oracle EBS conventions.