This error can happen due to a bad record in the transaction. There are two solutions: one to fix the locked transaction error message, and another to resolve the bad record issue.
To resolve the locked transaction error message:
Go to Housekeeping, Administrative Tools, Tools.
Select Change Batch Lock Status & Pin No.
Click Apply.
Remove the letter 'L' in the column of L Status. You also need to delete the number in the column of L.Trans.
To resolve the bad record issue:
To check bad records: go to Periodic, Check Records in Files, Look for bad records.
Click Check.
Go to Housekeeping, File Organization.
Click Mark All.
Click OK.
Key in the transaction again.
