The touchscreen quit working on me last week (Samsung Impression a877). I took it to an AT&T store but they couldn't find anything wrong. But I found online yesterday a Samsung service code that does a full reset of the phone. That fixed the phone. Now that I can operate my phone again the software version is A877UCID3, model SGH-A877.
So far the phone is working. Hopefully this will work for you.
I typed the code using the keyboard and used the keyboard "enter key" when done typing. A screen message came up briefly. Something about processing and that the phone will shut off and restart.
code: *2767*3855#
This code is known as a master reset. We know about it already. That is the first and last thing you should do to try and fix your phone. But it also resets your phone to factory condition. Which means you lose everything on your phone that you installed.