Representatives of the RMT union met with transport minister Derek MacKay, Scotrail management and Transport Scotland officials to discuss the issue last week.
The union said a timetable had been agreed for about 40 per cent of Scotrail trains to be fitted with controlled emission tanks by April 2016, with the rest completed by December 2017.
General secretary Mick Cash said: “The fact the programme for the elimination of the filthy, disgusting and dangerous practice of dumping sewage on our railways is further advanced in Scotland is 100 per cent down to the hard work and campaigning over several years by representatives, members and officials of RMT.
“Network Rail in Scotland are also in the process of arranging briefings to frontline maintenance staff and offering vaccinations to reduce the risk to staff from untreated human excrement which is another important development resulting from the RMT campaign.
“If real targets can be laid down for ending the scandal of sewage on our railways in Scotland, then they can be achieved across the whole network.
“It’s time for the train companies and the politicians to stop the excuses and get on with it.”