Formula Type for Total Compensation Item
The Total Compensation Item formula determines compensation information that isn't stored in the other predefined item source types.
You select the formula when you manage compensation items on the Create or Edit Compensation Items page. Click the Validate button to validate your expectations for compensation items before you generate the statements.
The following contexts are available to formulas of this type:
-
DATE_EARNED
-
EFFECTIVE_DATE
-
END_DATE
-
START_DATE
-
HR_ASSIGNMENT_ID
-
HR_TERM_ID
-
JOB_ID
-
LEGISLATIVE_DATA_GROUP_ID
-
COMPENSATION_RECORD_TYPE
-
ORGANIZATION_ID
-
PAYROLL_ASSIGNMENT_ID
-
PAYROLL_RELATIONSHIP_ID
-
PAYROLL_TERM_ID
-
PERSON_ID
Database items related to Person, Assignment, Salary, Element Entries, Compensation Record, and From and End Dates are available to formulas of this type.
The following input variables are available to formula of this type.
Input Value |
Data Type |
Required |
Description |
---|---|---|---|
CMP_IV_PERIOD_ID |
Char |
Y |
Period ID |
CMP_IV_PERIOD_START_DATE |
Date |
Y |
Statement Period Start Date |
CMP_IV_PERIOD_END_DATE |
Date |
Y |
Statement Period End Date |
The following return variables are available to formula of this type.
Return Value |
Data Type |
Required |
Description |
---|---|---|---|
COMPENSATION_DATES |
Date |
Y |
One to 15 transaction dates delimited by semicolon, maximum 250 characters. |
VALUES |
Char |
Y |
One to 15 transaction values delimited by semicolon, maximum 250 characters. Must be the same number of values as dates. |
ASSIGNMENTS |
Char |
N |
One to 15 transaction assignments delimited by semicolon, maximum 250 characters. Must be the same number of assignments as dates. Can return an empty space with a delimiter (; ;). |
LEGALEMPLOYERS |
Char |
N |
One to 15 legal employer IDs delimited by semicolon, maximum 250 characters. Must be the same number of assignments as dates. Can return an empty space with a delimiter (; ;). |
UNIT | Char | N | 4 optional variables for every value and every variable can have more than one value delimited by “;”. Can return currency code from monetary units. |
COMPENSATION_DATES1 |
Date |
Y |
Second variable for transaction dates from 16 to 30 if limit of 250 characters is exceeded. |
VALUES1 |
Char |
Y |
Second variable for transaction values from 16 to 30 if limit of 250 characters is exceeded. |
ASSIGNMENTS1 |
Char |
N |
Second variable for transaction assignments from 16 to 30 if limit of 250 characters is exceeded. |
LEGALEMPLOYERS1 |
Char |
N |
Second variable for legal employer IDs from 16 to 30 if limit of 250 characters is exceeded. |
UNIT1 | Char | N | 4 optional variables for every value and every variable can have more than one value delimited by “;”. Can return currency code from monetary units. |
COMPENSATION_DATES2 |
Date |
Y |
Transaction dates from 31 to 45. |
VALUES2 |
Char |
Y |
Transaction values from 31 to 45. |
ASSIGNMENTS2 |
Char |
N |
Transaction assignments from 31 to 45. |
LEGALEMPLOYERS2 |
Char |
N |
Legal employers from 31 to 45. |
UNIT2 | Char | N | 4 optional variables for every value and every variable can have more than one value delimited by “;”. Can return currency code from monetary units. |
COMPENSATION_DATES3 |
Dates |
Y |
Transaction dates from 46 to 60. |
VALUES3 |
Char |
Y |
Transaction values from 46 to 60. |
ASSIGNMENTS3 |
Char |
N |
Transaction assignments from 46 to 60. |
LEGALEMPLOYERS3 |
Char |
N |
Legal employers from 46 to 60. |
UNIT3 | Char | N | 4 optional variables for every value and every variable can have more than one value delimited by “;”. Can return currency code from monetary units. |
This sample formula returns one date and one value based on the worker ID.
/*******************************************************************
FORMULA NAME : Total Compensation Simple Item Formula
FORMULA TYPE : Total Compensation Item
DESCRIPTION : Returns one date and one value.
*******************************************************************/
/*=========== INPUT VALUES DEFAULTS BEGIN =====================*/
INPUTS ARE CMP_IV_PERSON_ID (text), CMP_IV_PERIOD_START_DATE (date), CMP_IV_PERIOD_END_DATE (date)
DEFAULT FOR CMP_IV_PERSON_ID IS '-1'
DEFAULT FOR CMP_IV_PERIOD_START_DATE IS '4712/12/31' (date)
DEFAULT FOR CMP_IV_PERIOD_END_DATE IS '4712/12/31' (date)
/*============ INPUT VALUES DEFAULTS ENDS =====================*/
/*=================== FORMULA SECTION BEGIN =================*/
COMPENSATION_DATES = '2005/01/01'
VALUES = '500.00'
ASSIGNMENTS = to_char(get_context(HR_ASSIGNMENT_ID,-1))
RETURN COMPENSATION_DATES, VALUES, ASSIGNMENTS
/*================ FORMULA SECTION END =======================*/
This sample formula returns multiple variables.
/*******************************************************************
FORMULA NAME : Total Compensation Multi Item Formula
FORMULA TYPE : Total Compensation Item
DESCRIPTION : Returns multiple variables.
*******************************************************************/
/*=========== INPUT VALUES DEFAULTS BEGIN =====================*/
INPUTS ARE CMP_IV_PERSON_ID (text), CMP_IV_PERIOD_START_DATE (date) , CMP_IV_PERIOD_END_DATE (date)
/*=========== INPUT VALUES DEFAULTS ENDS =====================*/
/*================= FORMULA SECTION BEGIN =================*/
COMPENSATION_DATES = '2009/01/01;2009/02/01;2009/03/01'
COMPENSATION_DATES1 = '2009/07/01;2009/08/01;2009/09/01'
COMPENSATION_DATES2 = '2009/10/01;2009/11/01;2009/12/01'
COMPENSATION_DATES3 = '2009/10/01;2009/11/01;2009/12/01'
VALUES = '200.00;200.00;300.00'
VALUES1 = '300.00;500.00;500.00'
VALUES2 = '500.00;500.00;600.00'
VALUES3 = '600.00;600.00;700.00'
/* Returns only first two assignment */
ASSIGNMENTS = ';1234567890;1234567890'
ASSIGNMENTS1 = '1234567890;1234567890;1234567890'
/* Returns last two assignments */
ASSIGNMENTS2 = ';1234567890;1234567890'
/* Returns first and last assignments */
ASSIGNMENTS3 = '1234567890;;1234567890'
LEGALEMPLOYERS = '0123456789;;0123456789'
LEGALEMPLOYERS1 = '0123456789;0123456789;0123456789'
LEGALEMPLOYERS2 = '0123456789;0123456789;0123456789'
LEGALEMPLOYERS3 = '0123456789;0123456789'
UNIT = 'USD'
UNIT1 = 'EUR'
UNIT2 = 'AUD'
UNIT3 = 'CAD'
RETURN COMPENSATION_DATES,VALUES,COMPENSATION_DATES1,VALUES1,COMPENSATION_DATES2,VALUES2,COMPENSATION_DATES3,VALUES3,ASSIGNMENTS,ASSIGNMENTS1,ASSIGNMENTS2,ASSIGNMENTS3,L
GALEMPLOYERS,LEGALEMPLOYERS1,LEGALEMPLOYERS2,LEGALEMPLOYERS3,UNIT,UNIT1,UNIT2,UNIT3
/*================ FORMULA SECTION END =======================*/