Payroll Access to HR Formula Type

Use the Payroll Access to HR formula type to call a payroll formula when your payroll formula requires an HR database item.

For example, you can use the payroll formula to return the salary amount, and then use the Payroll Access to HR formula to return a full-time equivalent (FTE) database item for a specific group of employees.

These contexts are available to all formulas of this type:

  • HR_RELATIONSHIP_ID

  • HR_TERM_ID

  • GRADE_RATE_ID

  • LEGAL_EMPLOYER_ID

  • AREA1

  • LOCATION_ID

  • HR_ASSIGNMENT_ID

  • PERSON_ID

  • JOB_ID

  • GRADE_ID

  • ADDRESS_ID

  • ADDRESS_TYPE

  • ACCRUAL_PLAN_ID

  • EFFECTIVE_DATE

  • LEGISLATIVE_DATA_GROUP_ID

  • ORGANIZATION_ID

These input variables are available to formulas of this type.

Enter Data

Data Type

ACTUAL_END_DATE

Date

ACTUAL_START_DATE

Date

EFF_DATE

Date

END_DATE

Date

ENTRY_LEVEL

Text

HR_ASSG_ID

Number

HR_ASSIGN_ID

Number

HR_EFFECTIVE_DATE

Date

HR_ENTRY_LEVEL

Text

HR_ID

Number

HR_ID2

Number

HR_TRM_ID

Number

MODE

Text

START_DATE

Date

UNIT_TYPE

Text

These return values are available to formulas of this type:

Return Value

Data Type

Description

L_SALARY

Number

Salary ID of employee

L_SALARY_BASIS_CODE

Text

Salary basis of employee

L_UNITS

Number

Number of units worked

X_OUTPUT

Date

Output date

X_OUTPUT

Text

Output text

X_OUTPUT_NUMBER

Number

Output number

X_OUTPUT_TEXT

Text

Output text

This sample Oracle Payroll formula returns the salary amount for employees based on their full-time equivalent (FTE), which is an HR database item. Because HR database items aren’t accessible through Oracle Payroll formulas, you must create a Payroll Access to HR formula to retrieve the database item. And then call the formula that retrieves the database item from the formula that returns the salary amount.

/***************************************************************
FORMULA TYPE: Payroll Access to HR
DESCRIPTION: Retrieve FTE DBI
***************************************************************/
/* Default Statement Section */
Default for PER_ASG_FTE_VALUE is 1/
* Calculation Section */
HR_FTE = PER_ASG_FTE_VALUE
/* Return Statement Section */
Return HR_FTE
/*************************************************************
FORMULA NAME: GB Salary by FTE 
FORMULA TYPE: Oracle Payroll 
DESCRIPTION: Calculate the salary amount for OK employees based on their FTE.
**************************************************************/
/* Alias Statement Section */
ALIAS ANNUAL_SALARY_UK_AMOUNT_ASG_ENTRY_VALUE AS UK_ASG_SAL
/* Default Statement Section */
Default for ASG_HR_ASG_ID is 1
Default for UK_ASG_SAL is 0
Default for Salary_UK is 0
/* Calculation Section */
Salary_UK = UK_ASG_SAL
SET_INPUT('HR_ASSIGNMENT_ID', ASG_HR_ASG_ID)
EXECUTE('Call HR FTE DBI')
FTE = GET_OUTPUT('HR_FTE',1)
l_amount = round((FTE * Salary_UK),2)
Message = 'Salary Value is'||to_Char(l_Amount)
/* Return Statement Section */
RETURN l_Amount,Message