Search Results set_detail_debug




Overview

APPS.PAY_JP_ITWB_REPORT_PKG is a Japanese localization payroll reporting package used by Oracle E-Business Suite to produce the ITWB (income tax withholding book / 源泉徴収票-style) statutory report. The package header carries the version identifier $Header: pyjpiwbr.pkh 120.0 2011/04/08, confirming it is part of the Japanese payroll (PAY_JP) product family. The package is declared AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking session rather than the package owner — a common pattern in EBS payroll reporting packages that must read data through APPS synonyms in the caller's security context.

The package maintains a substantial set of package-level global variables used to carry payroll-action context between the archive, cursor, and XML generation phases of a single report run. These globals include sort-order columns (g_sort_order1 through g_sort_order3), maximum-column-count flags for salary earnings, salary deductions, bonus earnings, bonus deductions and work records (g_sal_earn_max_col_cnt, g_sal_dct_max_col_cnt, g_bon_earn_max_col_cnt, g_bon_dct_max_col_cnt, g_wrk_max_col_cnt), the per-job record count g_pjob_max_rec_cnt, and reporting controls such as g_detail_debug and g_show_tag. The package also tracks the payroll action (g_payroll_action_id), effective dates (start/end of year, month), business group and legislation code, assignment set, organization hierarchy flags, and termination criteria.

Key Procedures and Functions

  • SET_DETAIL_DEBUG — Sets the package global g_detail_debug that governs verbose diagnostic output during report generation. This is the procedure referenced by the user's search term and is the standard toggle for troubleshooting detailed report logic.
  • RANGE_CURSOR — Defines or resolves the driving cursor that ranges assignments for the report, typically filtering by payroll action, organization, assignment set, and effective date globals.
  • ASSIGNMENT_ACTION_CREATION — Creates the assignment action rows required for the report run, writing to PAY_ASSIGNMENT_ACTIONS and its _S subordinate table.
  • ARCHINIT — Initializes the archive phase, establishing the payroll action and effective-date globals before data extraction begins.
  • GEN_XML_HEADER — Generates the XML header section of the ITWB report output, using the csr_bg cursor (a DUAL-based unit cursor) as a structural anchor.
  • GEN_XML_BODY — Produces the XML body containing the per-employee withholding detail; the csr_emp cursor is documented as the unit of this procedure.
  • GEN_XML_FOOTER — Emits the XML closing/footer section.
  • ARCHIVE_DATA — Persists extracted payroll data to the archive tables used by the report, applying the g_arch_option mode.
  • DEINITIALIZE_CODE — Resets package globals and releases state after report completion.

Tables Accessed

The package reads and writes through APPS synonyms. Payroll action and assignment processing relies on PAY_PAYROLL_ACTIONS, PAY_ASSIGNMENT_ACTIONS and PAY_ASSIGNMENT_ACTIONS_S. Assignment-set filtering uses HR_ASSIGNMENT_SET_AMENDMENTS. Organizational hierarchy and reporting context draw on HR_ALL_ORGANIZATION_UNITS, PER_ORGANIZATION_STRUCTURES, PER_ORG_STRUCTURE_ELEMENTS and PER_ORG_STRUCTURE_VERSIONS. Balance and element data for the withholding calculation come from PAY_BALANCE_TYPES, PAY_DEFINED_BALANCES, PAY_ELEMENT_ENTRY_VALUES_F and PAY_INPUT_VALUES_F. The PL/SQL table PLITBLM supplies name/value pairs, and DUAL supports the csr_bg unit cursor.

Usage Notes

PAY_JP_ITWB_REPORT_PKG is invoked in the context of the Japanese ITWB report concurrent program, which drives the archive phase (ARCHINIT/ARCHIVE_DATA), XML generation (GEN_XML_HEADER/BODY/FOOTER) and cleanup (DEINITIALIZE_CODE). SET_DETAIL_DEBUG is normally called only for diagnostic purposes when detailed report output must be traced. The package is not referenced by any other documented package, so custom code integrating with it must do so directly, respecting the global-variable initialization order established by ARCHINIT.