TL;DR — Quick Summary
SUA IMSS error importing employee movements: fix TXT file format, pipe delimiters, invalid NSS, date mismatches and Aspel NOI or CONTPAQi Nóminas errors.
When payroll teams try to import employee movements into IMSS SUA — hires, terminations, or salary modifications — generated from Aspel NOI or CONTPAQi Nóminas, the system frequently displays messages such as “Error importing employee movements file”, “Invalid record format line X”, or “NSS not found in database”. These errors block timely registration of movements with the IMSS and can trigger fines if unresolved within the five business-day deadline. This guide covers each root cause and the exact steps to fix the file, complete the import, and verify movements before sending them to IDSE.
The Error
When loading the movements file in Affiliation > Import movements in SUA, you may see one or more of these messages:
“Error importing employee movements file”
A generic message indicating SUA could not process the file. Usually points to a global format issue: wrong delimiter, character encoding, or field structure.
“Invalid record format line X”
SUA flags a specific line that does not meet the expected field length, delimiter, or data type. “X” gives the exact problematic line number.
“NSS not found in database”
The Social Security Number of one or more workers in the file does not exist in the SUA local database. SUA cannot register movements for workers it does not recognize.
“Duplicate movement”
The file contains a movement already captured for the same worker, same type, and same date — either manually or through a previous import.
Depending on the SUA version, the system may reject the entire file or partially import only valid records. The results report at the end of the import details how many records were accepted and how many were rejected with the reason for each.
Root Cause
Incorrect TXT file format
SUA expects a plain text file with fields separated by the pipe (|) character. The minimum record structure is:
| Field | Description | Format |
|---|---|---|
| Employer registration | 11 alphanumeric characters | A1234567890 |
| NSS | 11 numeric digits | 12345678901 |
| Movement type | 2 chars: 08=Hire, 02=Termination, 07=Salary mod | 08 |
| Movement date | DD/MM/YYYY | 22/03/2026 |
| SBC | Base contribution salary, dot decimal | 456.78 |
| Worker type | 1 character | 1 |
| Work schedule | 1 character | 0 |
A valid record looks like:
A1234567890|12345678901|08|22/03/2026|456.78|1|0
The most frequent format errors when exporting from payroll systems are:
- CSV with commas instead of pipe: Some systems export as CSV by default. SUA does not recognize commas as delimiters.
- Header row included: If the first line contains column names, SUA treats it as an invalid data record.
- NSS with wrong length: An NSS with 10 or 12 digits instead of 11 causes immediate rejection.
- Extra spaces: Spaces at the start or end of a field, common when copying from Excel.
Incompatible character encoding
SUA requires files with ANSI (Windows-1252) encoding. Files saved in UTF-8 — the modern standard used by many systems — cause problems when they contain:
- Accented characters in worker names (á, é, ó, ú, ñ).
- The UTF-8 BOM (Byte Order Mark), which adds invisible bytes at the start of the file and corrupts the first record.
- Unix line endings (LF) instead of the Windows line endings (CR+LF) SUA expects.
NSS not in local database
SUA validates each NSS against its local database (SUA.MDB). If a worker is new and was not registered in SUA beforehand, the system rejects that movement. This happens when:
- New employees are hired and the hire movement is imported before registering them in SUA.
- The SUA database is not synchronized with IMSS, and workers who appear in IDSE are missing from SUA.
- There is a digit difference in the NSS in the file versus what is registered in SUA.
Duplicate movements
SUA detects duplicates when a movement has the same NSS, same type, and same date as one already in the database. This happens when:
- The same file is imported again after a previous successful import.
- The movement was entered manually before the bulk import.
- The payroll system generated repeated lines due to an error in the export process.
Date and decimal format errors
- MM/DD/YYYY instead of DD/MM/YYYY: Common in payroll systems configured for the US market.
- Comma as decimal separator: SUA expects a period in SBC values (e.g.
456.78, not456,78). - Out-of-range dates: SUA generally accepts movements for the current and previous bimonthly period. Older periods may require a special process.
Step-by-Step Solution
1. Back up the SUA database
Before any bulk import, protect your data:
- Close SUA completely.
- Navigate to
C:\CobranzaSUA\(or wherever SUA is installed). - Copy SUA.MDB to a dated backup folder:
Backup_SUA_2026-03-22. - Verify the copied file is the same size as the original.
2. Open the file in Notepad++ and fix the format
Open the TXT in Notepad++ (free at notepad-plus-plus.org):
- Check encoding: Menu Encoding. If it reads “UTF-8” or “UTF-8 BOM”, go to Encoding > Convert to ANSI.
- Check line endings: Go to View > Show Symbol > Show End of Line. Each line must end with
CR LF. If you only seeLF, go to Edit > EOL Conversion > Windows (CR LF). - Remove header row: Delete the first line if it contains column names.
- Go to the flagged line: If SUA reported “invalid format line X”, press Ctrl+G to jump to that line and verify:
- Pipe (
|) separators between all fields. - Exactly 11 numeric digits for NSS.
- 11 alphanumeric characters for employer registration.
- Date in DD/MM/YYYY format.
- SBC with period decimal separator.
- Pipe (
- Remove blank lines at the end of the file or between records.
3. Validate and register missing NSS records
For “NSS not found” errors:
- Open SUA and go to Affiliation > Query/Modify workers.
- Search for each rejected NSS:
- If not found: Go to Affiliation > Register workers and enter all employee data (NSS, full name, CURP, RFC, hire date, initial SBC).
- If roster sync is needed: Log into IDSE with your e.firma, download the current employee roster file, and update your SUA database.
- If the NSS exists but has a different digit in the file, correct the file to match the exact 11-digit NSS in SUA.
4. Remove duplicate movements from the file
For “Duplicate movement” errors:
- In SUA go to Affiliation > Query movements.
- Filter by the bimonthly period and year you are importing.
- Note which movements already exist (NSS, type, date).
- Remove from the TXT file the lines that match already-captured movements.
- Save the file and retry the import.
5. Import the corrected file and verify
With the validated and clean file:
- In SUA go to Affiliation > Import movements.
- Click Browse and select the corrected TXT.
- Select the movement type (hires, terminations, or salary modifications).
- Click Import.
- Review the results report:
- Accepted records: Successfully imported movements.
- Rejected records: Lines with errors and the specific reason.
- If records are still rejected, repeat the correction for those specific lines.
- Go to Affiliation > Query movements and filter by today’s date to confirm all movements appear correctly before sending to IDSE.
Alternative Solutions
Correct export from Aspel NOI
If the file generated by NOI frequently has format issues:
- In Aspel NOI go to Processes > IMSS > Generate SUA file.
- Select the bimonthly period and verify the employer registration in the company settings exactly matches IMSS.
- Before importing to SUA, open the resulting TXT in Notepad++ to confirm pipe separators and ANSI encoding. Some NOI versions generate UTF-8 if the server’s regional settings use that format.
- If NOI generates dates in MM/DD/YYYY, use Find & Replace with regular expressions in Notepad++ to invert the date format across all records.
Correct export from CONTPAQi Nóminas
For files generated in CONTPAQi Nóminas:
- Go to IMSS > Generate affiliation movements within CONTPAQi.
- Select the SUA output format (not IDSE or XML).
- Verify the employer registration in the CONTPAQi company settings.
- Open the resulting file in Notepad++ and confirm ANSI encoding and pipe delimiters. CONTPAQi Nóminas may export with semicolons in some regional configurations.
Manual entry as a fallback
For small volumes (fewer than 15 movements), manual entry in SUA is faster than debugging a problematic file:
- Hires: Affiliation > Affiliation movements > Hire.
- Terminations: Affiliation > Affiliation movements > Termination.
- Salary modifications: Affiliation > Affiliation movements > Salary modification.
Prevention
- Standardize the export: Document the exact export parameters in NOI and CONTPAQi (pipe delimiter, ANSI encoding, DD/MM/YYYY dates) and distribute them to the entire payroll team.
- Always validate with Notepad++ before importing: ANSI encoding, CR+LF line endings, pipe delimiters, DD/MM/YYYY dates, and period decimal in SBC. Thirty seconds of review saves hours of correction.
- Sync the SUA roster monthly with IDSE to keep active worker NSS records up to date.
- Keep an import log: Record which files were imported, the date, and the number of accepted records. This prevents accidental re-imports.
- Back up SUA.MDB daily with a Windows scheduled task. A recent backup allows fast recovery from any failed import.
- Import within the legal deadline: IMSS requires hires and terminations to be filed within 5 business days of the event. Late movements can trigger fines.
Related Issues
- “Error in SIPARE payment file structure”: If you imported movements with an invalid or out-of-range SBC, the contribution calculation and the resulting SIPARE file will have errors. Correct the SBC in the imported movements and recalculate.
- “Payment file does not include imported movements”: Movements were imported correctly but their dates do not fall within the bimonthly period being calculated. Verify that movement dates fall within the active period.
- “Digital certificate expired in IDSE”: If you prefer sending movements through IDSE instead of SUA and your e.firma is expired, renew it at the SAT portal before proceeding.
- “Untimely movement”: IMSS accepts late movements but flags them as untimely, which may lead to fines. Always file within 5 business days.
- “Error connecting to SUA.MDB database”: The database is damaged or locked. Close all SUA instances, compact the database with Microsoft Access, and retry the import.
Summary
- SUA rejects movement files due to incorrect format (CSV with commas instead of TXT with pipe), UTF-8 encoding instead of ANSI, NSS values not in the local database, duplicate movements, or incorrectly formatted dates.
- Always back up SUA.MDB before any bulk import.
- Use Notepad++ to verify ANSI encoding, CR+LF line endings, pipe delimiters, DD/MM/YYYY dates, and period decimal in SBC.
- Aspel NOI and CONTPAQi Nóminas require specific configuration to export in the correct format for SUA; verify the resulting file before importing.
- Register new employees in SUA before importing their hire movements, or sync the roster from IDSE.
- For small volumes, manual entry avoids all file format issues entirely.
- File all movements within 5 business days of the event to avoid late-filing penalties.