follow the wire to the back of the final drive.. Between wheel and final drive.
Black fitment held onto face with one small screw. The sensor is about 10mm diameter and maybe 25mm long. Remove and clean it as any metal bits on it can upset the sensor. If you find swarf on it then there's a further (bigger) issue to worry about.
Trace the cable back the other way, On a GS it has a connector under the seat area by the top of the rear shock. An RT may be different but if it's come undone that will have the same effect.
ABS won't be working. Speedo picks up signal from the same sensor hence your problems.
They can just fail. Motor works, £20 ish...
Hope it helps.
Roger.