Search Results get_w2_location_id




Overview

APPS.HR_US_W2_REP is a PL/SQL package in Oracle E-Business Suite that provides the data access layer for United States W-2 payroll reporting. Declared with AUTHID CURRENT_USER, the package exposes a set of functions and procedures that return the individual values and parameters required to render W-2 forms and their associated federal, state, and county wage and tax reporting data. Rather than performing report formatting itself, the package acts as a reusable repository of W-2 calculation and lookup logic that other payroll reporting objects invoke. The package header carries a header revision tag (pyusw2pg.pkh) and the source is maintained by Oracle payroll development; the current documented version reflects maintenance through the 12.1.1 and 12.2.2 release lines. The package is a long-lived, heavily referenced component — the documentation records that it is referenced by 35 other packages — which underscores its role as a foundational utility for US statutory year-end payroll processing.

Key Procedures and Functions

ETRM documents 28 procedures and functions within the package. The following are explicitly listed:

Tables Accessed

The package reads from a defined set of tables accessed through APPS synonyms. Archival and balance data is sourced from FF_ARCHIVE_ITEMS, FF_ARCHIVE_ITEM_CONTEXTS, FF_CONTEXTS, FF_DATABASE_ITEMS, and FF_USER_ENTITIES (the Flexfields archived-data structures). Reference and lookup values are drawn from FND_LOOKUP_VALUES. Location and organization attributes come from HR_LOCATIONS_ALL and HR_ORGANIZATION_INFORMATION, with address data from PER_ADDRESSES. Employee and assignment data is sourced from PER_ALL_PEOPLE_F and PER_ALL_ASSIGNMENTS_F, while payroll context comes from PAY_PAYROLL_ACTIONS, PAY_ASSIGNMENT_ACTIONS, PAY_JOB_WC_CODE_USAGES, and PAY_US_COUNTY_TAX_INFO_F. These tables supply the federal, state, and county wage/tax values required for W-2 generation.

Usage Notes

HR_US_W2_REP is typically invoked indirectly rather than called by end users directly. It is consumed by the US Payroll year-end W-2 report and archive programs, by the W-2 forms and reconciliation concurrent programs, and by other reporting packages that need consistent W-2 value resolution. Because it is referenced by 35 other packages, customizations should avoid modifying the package and should instead call its public functions. The AUTHID CURRENT_USER declaration means the package executes with the privileges of the calling user, so callers must have appropriate grants on the underlying tables and synonyms. Custom year-end reports and interfaces can invoke the GET_W2_* functions to obtain standardized W-2 values without reimplementing payroll business rules, and the GET_W2_ARCH_BAL function in particular supports retrieval of archived balances filtered by tax unit or jurisdiction.