reading sms

Which version of the IDE are you using?

If you are using 1.0 or later, Serial.flush() blocks until the last character from the send buffer has been grabbed for sending. Is that really useful or necessary in your application?

Are you talking to the phone on the serial port, or the Serial Monitor? You seem to be trying to do both.

        Serial.println(data);    //shows the message

Does it? What does the message look like?

Parsing the message, if you've collected it correctly, is pretty easy. But, it would help if we saw what the message was.