Search Results get_cost_method1
Overview
APPS.PA_PAY_INTERFACE is a server-side PL/SQL package in Oracle EBS Projects (PA) that supports the interface of project expenditure and compensation data into Oracle Payroll. Its primary responsibility is to identify project-related pay elements (expenditure items tied to labor and compensation rules) and to validate them against payroll acceptance criteria before they are passed to Oracle Payroll for costing and payment processing. The package carries the declaration AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema, and it is tagged with a source header identifying version 120.12 (2012). In the context of the interface_pay search, this package is the primary program unit that implements the "Interface Pay" business flow within Oracle Projects costing and payroll integration.
Key Procedures and Functions
The package exposes five documented program units:
- INTERFACE_PAY — The main entry point, implemented as a concurrent-program style procedure with standard
errbufandretcodeOUT parameters. It accepts a date range (P_FROM_DATE,P_TO_DATE), a streamline indicator (P_STREAMLINE), a payroll identifier (P_PAYROLL_ID), an employee organization identifier (P_EMP_ORG_ID), and a person identifier (P_PERSON_ID). It drives the selection and transmission of eligible project pay elements to the payroll interface. - GET_COST_METHOD — A function returning the cost method (as a VARCHAR2) for a given expenditure item, derived from the expenditure item ID and its expenditure item date.
- GET_COST_METHOD1 — An extended variant of the cost method function (introduced via bug fix 12975007) that determines the cost method using additional context: expenditure, job, organization, organization ID, expenditure item, and expenditure item date.
- PRIMARY_REJECTION — A function returning the primary rejection code for a pay element, used for exception reporting. It is keyed by interface run ID, internal/external indicator, person ID, pay element type ID, and pay element type code.
- ADDITIONAL_REJECTIONS — A companion function returning concatenated additional rejection codes for a pay element, driven by the same key set and used to enrich the exception report.
The package also declares global variables (organization, request, user, run date, person, assignment, organization, interface run, pay period start/end, retro flag, functional currency, program and login identifiers) and a custom exception REJECT_EMP_PAY. A G_DEBUG_MODE flag supports diagnostic logging.
Tables Accessed
The package reads and writes several Oracle Projects tables through APPS synonyms. Expenditure data is drawn from PA_EXPENDITURES and its _ALL / _S variants, with item-level detail in PA_EXPENDITURE_ITEMS and its _ALL / _S variants. Cost allocation is sourced from PA_COST_DISTRIBUTION_LINES and PA_COST_DISTRIBUTION_LINES_ALL. Compensation logic relies on PA_COMPENSATION_DETAILS and PA_COMPENSATION_RULE_SETS. Supporting reads include PA_EXPENDITURE_GROUPS_ALL, PA_EXPENDITURE_COMMENTS, HR_ORGANIZATION_INFORMATION for organization classification, and PA_IMPLEMENTATIONS / PA_IMPLEMENTATIONS_ALL for installation-level settings.
Usage Notes
PA_PAY_INTERFACE is typically invoked by the Oracle Projects concurrent program "Interface Pay" (or an equivalent PRC execution) that passes the date range and optional payroll/person/organization filters, then processes the resulting pay elements and produces the exception report using PRIMARY_REJECTION and ADDITIONAL_REJECTIONS. It is not referenced by other packaged APIs (Referenced by 0), so calls originate either from the seeded concurrent program or from customer-built concurrent programs and scripts that must honor the standard errbuf/retcode convention. Because the unit uses AUTHID CURRENT_USER, custom callers must ensure the invoking schema has appropriate execute grants and synonym access to the underlying PA and HR tables.