Search Results is_root_or_leaf




Overview

OZF_QUOTA_ALLOCATIONS_PVT is a private PL/SQL package in the Oracle E-Business Suite (EBS) Trade Management (formerly Oracle Trade Management, module prefix OZF) schema, owned by APPS and declared with AUTHID CURRENT_USER. In Release 12.1.1 and 12.2.2 it provides the internal programmatic engine that manages quota allocations — the mechanism by which quota (budget or accrual capacity associated with a customer, account, or hierarchy node) is distributed, published, and released across the trade management account hierarchy. The package is classified as a PVT (private) API, meaning it is intended for internal consumption by other Trade Management packages and is not documented as a supported public integration interface. Its core responsibilities include building the quota allocation hierarchy, publishing an allocation so that allocated quota becomes active and usable, cancelling a hierarchical quota allocation, and supplying helper utilities that the allocation UI relies upon to render and validate allocation information. The documented header identifies the package as a source-controlled unit (ozfvqals.pls) and shows six documented procedures and functions.

Key Procedures and Functions

  • CREATE_QUOTA_ALLOC_HIERARCHY — Builds the allocation hierarchy for a given allocation identifier, establishing the parent/child relationships used to distribute quota down the account structure. It follows the standard EBS API conventions (API version, message list initialization, commit flag, allocation id, and return status/message out parameters).
  • PUBLISH_ALLOCATION — The central procedure associated with the search term "publish_allocation." It publishes a quota allocation, transitioning it from a staged state to an active, usable state so that allocated funds can be consumed. It accepts API version, init message list, commit, validation level, and allocation id parameters, and returns the standard return status, message count, and message data. The inclusion of a validation level parameter indicates it performs configurable validation before publication.
  • CANCEL_ALLOC_HFQ — Cancels an allocation associated with a hierarchical funding quota, taking the quota id as input and returning standard API status information.
  • IS_ROOT_OR_LEAF — A function returning whether a given quota is a root or leaf node. Per the header comments, it is used to render the link to the Account Allocation page.
  • GET_UNALLOCATED_AMOUNT — Returns the amount of quota that remains unallocated for a given quota id.
  • GET_THRESHOLD_NAME — Returns the descriptive name of a threshold, given a threshold id.

Tables Accessed

The package reads and writes several Trade Management tables through APPS synonyms:

  • OZF_ACCOUNT_ALLOCATIONS — Stores the allocation records that are built and published by CREATE_QUOTA_ALLOC_HIERARCHY and PUBLISH_ALLOCATION.
  • OZF_FUNDS_ALL_B — Holds the funds/quota base records whose amounts are allocated, validated, and released during publication and cancellation.
  • OZF_ACT_METRICS_ALL and OZF_ACT_METRIC_FACTS_ALL — The activity metrics and metric fact tables used to evaluate allocation performance or threshold-related data.
  • DUAL — Used for simple single-row queries, typically within the utility functions.

Usage Notes

Because OZF_QUOTA_ALLOCATIONS_PVT is a private API, it is normally invoked indirectly. The documented metadata records that it is referenced by one other package within the application, which acts as the caller in standard flows. In practice, its procedures are triggered from the Trade Management Account Allocation and quota screens, where a user builds a hierarchy and then publishes the allocation; the form or its underlying controller package calls PUBLISH_ALLOCATION on the user's behalf. Direct custom invocation is possible but unsupported; any custom code must supply the mandatory API parameters, honor the returned x_return_status, and set p_commit appropriately if it needs an autonomous commit. The helper functions IS_ROOT_OR_LEAF, GET_UNALLOCATED_AMOUNT, and GET_THRESHOLD_NAME are read-only utilities suited to validation and display logic within allocation-related processing.