Introduction
In some of the previous articles we have seen what is meant by HCM Extract, what are the different components of an HCM Extract, How to derive a Static Value for an Extract Attribute using Extract Rule Method and even deriving a dynamic value for an Extract Attribute using Extract Rule.
In this post we will try to demonstrate how to derive an Extract Attribute by making use of other Data Elements and Extract Input parameters.
In this example, we will try to fetch the Length of Service of an individual.
This is calculated by using the follwoing logic
Length of Service = Effective Date - Person Enterprise Hire Date
Now Effective Date is a Input for the HCM Extracts and Person Enterprise Hire Date is another Extract Attribute previously defined (part of same Data Group)
So let-us quickly look at the setups required to achieve this.
Setups
We would need to perform the following setups:
-
Create a HCM Extract Input Parameter
-
Create a HCM Extract Database Item Group Attribute
-
Derive the Extract Attribute Value using the two elements defined above
We would now get into details of each of the above mentioned components
HCM Extract Input Parameter
Effective Date is one of the delivered Input Parameter of any HCM Extract.
HCM Extract Database Item Group Attribute
We will define an Extract Attribute named EnterpriseHireDate.
Derived HCM Extract Attribute
LOSInDays is a HCM Extract Attribute which will get its value from a Fast Formula
Details of Extract Rule Fast Formula
LOSInDays Extract Attribute fetches its value from an Extract Rule Type Fast Formula. Details of the Fast Formula are in below table
Attribute Name |
Value |
*Formula Name |
GetLOSInDays |
Type |
Extract Rule |
Effective Date |
1/1/00 |
Description |
Calculates Length of Service in Days |
Editor |
Text |
Formula Text |
<Check Table Below> |
Formula Text |
DEFAULT FOR DATA_ELEMENTS IS EMPTY_TEXT_TEXT INPUTS ARE DATA_ELEMENTS (TEXT_TEXT) ld_effective_date = GET_PARAMETER_VALUE_DATE('EFFECTIVE_DATE') ld_emp_hire_date = TO_DATE(SUBSTR(TRANSLATE(DATA_ELEMENTS['ENTERPRISEHIREDATE'],'01234567890:.-TZ', '01234567890:.- '), 1, 19), 'YYYY-MM-DD HH24:MI:SS') ln_los_in_days = DAYS_BETWEEN (ld_effective_date,ld_emp_hire_date) RULE_VALUE = TO_CHAR(ln_los_in_days) RETURN RULE_VALUE |