I've created a dataport to bring in ADP data into the Time Journal Line.
When I bring in the data, the Payroll Control Code is blank. I've tried to use some logic to indicate which Code should be inserted depending on which fields have amounts specified in the CSV file that I am importing.
This is the code in my dataport:
Time Journal Line - OnAfterImportRecord()
IF Hours <> 0 THEN
TimJnlLine."Payroll Control Code" := 'EARN REG';
IF Hours <> 0 THEN
TimJnlLine.Earnings := Amount;
IF OTHours <> 0 THEN
TimJnlLine."Payroll Control Code" := 'EARN OVER';
IF OTHours <> 0 THEN
TimJnlLine.Earnings := OTEarn;
IF SHours <> 0 THEN
TimJnlLine."Payroll Control Code" := 'EARN SICK';
IF SHours <> 0 THEN
TimJnlLine.Earnings := SEarn;
0
Comments
My Blog - nav.education
you should do the following as I assume that the DataItem being imported is "Time Journal Line"
Hope this helps