Search Results cp_bg_name
Overview
PY_ZA_ITREF_UPLOAD is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports South African payroll statutory reporting, specifically the electronic generation of the ITREF (Income Tax Reference) interface file used by employers to comply with South African Revenue Service (SARS) requirements. The package is defined with AUTHID CURRENT_USER, meaning its unqualified database references resolve under the privileges of the invoking session rather than the package owner, a common pattern for concurrent-program-driven utilities that must honor the caller's security profile.
The package header carries a version stamp of 120.1 dated 22 March 2011, which places it within the 12.1.x and 12.2.x release family, consistent with the Oracle EBS 12.1.1 and 12.2.2 environments in which the object is documented. Its design centers on a report-generation pattern: package-level variables capture user-entered parameters, and the two entry points bracket the report lifecycle to control file output.
Key Procedures and Functions
The documented API surface comprises two functions, both of which follow the standard Oracle Reports integration convention:
- BEFOREREPORT — Invoked before report execution. It is the designated point at which the package initializes its session state, validates and caches the incoming parameter values (business group, mode, effective date, and file name), and prepares the data context required by the report query. Returning a boolean allows the report to abort cleanly if preconditions are not met.
- AFTERREPORT — Invoked after report execution completes. It performs post-processing and cleanup, typically releasing file handles, finalizing the output written via UTL_FILE, and reporting completion status back to the calling concurrent program framework.
The header additionally declares package-level globals including P_BUSINESS_GROUP_ID, P_MODE, P_EFFECTIVE_DATE, P_FILE_NAME, G_PAYROLL_ACTION_ID, and several character and numeric state holders (CP_BG_NAME, CP_LE_NAME, CP_PAYE_NUM, CP_TOT_REC). These are populated from the report parameter form and shared between the two lifecycle functions; they are not callable API parameters, and no parameter lists are to be assumed beyond the documented header.
Tables Accessed
The package reads and writes the following documented objects, referenced through APPS synonyms:
- PAY_PAYROLL_ACTIONS and PAY_PAYROLL_ACTIONS_S — Drive payroll action context and validation, tying the uploaded data to the correct payroll run and its effective-dated state.
- PAY_ACTION_INFORMATION_S — Supplies action-level detail records used to assemble the ITREF output.
- PER_ALL_PEOPLE_F — Provides the effective-dated person records (employee identifiers, names, and tax-relevant attributes) included in the statutory file.
- UTL_FILE — The Oracle-supplied file I/O package used to write the generated ITREF file to the directory named by P_FILE_NAME.
- DUAL — Used for scalar evaluations and sequencing checks.
Usage Notes
PY_ZA_ITREF_UPLOAD is not a general-purpose integration API. It is a report-support package, and the documented metadata shows it is referenced by zero other packages, confirming that it is invoked directly by an Oracle Reports executable rather than called from other PL/SQL units. Typical invocation is therefore through a concurrent program with an associated report definition, where BEFOREREPORT fires on report startup and AFTERREPORT fires on completion. The P_MODE and P_FILE_NAME parameters allow the same package to serve both file-generation and possibly validation or re-run scenarios. Because the package uses UTL_FILE, the target directory must be registered as an Oracle DIRECTORY object accessible to the APPS schema, and the concurrent manager's operating-system account must have filesystem permissions on that path. The AUTHID CURRENT_USER clause means custom code invoking these functions outside the standard report context must ensure the session has the necessary object privileges on the underlying PAY and PER tables.
-
PACKAGE: APPS.PY_ZA_ITREF_UPLOAD
12.2.2
-
PACKAGE BODY: APPS.PAY_ZA_SOTC_PKG
12.2.2
-
PACKAGE: APPS.PAY_ZA_SOTC_PKG
12.2.2
-
PACKAGE: APPS.PQH_PQUBGTEN_XMLP_PKG
12.1.1
-
PACKAGE BODY: APPS.PQH_PQUBGTEN_XMLP_PKG
12.2.2
-
PACKAGE: APPS.PQH_PQUBGTEN_XMLP_PKG
12.2.2
-
APPS.PAY_ZA_SOTC_PKG SQL Statements
12.2.2
-
PACKAGE BODY: APPS.PQH_PQUBGTEN_XMLP_PKG
12.1.1
-
APPS.PY_ZA_ITREF_UPLOAD SQL Statements
12.2.2
-
PACKAGE BODY: APPS.PY_ZA_ITREF_UPLOAD
12.2.2
-
APPS.PAY_ZA_SOTC_PKG dependencies on PER_BUSINESS_GROUPS
12.2.2
-
APPS.PAY_ZA_SOTC_PKG dependencies on FND_FILE
12.2.2
-
APPS.PY_ZA_ITREF_UPLOAD dependencies on PER_BUSINESS_GROUPS
12.2.2
-
APPS.PY_ZA_ITREF_UPLOAD dependencies on FND_PROFILE
12.2.2
-
APPS.PQH_PQUBGTEN_XMLP_PKG dependencies on HR_GENERAL
12.1.1
-
APPS.PQH_PQUBGTEN_XMLP_PKG dependencies on HR_GENERAL
12.2.2
-
APPS.PQH_PQUBGTEN_XMLP_PKG dependencies on STANDARD
12.1.1
-
APPS.PQH_PQUBGTEN_XMLP_PKG dependencies on STANDARD
12.2.2
-
APPS.PY_ZA_ITREF_UPLOAD dependencies on HR_UTILITY
12.2.2