Search Results create_alloc_hierarchy




Overview

OZF_FUND_ALLOCATIONS_PVT is a private PL/SQL package in the Oracle E-Business Suite Trade Management (formerly Oracle Trade Management / ETRM) schema, owned by APPS and declared with AUTHID CURRENT_USER. It provides the internal engine that drives territory-based fund allocation and approval processing for the Oracle Trade Management budget worksheet. The package resolves how trade funds are allocated across a territory hierarchy, computes prior-year sales as a basis for allocation, and supports the multi-level approval workflow by which sales operations request, recommend, approve, or reject fund amounts by territory node.

Because it is classified as a PVT (private) API, it is not intended as a published integration entry point. Its procedures are invoked internally by the public allocation APIs, the budget worksheet Java/ADF user interface (the header references BudgetTopbotAdmEO.java), and by concurrent processes that publish allocations and refresh allocation worksheets. The package therefore sits between the UI-facing Budget Worksheet and the underlying OZF fund, activity metric, and territory access tables.

Key Procedures and Functions

  • GET_MAX_END_LEVEL — Returns the constant g_max_end_level (99999), which bounds hierarchy end-level processing. Documented as called by BudgetTopbotAdmEO.java.
  • GET_PRIOR_YEAR_SALES — Public API returning prior-year total sales for a single territory node, supplying both the node's self amount and its rollup amount for a given hierarchy, node, basis year, and allocation. Called by compute_worksheet and the UI worksheet page.
  • CREATE_ALLOC_HIERARCHY — Builds the allocation hierarchy structure used to propagate fund amounts down territory levels.
  • PUBLISH_ALLOCATION — Publishes an approved allocation, making it available to downstream processes.
  • VALIDATE_WORKSHEET — Validates worksheet amounts. The constants g_max_ignorable_amount and the associated comments indicate tolerance handling for rounding differences during validation.
  • UPDATE_WORKSHEET_AMOUNT — Persists a worksheet amount change.
  • UPDATE_ALLOC_STATUS — Updates the status of an allocation record.
  • APPROVE_LEVELS — Approves allocations at one or more hierarchy levels, using the factid_type record whose approve_recommend flag (Y/N) selects the recommended amount or the requested amount.
  • SUBMIT_REQUEST — Submits an allocation request into the approval workflow.
  • REJECT_REQUEST — Rejects a submitted allocation request.

Tables Accessed

Usage Notes

This package is referenced by four other packages and is not called directly from customer code in supported implementations. It is invoked by the Budget Worksheet UI through Java/ADF entity objects and by concurrent programs that build, validate, and publish fund allocations. The standard x_return_status / x_msg_count / x_msg_data out parameters indicate that callers must check return status and drain messages via FND_MSG_PUB. In 12.2.2 the same PVT source remains largely unchanged from 12.1.1, and any custom extension should use the public OZF allocation APIs rather than the private package.