Search Results update_quota_subset
Overview
IEC_QUOTAUPDATE_PVT is a private (PVT-classified) PL/SQL package body owned by APPS and shipped as part of the Oracle E-Business Suite quoting and trade-management (ETRM) modules, notably iStore and Oracle Quoting. Its single business purpose is to maintain the remaining or "working" quota that governs how many units of a product, configuration, or promotion may still be released against a quota-limited sales document header, list, or list subset. In EBS 12.1.1 and 12.2.2 this logic sits beneath higher level quota validation APIs, allowing the application to decrement available quota as lines are added, priced, ordered, or submitted, and to clamp the resulting balance at zero when the requested consumption exceeds what remains. Because the specification is marked "PVT," the package is intended strictly for internal invocation by other EBS components rather than for direct customer callouts.
Key Procedures and Functions
- UPDATE_QUOTA_SUBSET — Recomputes and writes back the working quota for a specific list subset. It first reads the subset definition (quota value and release strategy) from IEC_G_LIST_SUBSETS, and only proceeds when the governing release strategy is 'QUO'. It then iterates the runtime subset rows, subtracting the passed-in consumed quantity from each working quota, setting the balance to zero where the subtraction would produce a negative value, and updating the row in place. The resulting balance is passed back to the caller for downstream validation.
- UPDATE_QUOTA_LIST — The list-level counterpart. It opens a cursor over runtime list rows for a given list header, and for rows whose release strategy is 'QUO' with a positive quota, deducts the supplied consumed quantity from the working quota, clamping at zero, and updates the row. The final computed balance is returned to the caller.
- UPDATE_QUOTA — The umbrella entry point documented in ETRM 12.2.2. It orchestrates the quota update across the applicable list and subset scopes, dispatching to the list and subset routines so that header-level and subset-level remaining quantities stay consistent.
Tables Accessed
- IEC_G_LIST_RT_INFO — Runtime table holding each list header's quota, release strategy, and working quota. It is read via cursor and updated in place (FOR UPDATE OF WORKING_QUOTA) by UPDATE_QUOTA_LIST.
- IEC_G_LIST_SUBSETS — Definition table for list subsets, supplying the subset quota and release strategy that determine whether UPDATE_QUOTA_SUBSET should decrement anything at all.
- IEC_G_SUBSET_RT_INFO — Runtime table of subset-level working quotas, updated in place by UPDATE_QUOTA_SUBSET after the deduction is computed.
Usage Notes
Because the package is classified PVT, it is invoked indirectly. In a typical flow, an order, quote, or iStore checkout validation routine determines the quantity to be consumed and calls UPDATE_QUOTA (or the list/subset procedures) to decrement the corresponding working quota values before committing the document. The procedures therefore run in the transaction of the calling form, concurrent program, or API, and their row locks on the runtime tables are held until that transaction commits. Several behavioural constraints are worth noting: the deduction applies only where RELEASE_STRATEGY equals 'QUO'; when no runtime row is found the sentinel value of -1 is returned, distinguishing "no quota scope" from a genuine zero balance; and negative results are always clamped to zero, so a quota is never shown as over-consumed. Customisations should not replace this package, as the underlying quota validation logic depends on its exact update semantics; the supported extension route is to call the public quota API that fronts it. Correct behaviour also assumes the runtime tables have been properly populated for the list or subset being processed.