Sample Payroll Transformation Formula for HCM Data Loader
In this example, the transformation formula specifies the transformation mechanism for an incoming comma separated delimited file. The formula's return values are the same as the list of attributes for the personal payment method object.
Here's the sample raw file for personal payment method, with comma as the delimiter.
2018/04/04,1,ZHRX_VS_US_TPPI_LDG_ONE,E955160008191423,ZHRX_VS_US_TPPI_Check,PPM1,M,10
And this code snippet has the formula for this example.
/******************************************************************
FORMULA NAME: Load Personal Payment Method
FORMULA TYPE: HCM Data Loader
******************************************************************/
/* Inputs */
INPUTS ARE OPERATION (text), LINENO (number), LINEREPEATNO (number),POSITION1 (text), POSITION2 (text), POSITION3 (text), POSITION4 (text), POSITION5 (text), POSITION6 (text), POSITION7 (text), POSITION8 (text)
DEFAULT FOR POSITION1 IS 'NO DATA'
DEFAULT FOR POSITION2 IS 'NO DATA'
DEFAULT FOR POSITION3 IS 'NO DATA'
DEFAULT FOR POSITION4 IS '2'
DEFAULT FOR POSITION5 IS '100'
DEFAULT FOR POSITION6 IS 'NO DATA'
DEFAULT FOR POSITION7 IS 'NO DATA'
DEFAULT FOR POSITION8 IS 'NO DATA'
DEFAULT FOR LINEREPEATNO IS 1
IF OPERATION='FILETYPE' THEN
OUTPUTVALUE='DELIMITED'
ELSE IF OPERATION='DELIMITER' THEN
(
OUTPUTVALUE=','
RETURN OUTPUTVALUE
)
ELSE IF OPERATION='READ' THEN
OUTPUTVALUE='NONE'
ELSE IF OPERATION='MAP' THEN
/*HDL Related Outputs*/
(
FileName = 'PersonalPaymentMethod'
BusinessOperation = 'MERGE'
FileDiscriminator = 'PersonalPaymentMethod'
EffectiveStartDate=POSITION1
ProcessingOrder=POSITION2
LegislativeDataGroupName=POSITION3
AssignmentNumber=POSITION4
OrganizationPaymentMethodCode=POSITION5
PersonalPaymentMethodCode=POSITION6
PaymentAmountType=POSITION7
Amount=POSITION8
RETURN BusinessOperation,FileName,FileDiscriminator,EffectiveStartDate,PersonalPaymentMethodCode,AssignmentNumber,Amount,ProcessingOrder,OrganizationPaymentMethodCode,PaymentAmountType,LegislativeDataGroupName
)
ELSE
OUTPUTVALUE='NONE'
RETURN OUTPUTVALUE
/* End Formula Text */