Search Results us_gp_multiple_gre_ctd




Overview

PAY_US_TAXBAL_VIEW_PKG is a PL/SQL package in the Oracle E-Business Suite Payroll (PAY) application, owned by the APPS schema. Its principal role is to compute and return U.S. statutory tax balances for a given assignment, jurisdiction, and time context during payroll processing and reporting. The package encapsulates the logic that derives taxable wage bases and tax amounts from payroll run results, applying taxability rules and balance definitions defined within Oracle Payroll. It is a dated object: the source header reflects a build shipped in 2008 (pyustxbv.pkh 120.0.12010000.1), and the same package body is present in both 12.1.1 and 12.2.2 installations. The package is referenced by 46 other packages, which indicates it functions as a shared, low-level calculation service rather than an end-user feature. The user who searched for "us_tax_balance_vm" is almost certainly investigating the view-mode wrapper function, which is one of the package's public entry points.

Key Procedures and Functions

The package exposes 20 documented procedures and functions, several of which are overloaded. The central calculation function is US_TAX_BALANCE, which returns a number representing a tax balance amount; it accepts a tax balance category, tax type, employee-or-employer indicator, time type, assignment type, GRE context, jurisdiction context, assignment action, assignment, virtual date, and (in one overload) a payroll action identifier. A second overload of the same name adds the payroll action parameter while preserving the base signature.

US_TAX_BALANCE_VM is the documented "_vm" wrapper, described in the source comments as calling us_tax_balance with the asg_type parameter derived from a view_mode context stored in a package global by set_view_mode. This allows callers to avoid passing assignment type explicitly. US_NAMED_BALANCE and its US_NAMED_BALANCE_VM counterpart return balances identified by a balance name and dimension suffix rather than by tax category. PAYMENTS_BALANCE_REQUIRED returns a Boolean-style flag indicating whether a payments balance is needed for the given context.

The remaining functions are GRE- and jurisdiction-aware aggregate balance helpers: US_GP_MULTIPLE_GRE_YTD, US_GP_MULTIPLE_GRE_QTD, US_GP_MULTIPLE_GRE_MTD, US_GP_MULTIPLE_GRE_CTD, US_GP_SUBJECT_TO_TAX_GRE_YTD, US_GP_SUBJECT_TO_TAX_GRE_QTD, US_GP_SUBJECT_TO_TAX_GRE_MTD, US_GP_SUBJECT_TO_TAX_GRE_CTD, US_GP_GRE_JD_YTD, US_GP_GRE_JD_QTD, US_GP_GRE_JD_MTD, and US_GP_GRE_JD_CTD. These names encode the aggregation period (year-to-date, quarter-to-date, month-to-date, calendar-to-date) and the scope (multiple GREs, subject-to-tax wage bases, or jurisdiction-specific). One member, US_GP_MULTIPLE_GRE_QTD_SS_W11, carries a special suffix indicating a variant tied to a specific statutory rule.

Tables Accessed

The package reads from a set of Payroll and Fast Formula tables through APPS synonyms. Balance definition and type metadata are drawn from PAY_BALANCE_TYPES, PAY_DEFINED_BALANCES, and PAY_BALANCE_DIMENSIONS. Actual period-to-date figures are obtained from PAY_ASSIGNMENT_LATEST_BALANCES and the underlying PAY_RUN_RESULTS and PAY_RUN_RESULT_VALUES tables, joined through PAY_ASSIGNMENT_ACTIONS and PAY_PAYROLL_ACTIONS. Taxability determination relies on PAY_TAXABILITY_RULES and PAY_ELEMENT_TYPES_F. GRE and jurisdiction context resolution uses FF_USER_ENTITIES. Additional context is supplied by PAY_BALANCE_FEEDS_F, PAY_RUN_TYPES_F, PAY_ACTION_INTERLOCKS, and PAY_PRE_PAYMENTS.

Usage Notes

PAY_US_TAXBAL_VIEW_PKG is not an end-user object; it is invoked programmatically by payroll calculation routines, Fast Formula functions, and balance reporting packages. The presence of the VM wrapper and the package-global view_mode context suggests it was designed for use behind Oracle Forms or OAF-based payroll balance views, where the display mode is set once and reused across many balance lookups. Custom code should call the functions through the APPS synonym, pass a valid GRE and assignment context, and expect the return value as a NUMBER. Because 46 packages reference it, changes to this package carry a wide blast radius and should be treated as a core payroll interface.