Search Results net_accrual




Overview

PV_OFFER_PUB is a public PL/SQL API package body owned by the APPS schema in Oracle E-Business Suite, delivered as part of the Advanced Pricing (Oracle Pricing / Oracle Trade Management) module. Its source header identifies it as pvxvoffb.pls, version 115.9, last shipped in August 2004, and the package is classified as a Public API (PUB) in the ETRM metadata for Release 12.2.2. The package encapsulates the business logic required to create and persist promotional offers — the core pricing construct that governs discounts, promotions, qualifiers, and budget accruals within the Trade Management and Advanced Pricing schema (the OZF_% table family).

The package body declares global constants for package identification (g_pkg_name, g_api_name) and establishes four message-level debug flags driven by FND_MSG_PUB.CHECK_MSG_LEVEL at HIGH, LOW, MEDIUM, and ERROR levels. These flags control diagnostic output emitted through the private Debug procedure, which is gated by the FND logging framework (FND_LOG.LEVEL_PROCEDURE). A companion private procedure, Set_Message, standardises error and informational message propagation into the FND message stack, accepting up to three token/value pairs. These two private helpers indicate that the package follows the standard EBS API error-handling and diagnostic conventions.

Key Procedures and Functions

The ETRM metadata documents a single entry point:

  • CREATE_OFFER — the sole public procedure exposed by this package. It is the documented mechanism for creating a new promotional offer record together with its associated qualifiers, discount lines, and discount product relationships. The procedure is not further parameterised in the available metadata, so no parameter list is asserted here; the procedure's purpose is to instantiate the complete offer definition in a single API call, enforcing the business rules and referential integrity that the underlying OZF tables require.

In addition to the public entry point, the body contains two private procedures declared at the top of the specification: Debug, which formats and routes diagnostic messages according to the active debug level, and Set_Message, which registers tokens and message names with the FND message dictionary. These are internal utilities and are not callable from outside the package.

Tables Accessed

The package interacts with the following tables through APPS synonyms:

  • OZF_OFFERS — the master offer header table. CREATE_OFFER inserts the primary offer row here.
  • OZF_OFFER_QUALIFIERS — stores the qualification criteria that a transaction or customer must meet for the offer to apply.
  • OZF_OFFER_DISCOUNT_LINES — holds the individual discount line definitions attached to the offer.
  • OZF_DISCOUNT_PRODUCT_RELN — the relationship table linking discount lines to specific products or product hierarchies.
  • OZF_ACT_BUDGETS — the activity budget table, used to associate or validate the promotion budget (accrual) against which the offer's discounts are funded. This is the table most relevant to the "net_accrual" search, as budget accrual balances are maintained in the OZF budget tables touched by offer creation.
  • PLITBLM — the PL/SQL character table type used to pass collections (typically comma-separated ID lists) into dynamic SQL or bulk operations within the package.

Usage Notes

PV_OFFER_PUB.CREATE_OFFER is typically invoked by the Oracle Pricing and Trade Management forms, by concurrent programs that load or copy offers, and by customer-written extensions that need to programmatically generate offers. Because it is a PUB-classified API, Oracle supports direct calls from custom code, provided callers honour the standard EBS API conventions: initialise the FND message stack with FND_MSG_PUB.INITIALIZE before the call, commit or roll back the transaction afterwards, and inspect FND_MSG_PUB for error messages on failure. The package is referenced by one other package in the ETRM dependency graph. Callers targeting accrual-related functionality should note that offer creation touches OZF_ACT_BUDGETS, so the offer's discount structure must be consistent with the budget definitions already present.