Overview
A generic comma separated file format has been developed for importing and cancelling Leave Booking Data from a text file. There are two formats of the text file available. The first is for importing data that does not contain a flag indicating whether Leave in Advance (LIA) is to be used. The second caters for using a LIA flag, and for cancelling leave.
Specifications
1 No LIA, No Cancellations Where no LIA flag is to be passed and cancellations are not required, the format for import is:
<employee no>,<start date>,<end date>,<absent reason code*>
For example: 10100,03/05/2018,15/05/2018,ALV
The Character value of the Parameter Settings value ‘LEAVE_IMPORT_FILE’ in MyWorkplace indicates the directory and file name to import.
2a Leave in Advance Where leave is imported and an LIA flag is to be passed, the format is:
<employee no>,<start date>,<end date>,<absent reason code*>,<LIA Flag>
For example:
10100,03/05/2018,07/05/2018,ALV,1 10999,03/05/2018,07/05/2018,ALV,0
The LIA Flag field in this format can be set to 0 or 1 where: 0 – Indicates the Leave is not to be paid in advance 1 – Indicates the Leave is to be paid in advance
2b Leave cancellation Where a leave cancellation is imported the format is:
<employee no>,<start date>,R
For example: 13872,29/04/2018,R
Note that the data received by MWP for leave bookings must be in a logical timeline. That is, if leave bookings exist in MWP for an employee, and they want to change that leave to a different type or different date range, then a request to delete the existing leave MUST appear in the new file prior to any new leave request.
The Character value of the Parameter Settings value ‘LIA_IMPORT_FILE’ in MyWorkplace indicates the directory and file name to import. This is a different setting to that for option 1.
For LIA to process correctly, a ‘Default’ Leave-in-Advance rule must be defined in Corporate Defaults.
Notes:
*The content of the Leave Code field must be an exact match with the Absent Reason code in the appropriate pay group in MWP. To view absent reason codes select the MyPeriod End screen. Select the appropriate pay group. Select Payroll/Absent Reasons.
Leave cancellations have three fields. Leave bookings have five fields, but MUST be using the LIA format. These transactions can co-exist in one file.
Note that the data received by MWP for leave bookings MUST be in a logical timeline (i.e. if leave bookings exist, then a request to delete that existing leave MUST appear in the file prior to any new leave request for the same date range).
There must be one blank row (CR/LF character) at the end of the data in the file.
The Import process occurs as part of the standard Clockings Import.
The file name will be leavebookings.csv or another agreed name.
Any errors can be seen by using the frame ‘fm_import_data’. This Frame can also be used to Import and Process the data if required.
The Import process creates the records in the Advance Leave tables.
The Imported file is renamed using our standard method of appending the Date & Time to the file name.