TX TRS ED40 Generate triggers duplicate key error and halts

Description of Issue

Generating ED Records in TX TRS Report and receiving a primary key error - 


Violation of PRIMARY KEY constraint

Cannot insert duplicate key in object StateReporting.TexasTRSDetail. The duplicate key value is (1622, ED, 40, 5, 2021, 1, 22831, 04, 5, 2021). 

Context
  • Payroll
  • Texas
  • TX TRS Report
Cause

An employee has two or more records in Employee Job/Salary that both start within the reporting month, roll up to the same TX TRS Position, and have different Contract dates. 

Resolution

This issue will be corrected under (master) work ticket MUN-414045.


Workaround: 

Exclude the affected employee(s) from the Generate.

The duplicate key value in the error message, in order of appearance, gives you the District ID, Report Type, Record Type, Reporting Month, Reporting Year, Submission Number, Employee Number, TRS Position, Adjusted Month and Adjusted Year. 

In the example above, for instance, the affected employee number is 22831.

  1. Create an Employee Group in Employee Group Master
  2. Assign to the affected employee(s) 
  3. Define the new Employee Group on the TX TRS Generate define to exclude
  4. Generate TX TRS
  5. Manually add the ED40 record for the affected employee(s). 
Additional Information