Introduction
Many a times we have to perform Discretionary Disbursement from the various Absence Plans configured in the application. Most of the time this is a manual process but if there is a set of rule to be followed and the number of employees for whom this action needs to be performed is huge it makes sense to automate the process. In this post we would try to achieve the same.
Pre-Requisites
Some of the pre-requisites for this include:
- Configuring a Source System Owner
I have configured a new Source System Owner ( Navigation: Setup and Maintenance -> Manage Common Lookups -> HRC_SOURCE_SYSTEM_OWNER -> Add New Lookup Value (HRC_LEGACY)
- Identifying a Absence Plan which has “Discretionary Disbursement” enabled
We need to either find or configure a Absence Plan which has discretionary disbursement feature enabled. For this example, we will use “Vacation”
- Creating Extract Rule Fast Formula
We need to create two Extract Rule Fast Formula.
- WorkTerms Number
We would need to have a custom Extract Fast Formula created which will derive the WorkTerms Number. The Fast Formula Logic is mentioned in below table for ready reference
WorkTerms Number: Extract Rule Fast Formula (Formula Content)
|
DEFAULT FOR DATA_ELEMENTS IS EMPTY_TEXT_TEXT
DEFAULT FOR PER_ASG_PERSON_NUMBER IS 'X'
INPUTS ARE DATA_ELEMENTS (TEXT_TEXT)
rule_value = ' '
l_workterms_number = 'Y'
l_wt_string = 'ET'
if DATA_ELEMENTS.EXISTS('PersonNumber') then
(
l_person_number = DATA_ELEMENTS['PersonNumber']
l_person_id = DATA_ELEMENTS['PersonId']
CHANGE_CONTEXTS(PERSON_ID = TO_NUMBER(l_person_id ))
(
l_workterms_number = l_wt_string || l_person_number
rule_value = l_workterms_number
)
)
return rule_value
|
- SourceSystemId
We would also need to create a custom Extract Fast Formula to derive SourceSystemId.
SourceSystemId: Extract Rule Fast Formula (Formula Content)
|
DEFAULT FOR DATA_ELEMENTS IS EMPTY_TEXT_TEXT
DEFAULT FOR PER_ASG_PERSON_NUMBER IS 'X'
DEFAULT FOR GLOBAL_PAY_INTERFACE_EXTRACTION_DATE is '4712/12/31'
INPUTS ARE DATA_ELEMENTS (TEXT_TEXT)
rule_value = ' '
l_source_system_id = 'D'
if DATA_ELEMENTS.EXISTS('PersonNumber') then
(
l_person_number = DATA_ELEMENTS['PersonNumber']
l_person_id = DATA_ELEMENTS['PersonId']
CHANGE_CONTEXTS(PERSON_ID = TO_NUMBER(l_person_id ))
(
l_string1 = 'VACATION_CSH'
l_string2 = DATA_ELEMENTS['Value']
l_string3 = GLOBAL_PAY_INTERFACE_EXTRACTION_DATE
l_source_system_id = l_person_number || '_' || l_string1 || '_' || l_string2 || '_' || l_string3
rule_value = l_source_system_id
)
)
return rule_value
|
- Creating a Report to get HDL File format for PersonAccrualDetail.dat Business Object
We would also need to create a Report (with data source as GlobalReportsDataModel) and attach a E-Text Template to the Report to ensure we get data from the application in HDL File Format. We would name the report as DiscretionaryDisbursement.xdo and the location of the report is /Shared Folders/Custom/Practice Samples/AutomateAbsencePlanDiscretionaryDisbursement.The E-Text template would look as below:
Worked Example
As all the pre-requisite are in place we can now start with the next steps. We would need to create a HCM Extract of Inbound Interface Type with following details:
Attribute Name
|
Attribute Value
|
Extract Name
|
AbsencePlanDiscretionaryDisbursement
|
Extract Type
|
Inbound Interface
|
User Entity
|
PER_EXT_PAY_EMPLOYEES_UE
|
Threading Database Item
|
Extract Employee Person ID
|
Threading Action Type
|
Object Actions
|
Root Data Group Name
|
GetEmpDetails
|
Data Group Filter Criteria
|
(papf.person_number IN ('40', '41', '42', '43', '44','45'))
|
There is one Record named “Employee Record” which comprises of 9 data elements. Details in table below:
Col
|
Name
|
Type
|
Data Type
|
Data Source (DS) / Data Value (DV)
|
1
|
PersonId
|
Database Item Group
|
Number
|
Extract Employee Person ID (DS)
|
2
|
AccrualType
|
String
|
Text
|
CSH (DV)
|
3
|
PersonNumber
|
Database Item Group
|
Text
|
Extract Employee Person Number (DS)
|
4
|
PlanName
|
String
|
Text
|
Vacation (DV)
|
5
|
Value
|
String
|
Number
|
7 (DV)
|
6
|
WorkTermsNumber
|
Rule
|
Text
|
WorkTermsNumber (DS)
|
7
|
ProcdDate
|
Database Item Group
|
Text
|
Payroll Interface Extraction Date (DS)
|
8
|
SourceSystemOwner
|
String
|
Text
|
HRC_LEGACY (DV)
|
9
|
SourceSystemId
|
Rule
|
Text
|
VacationPlanDiscretionaryDisbursementSourceSystemId
|
Once configured the Extract Attributes should appear as below:
Next we need to configure “Extract Delivery Options”
Extract Delivery Option : AccrualDetail
|
Attribute Name
|
Attribute Value
|
*Delivery Option Name
|
AccrualDetail
|
Output Type
|
Text
|
Report
|
/Custom/Practice Samples/AutomateAbsencePlanDiscretionaryDisbursement/DiscretionaryDisbursement.xdo
|
Template Name
|
DiscretionaryDisbursementTemplate
|
*Output Name
|
AccrualDetailWCC
|
*Delivery Type
|
WebCenter Content
|
Required
|
Checked
|
Encryption Mode
|
None
|
Run Time File Name
|
AccrualDetail
|
Integration Name
|
AccrualDetailWCC
|
Extract Delivery Option : PersonAccrualDetail
|
Attribute Name
|
Attribute Value
|
*Delivery Option Name
|
PersonAccrualDetail
|
Output Type
|
Text
|
Report
|
/Custom/Practice Samples/AutomateAbsencePlanDiscretionaryDisbursement/DiscretionaryDisbursement.xdo
|
Template Name
|
DiscretionaryDisbursementTemplate
|
*Output Name
|
PersonAccrualDetail
|
*Delivery Type
|
Inbound Interface
|
Required
|
Checked
|
Encryption Mode
|
None
|
Override File Extension
|
.dat
|
Run Time File Name
|
PersonAccrualDetail
|
Integration Name
|
PersonAccrualDetail
|
Integration Type
|
Data Loader
|
Compressed Delivery Group
|
DiscretionaryDisbursement.zip
|
Once configured the Extract Delivery Options will appear as below:
Once all the above changes are done we should Add a New Parameter “Load Automatically” and set “Visible” property to Yes.
Once done we can Validate the Extract and once it is successfully validated we can Save and Close.
In the next step, we would need to Add a Flow Task named “Initiate HCM Data Loader” to AbsencePlanDiscretionaryDisbursement Flow pattern. We can either navigate to Payroll->Checklist-> Search for AbsencePlanDiscretionaryDisbursement or use Refine Extracts->Search for AbsencePlanDiscretionaryDisbursements
Once the search results are retrieved, we need to click on “Edit” (pencil icon) and choose the following task
Name
|
Initiate HCM Data Loader
|
Description
|
Generate HCM Data Loader File and optionally perform a Data Load
|
Task Type
|
Standard Process
|
Once we add the payroll flow task we should click on “Go To Task” and add the following details:
Initiate HCM Data Loader Task Definition: Basic Information (Data Loader Archive Action)
|
Name
|
Data Loader Archive Action
|
Execution Mode
|
Submit
|
Data Type
|
Text
|
Parameter Basis
|
Bind to Flow Task
|
Basis Value
|
AbsencePlanDiscretionaryDisbursement, Submit , Payroll Process
|
Usage
|
Input Parameter
|
Initiate HCM Data Loader Task Definition: Basic Information (Data Loader Configuration)
|
Name
|
Data Loader Configuration
|
Execution Mode
|
Submit
|
Data Type
|
Text
|
Parameter Basis
|
Constant Bind
|
Basis Value
|
ImportMaximumErrors=100,
LoadMaximumErrors=100,
LoadConcurrentThreads=8,
LoadGroupSize=100
|
Usage
|
Input Parameter
|
And with this HCM Extract Setup is complete.
Running the Extract
In this step we will try running the Extract.
Once submitted we can monitor the status of the payroll flow instance
From the above screenshot we can see that all the process has been successful and hence a Data Load should have got triggered. We can navigate to Data Exchange->HCM Data Loader -> Import and Load Data page to verify this. (While doing a search make sure you set the Created By filter to Blank else the Data Set would not appear)
From the screenshots we can see that the data got loaded successfully.
In the next step we will verify the same in application. We can perform this verification in two ways.
- By Running a SQL Query
SQL Query
|
select papf.person_number,
apaed.type,
apaed.value,
apaed.source,
apaed.payment_percentage,
apaed.person_id,
apaed.pl_id,
to_char(apaed.procd_date,'YYYYMMDD') processed_date
from per_all_people_f papf,
anc_per_acrl_entry_dtls apaed
where papf.person_id = apaed.person_id
and apaed.type = 'CSH'
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and papf.person_number IN ('40','41','42','43','44','45')
and trunc(apaed.procd_date) = trunc(sysdate)
order by papf.person_number asc
|
And we could see the results in BI Data Model
- From Application UI
We would navigate to Person Management-> Search for Person Number 40-> Absence Records and go to Plan Participation Section, Choose “Vacation” plan and we should be able to see disbursement details
Similarly, we can check for person# 41,42,43,44 and 45 too.
Summary
So this is how we can “Automate Discretionary Disbursement” from a Absence Plan. In this example, we have hard-coded certain things like SourceSystemOwner, ProcdDate, Value, PlanName and each one of the attribute can be dynamically derived or passed via Extract Input parameter to make the Extract more flexible and re-usable.
The below files can be downloaded:
DiscretionaryDisbursementTemplate (E-Text Template)
AbsencePlanDiscretionaryDisbursement_2020-04-13 (Extract Definition File XML)
VacationPlanDiscretionaryDisbursementSourceSystemID_ExtractRule_FF (Extract Rule Fast Formula for SourceSystemId)
WorkTermsNumber_ExtractRule_FF (Extract Rule Fast Formula for WorkTermsNumber)