[{TableOfContents }]
\\
For Canadian users, the capabilities to send an interface file to the “Department of Employment and Social Development Canada” (ESDC) and to print the Record of Employment is available. 
\\ 
As of March 31st, 2016, the ROE Web facility became obsolete and the ESDC developed the ROE XML file for employers to produce the ROE information. 
\\ 
!!ROE Web Sites
The users must refer
to the following ESDC web site for government information and publication.

http://www.esdc.gc.ca/en/ei/roe/user_requirements/appendix_d.page

The guide to complete the ROE can also be found at:
https://www.canada.ca/en/employment-social-development/programs/ei/ei-list/reports/roe-guide.html
\\ 
To create a ROE for an employee, the following steps need to be followed:

!!1) Setup Required
*The user-defined fields on the IMUF for the ROE process must be created. This can be done by running the UPROEF in Trial Mode for one employee. This will generate all user-defined fields on IMUF for ROE processing to be entered on IEEI, IPCL, IDTR, IDGR and IPPH screens.\\Note: Only if you are a first time user for UPROEF (ROE XML) or in a new database environment, this should be done.  

* In order to produce the ROE, setup on the following screens may be  required:
**IDIF – Interface Format Screen
**IPPE – Pay Elements Screen
**IPCL – Pay Calendars Screen – User Fields
**IDTR – Termination Reason Code Screen
**IDGR – Group Code Screen – User Fields
**IEEI - Employment Screen – User Fields
**IPPH – Employee Pays Screen – User Fields
\\
!Define Interface Format in [IDIF]

A Seed data script is delivered to clients to load in [IDIF] Interface Code definition:
01_SEED_IDFD_HLCAN_ROE_XML_2020.sql

This seed data script will overwrite the same Interface Form Code if it exists, which allows for the delivery of new Interface format set up for the interface file.

* On the [IDIF], use the (Copy Definition) button to copy the definition to a New Interface Code and then use the New Interface Code for UPROEF reporting.
* Most of the [[HL$CAN-ROE-XML] set up is pre-defined, you only need to enter the company contact information on [IDIF] screen once copy is done.

The standard file name for the ROE file name must include a file prefix, a dot and an extension (example: CAN_ROE200_mex.BLK).  The user can override this File Name in the Prompt when UPROEF is run.  
\\ \\
!Define Pay Elements For ROE Box 17 and 19 in [IPPE]

Elements need to be defined for Box 17 and/or Box 19 amounts to be reported on the ROE.  

* Box 17 - for payments or benefits that were paid on or after the final pay period or at a later date

*Box 19 - Paid for Sick/Maternity/Parental/Compassionate Care/Family Caregiver/ER Leave or Group Wage Loss Indemnity Payments 

Elements that should be setup if needed:
\\
|ROE VACN PAY – Vacation Pay Amount for Box 17A\\
|ROE STATHOL1 AMT – Statutory Holiday Amount1 for Box 17B\\
|ROE STATHOL2 AMT – Statutory Holiday Amount2 for Box 17 
..... up to
|ROE STATHOL10 AMT - Statutory Holiday Amount10 for Box 17B\\
|ROE OTHER1 AMT – Other Monies1 for Box 17C\\
|ROE OTHER2 AMT – Other Monies2 for Box 17C\\
|ROE OTHER3 AMT – Other Monies3 for Box 17C\\
|ROE SPEC PYMT1 – Special Payments1 for Box 19\\
|ROE SPEC PYMT2 – Special Payments2 for Box 19\\
|ROE SPEC PYMT3 – Special Payments3 for Box 19\\

Note: Effective March 2016, ROE is reported using the XML File format.  The following Elements are OBSOLETE and can be renamed to correspond to the Element Names above or they can be removed.
\\ 
|Oboslete Element List: 
|'ROE SPEC PYMT1'  
|'ROE STATHOL1 DAT'
|'ROE STATHOL2 DAT'
|'ROE STATHOL3 DAT'
|'ROE OTHER1 DESC'
|'ROE OTHER2 DESC'
|'ROE OTHER3 DESC'
|'ROE SICK LV DATE'
|'ROE SICK LV D/W'

!Define Pay Period Type For ROE in [IPCL]

ROE Pay Period Type must be one of the following codes to be reported on ROE:

||PAY PERIOD TYPE||Maximum # of Pay Periods to Include for Box 15
|B – Biweekly |Last 27
|M – Monthly |Last 13
|O - Monthly Non-Standard | Last 13
|S - Semi-Monthly |Last 25
|E - Semi-Monthly Non-Standard | Last 25
|H - Thirteen per Year | Last 14
|W – Weekly | Last 53

*You may enter one of the above letters in the [ROE Pay Frequency(UDF)|ROE PAY FREQUENCY (UDF)] field on [IPCL], otherwise the [IPCL] Pay Frequency description first letter will be used.

*To enter this user field on [IPCL] screen, you must click the header section and then click the UDF button.
\\
!Define FolderCD on Group Code Screen [IDGR]

The following information can be defined on the User Field of the [IDGR] screen for the Group code:
* [ROE Folder Code|ROE FolderCD (UDF)] - it is used to identify in which folder the ROE in the payroll extract file is to be filed
* [ROE ORGNUM|ROE ORGNUM (UDF)] - is used to identify the owner's organization number of the CRA Payroll Account Number

To enter these user fields on [IDGR] screen, you must click the header section and then click the UDF button. The 'ROE OrgNum issued by CRA' and 'ROE Folder Code' will be available to enter. 
\\ \\
!Define Termination Reason Code in [IDTR]

There are 3 ways in which the ROE Reason Code can be defined for employees

||Form||Column Name||Prompt||Lexicon||Length||Processing Order
|IEEI|ROE_LETTER|ROE Letter|X_ROE_LETTER|1 Digit|If populated this value will be used
|IDTR|ROE_REASON|ROE Reason Code|X_ROE_REASON|3 Digits|If the IEEI is not populated this value will be used
|IDTR|ROE_LETTER|ROE Reason|X_ROE_LETTER|1 Digit|If the IEEI and UDF are not populated this value will be used
 
The system will first check to see if a value has been entered into the 'ROE Letter' field on the IEEI

*If the 'ROE Letter' on IEEI is not updated, the system will pull the 'ROE Reason' for the TERMINATION_REASON set up on [IDTR] and use it when [IETR] is called.

On the IDTR there are 2 options for entering an ROE reason on the IETR, if the IEEI ROE Reason Code is left blank.

1) The user may enter the 3 character [ROE Reason Code|ROE REASON CODE (UDF)] on [IDTR] screen for the termination code.

*To enter this user field on [IDTR] screen, you must click the header section and then click the UDF button. 

*Optionally this field can also be added to the form using the IMFDH.

2) If the UDF is left blank, then the value selected in the 'ROE Reason' field found on the IDTR can be used.

*This column uses the [X_ROE_LETTER] lexicon for the ROE.

*If the employee’s [IEEI] screen does not have a ROE Reason Code, then the IEEI Termination Code is used to retrieve the IDTR entry.  If the IDTR entry has a UDF defined with the 3 characters, then this is used, otherwise the IDTR REASON CODE is used. 

If ROE Reason is with the old format with one character only, UPROEF will concatenate with ‘00, e.g. ‘K’ is changed to ‘K00’
\\ \\

!Define User Fields For [IEEI] Employment and [IPPH] Employee Pays Screen

There are user fields on the [IEEI] Employment screen and the [IPPH] Employee Pays screen to be used by the UPROEF.

*For a list of all the user fields on the [IEEI] and [IPPH] screens for ROE and what they are used for, review the page __[ROE User Defined Fields|ROE USER DEFINED FIELDS]__.  

The following fields are on both the [IEEI] and [IPPH] screen and are for information only. These 3 user fields will be maintained by the UPROEF process.


;[Prev ROE UpTo|PREV ROE UPTO (UDF)]: This is system maintained, [UPROEF] stores the pay period the ROE has been issued up to for each employment in update mode. This 'Up To Pay Period' is used when the subsequent ROE is issued for an employee for this employment record. You may change this pay period so that the ROE can be issued from this pay period onward. The format of this field is 'Pay Period + Period End date', \\\i.e. 'CCYYPP DDMON- CCYY'. E.g. '200520 30-Apr-2005' means Pay Period 200520 with Period End date 30-Apr-2005

;[ROE 1st Work Date|ROE 1ST WORK DATE (UDF)]: This is system maintained, stores the First Work Date issued on ROE. If an employee has multiple ROE for one Employment, this field contains the First Work Date printed on the most recent ROE.\\  This is maintained by [[UPROEF] and is for information purpose only


;[ROE Last Work Date|ROE LAST WORK DATE (UDF)]: This is system maintained, stores the Last Work Date issued on ROE. If an employee has multiple ROE  for one Employment, this field contains the Last Work Date printed on the most recent ROE.\\ This is maintained by [UPROEF] and is for information purpose only

!Define User Fields for ROE in [IPPH]

Defining ROE Box 17 / Box 19 information at the Pay Header UDF level allows the user to pay and keep all related monetary amounts at the ‘Final Pay’ and to specify all DATES related to this ‘Final Pay’, e.g. Statutory Holiday Date, Special Payment Date etc.

If the employee has a ‘Final Pay’ on IPPH screen
*the Vacation Pay amount, Start Date, End Date, Statutory Holiday Pay and all the information that is required for Box 17 / Box 19 for this pay can be manually entered in the User Fields on the IPPH.

*When employee is paid by Multiple Government Registration number (Group), the user can enter ROE Box 17 / Box 19 information on Pay Header of the ‘Final Pay’ that is for a specific BN.

*When UPROEF is run in non-Trial mode, the UDF of this ‘Final Pay’ on the Pay Header will be updated

If the employee has no ‘Final Pay’
*If the user wants to review the ROE by running UPROEF, then the most recent Pay Header that is closed will be used, Box 17 / Box 19 information can be entered.

*When UPROEF is run in non-Trial mode, the UDF of the most recent Pay Header will be updated

The default Box 17 / Box 19 information will be derived by UPROEF using the IPPE ROE Elements for the Final Pay or the most recent Closed Pay if IPPH or IEEI UDF ROE information are not manually entered, please see below for list of ROE Elements.

The Pay Header’s Group is used to retrieve the IDGR Government Registration Number (BN), the IPPH ROE UDF information will be reported under this.

Note: IPPH UDF ‘Prev ROE Upto’, ‘ROE 1ST Work Date’, ‘ROE Last Work Date’ are system maintained, no need to enter this.

!!2) Terminate Employee

An employee can be terminated through the [IETR] Termination Process.  When the termination is done here, the Employment [IEEI] screen is updated. 

To request ROE for an employee, the [ROE Status|ROE_STATUS] field in the EMPLOYMENT [IEEI] screen must be one of the following:
;:01 - ROE Requested
;:03 - Duplicate Requested

!!3) Enter Employee's Pay 

The employee's pay will be flagged as the 'Final Pay' if the employee has been terminated and the IEEI Termination Reason from [IDTR] has the 'Final Pay' toggle turned on.

 
If the employee has a ‘Final Pay’ on IPPH screen
* user can manually enter the Vacation Pay amount, Start Date, End Date, Statutory Holiday Pay and all the information that is required for Box 17 / Box 19 for this pay in the User Fields on the IPPH

*if the amounts for Box 17 / 19 are not entered, the UPROEF will derive the ROE Element values based on the Final Pay information 

*Defining ROE Box 17 / 19 information at the Pay Header UDF level allows the user to pay and keep all related monetary amounts at the ‘Final Pay’ and to specify all DATES related to this ‘Final Pay’\\     
   e.g. Statutory Holiday Date, Special Payment Date etc.

If the employee has no ‘Final Pay’ 
*the UPROEF will retrieve the most recent pay header that has the pay category marked as Regular Pay with the Pay Period Ending date on or prior to the user selected As of Date or the Assignment Detail's Leave date (whichever is earlier), this most recent pay period is used to derive Box 15, 17 and 19.

*you can review the ROE by running UPROEF, then the most recent Pay Header that is closed will be used, Box 17 / 19 information can be entered

*the UPROEF will derive the ROE Element values based on the most recent pay information 

The Pay Header’s Group is used to retrieve the IDGR Government Registration Number (BN), the IPPH ROE UDF information will be reported under this.


!!4) Generating an ROE

UPROEF allows you to select employees from the Employment screen [[IEEI] to generate an interface file to send to the ‘Department of Employment and Social Development Canada’ (ESDC) to print the Record of Employment.  

The UPROEF parameter screen allows you to select employees by 'Employment Status' and 'Termination Reason'

*Employee must be qualified for both the 'Employment Status' and  'Termination Reason' for the printing of ROE

An employee does not have to be terminated to generate an ROE.

*Employee may request the ROE regardless of the employee's status\\e.g. employee is on Leave, Terminated or even Active.
*ROEs can be generated for all employees even if not terminated. To do this, when running the UPROEF, the selection for 'ROE Status' should be 'Not Required' 

You may run UPROEF with 'Exception Level = Utility Trace' to trace Box 15, 17 logic for the employee. Then after UPROEF is run, you may run [RMEX] to view the Trace statements for the execution ID of the UPROEF run.

You may generate the ROE File name with mex id by specifying the word 'mex' in the file name, e.g. ROE_file_mex.BLK, or ACME_ROE_mex.BLK.

UPROEF parameter screen allows you to select the ROE Interface Code.

!ROE Interface Code

The ROE InterfaceCode is mandatory, users may select either '[[HL$CAN-ROE-XML]' or your own ROE Interface code.

From this ROE Interface Code, the [IDIF] screen Form Type determines the number of
pay periods to be used for the Pay Frequency.

!Box 17 Pay Period

If the employee is terminated and has been paid for final pay, the pay header that is
marked with '[Final Pay Method|FINAL_PAY_METHOD]' = '01' will be used to derive Box 15, 17 and 19.

If the user has entered an overridden 'ROE Box 17 Period' on [IPPH] / [IEEI] user
fields, then this overridden pay period is used for Box 17 and 19 processing.

!Update Mode

The UPROEF can be run in Trial mode to verify the ROE information prior to running in
Update mode.

*If the 'Trial' prompt = ‘Yes’, then the EMPLOYMENT and PAY HEADER information will not be updated.

*If the 'Trial' prompt = ‘No’, (i.e. in Update mode), the following EMPLOYMENT information will be updated if the [ROE Status|ROE_STATUS] = '01-ROE Required/Request', '03-Duplicate Requested'

;[Employment screen|]

;[ROE Status|ROE_STATUS]:If the [[ROE Status|ROE_STATUS] = '01', then the [ROE Status|ROE_STATUS] is updated to '02 - ROE Issued'. If the [ROE Status|ROE_STATUS] = '03 - Duplicate Requested', then update to '04 - Duplicate Issued'

;[ROE Issued|ROE_ISSUED_DATE]: Updated to the ROE Issued Date from parameter of UPROEF run

;[ROE Letter|ROE_LETTER]: Updated to the ROE Letter of the Termination Reason for the employee or the ROE reason that is overridden for this employee on [IEEI] screen user field '[ROE Reason Code|ROE REASON CODE (UDF)]'

;[Pay Header UDF and Employment UDF (User Defined Fields)|]

For a list of User Defined fields for ROE and what they are used for review the page
[ROE User Defined Fields|ROE USER DEFINED FIELDS].

!Multiple Employments

If the employee has multiple Employments on [IEEI] screen, you can request ROE on the
'[ROE Status|ROE_STATUS]' field for each of the Employment record on [IEEI] screen.

*If multiple Employments belong to the same Government Registration Number, these Employments are combined together and reported on one ROE.

*If multiple Employments belong to different Government Registration Number, then multiple ROEs will be issued for different Government Registration numbers for the same employee.

You must pay attention to the user-defined fields for each of the Employment records prior to running UPROEF

!Multiple Government Registration Numbers (BN)

The Group code on the Pay Header determines the Government Registration Number to be reported on ROE.

*If employee has been paid by different Group codes, either by multiple Employments or Assignments, then the employee can be paid by one or multiple Government Registration Numbers.

*The UPROEF can be run for one or multiple Government Registration Numbers.

*The design of the ROE Web Training environment only allows HRSDC to create one unique CRA BN for each employer. However, ROE Web Production allows you to create as many BNs as the employer requests/uses. Although you cannot test the multiple BNs in training environment, this is normal business practice for many Canadian employers so this will be seamless in the production environment.

*As well in production, HRSDC has a feature called the "ROE Overlap rule" that enables employers to issue multiple ROEs to the same employee for same periods of employment under different BNs. This must be requested by the employer when they register for ROE Web at a local HRSDC office.

*When reporting for multiple Government Registration Numbers for one employee, the employee's most recent pay period that is paid is used to report on multiple ROEs.

!Amend / Replace ROE

If an ROE needs to be replaced or amended to correct information on the ROE form, the
following steps need to be followed:

* Make the necessary changes to the employee’s records
** On IEEI 'ROE Status' field – change to ‘ROE Required/Request’
** On IEEI User Field – ‘Prev ROE Upto’ – remove the value in this field
** On IEEI User Field – ‘ROE Amend/Replace Serial#’ – specify the Serial Number of the ROE that is being amended or replaced.  This value will be put into Box 2 of the ROE. 
** On IPPH User Field – ‘Prev ROE Upto’ – remove the value in this field

!Report Parameters & Filters
||Report Parameters||
|Entity |You must enter one entity (Mandatory)
|Federal Regist Set| Enter one or more Federal Registration Sets (Optional)
|Federal Regist Number| Enter one or more Federal Registration Numbers (Optional)
|As of Date| This date is used to retrieve employee demographic information if necessary. Also to retrieve the closed pays with the pay issue date up to this date.
|ROE Issue Date| This date will be printed on ROE as the ROE issued date.
|ROE Status| This field indicates the ROE Statuses to be processed from Employments (Mandatory) Lexicon [X_ROE_STATUS].\\ This allows users to select to print '01 - ROE Required/Request' or '03 - Duplicate Requested' independently. \\If '00 - Not Required' is selected, employees do not need to be terminated, you can request sample ROE report prior to the employee's termination. \\If this parameter is not specified, all qualified Employments will be processed including to the previously issued ROE.
|Sort People By |You should sort employees by Last Name/First Name, however you may sort by employee's pay destination for distribution or sort by Person code. \\Lexicon [X_PERSON_SORT]
|Sort by Active/Inactive| Check this toggle to sort inactive employees first for mailing purpose
|ROE Interface Code| '[HL$CAN-ROE-XML]' or your Interface Code  (Mandatory).  \\NOTE – copy the High Line supplied HL$CAN-ROE-XML Interface code to a user defined Interface Code and use your code on UPROEF 
|File Name| Enter a file name or use the default file name from [[IDIF]. ROE Web  interface file naming convention: File name is maximum of 32 alphanumeric, file extension must be 'BLK' e.g. ACME_ROE200.BLK
|Exception Level| You should always run with Exception level only unless for tracing
|Trial| Allows you to run UPROEF in Trial mode for testing and update mode to update  the Employment ROE information (Optional)
|ER Addr Location |Allows you to enter an overridden Location to retrieve the Employer Address (Optional) \\If this is not specified, the entity's location address is used.
|ROE Process Method| Indicates the ROE Processing method on the ROE Web interface file. (Optional) Lexicon [X_ROE_PROC_METH]. \\This allows you to select to print Draft or Actual ROE for each UPROEF run.
|User Comment|Allows entry of user comments to be printed on report (Optional)
|Directory Name |Enter a valid directory name where the interface file will be written to

||Report Filters||
|Payroll| Enter one or more Payroll Codes (Optional)
|Department| Enter one or more Department Codes (Optional)
|Org Level Type| Enter one or more Org Level Types (Optional)
|Org Level |Enter one or more Org Level within Org Level Types (Optional)
|Authorization| Enter one or more Authorization Areas (Optional)
|Location |Enter one or more Location codes (Optional)
|Unit| Enter one or more Unit codes (Optional)
|Group |Enter one or more Group codes (Optional)
|People List Code| Please specify if People list is to be used (Optional)
|Person Code |Enter one or more Person Codes (Optional)
|Employment Status| Enter one or more Employment Statuses (Optional)
|Termination Reason |Enter one or more Termination Reasons (Optional)

!!5) ROE XML FILE VALIDATION

!ROE XML Schema

*ROE government website is:\\https://www.canada.ca/en/employment-social-development/programs/ei/ei-list/ei-roe/user-requirements/appendix-d.html

*The user should download and save the following [PayrollExtractXmlV2.xsd (20kb)|https://srv136.services.gc.ca/ROE-RE/ROEWeb-REWeb/pub/resource/XmlV2Schema]  file into your own directory in order to validate the payroll extract file structure before transferring the file using ROE Web. To perform this kind of validation, you need a tool that is capable of validating an XML schema.

*The ‘2016 XMLSPY software’ is used in the following example to perform the ROE XML Validation with the ROE XML Schema

!ROE XML Validation

*After UPROEF is run, the user can open the ROE XML file that is generated by UPROEF with XMLSpy 
*Then click ‘DTD/Schema’ to ‘Assign Schema’ and select PayrollExtractXmlV2.xsd (20kb) that you have saved before 
*Then click the ‘Yellow Tick’ to check the ROE XML file is well-formed
*Then click the ‘Green Tick’ to validate the ROE XML file with the XML Schema
*If there is no issues, then it will display the xml is valid and this file is ready to transmit to the government ROEWEB 

[{Image src='UPROEF-1.JPG' width='500' align='center' link='attach/UPROEF-1.JPG'}]

!ROE XML File Error

*Although the ROE XML file is always well-formed, but the XML Schema may have some dependency fields that are causing the XML file invalid and thus will be rejected by the government.

*When there are errors with the ROE XML file, the file is displayed as ‘xml is not valid’ in XMLSPY

*Then click the incorrect ‘Element’ to go to the Error location, and you can click the link to the government website to cross reference the incorrect Tag to find out what causes the problem

*In this error below, Box 17A Vacation Amount requires a mandatory Vacation Code and therefore the xml file is invalid

[{Image src='UPROEF-2.JPG' width='500' align='center' link='attach/UPROEF-2.JPG'}] 
*User must enter the Vacation Code on IEEI UDF [ROE VACN CODE (UDF)] and re-run UPROEF

*If this [ROE VACN CODE (UDF)] is not set up, then IDIF screen HL$CAN-ROE-XML  ‘Vacation Pay Code’ derivation expression will default to Code ‘2-Paid – no longer working’ 
[{Image src='UPROEF-3.JPG' width='500' align='center' link='attach/UPROEF-3.JPG'}] 


*If Box 17C Other Money Amount is not zero, it requires a mandatory Other Money Code 

*The user must enter the Other Monies Code on IEEI UDF [ROE OTHER1 CODE (UDF)] for UPROEF, otherwise the xml file is invalid

*If this [ROE OTHER1 CODE (UDF)] UDF is not set up, then IDIF screen HL$CAN-ROE-XML ‘Other Monies Code 1’ derivation expression will default to Code ‘O00 – Other’ 
[{Image src='UPROEF-4.JPG' width='500' align='center' link='attach/UPROEF-4.JPG'}]


*UPROEF report will issue the following Warning messages when an amount is on the xml file and the code is missing.

*Users should manually enter the appropriate codes on IEEI UDF and then re-run UPROEF.
[{Image src='UPROEF-5.JPG' width='750' align='center' link='attach/UPROEF-5.JPG'}]


----
![Notes|Edit:Internal.HOW+TO+CREATE+A+ROE]	
[{InsertPage page='Internal.HOW+TO+CREATE+A+ROE' default='Click to create a new notes page'}]