Trains banned from dumping sewage onto rail tracks from end of 2017
RMT say a timetable had been agreed for some trains to be fitted with controlled emission tanks by April 2016.
The date for halting the dumping of train sewage onto rail tracks has been brought forward after a campaign, according to a union.
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% 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% 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."
A spokeswoman for ScotRail said: "We are pleased that, working with the unions, we have been able to bring forward our plans."
Feedback: We want your feedback on our site. If you've got questions, spotted an inaccuracy or just want to share some ideas about our news service, please email us on email@example.com.
Updates: Would you like STV’s latest news update in your inbox every morning? Choose from our range of regular e-newsletters here