As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
DURING CRUISE, AT APPROXIMATELY 31,000 FT, THE CREW RECEIVED A FLAPS FAIL MESSAGE. THE QRH WAS COMPLIED WITH AND THE CREW DECLARED AN EMERGENCY WITH THE EMERGENCY VEHICLES DISPATCHED. THE AIRCRAFT LANDED SAFELY. MAINTENANCE REMOVED AND REPLACED THE FLAP ELECTRONIC CONTROL UNIT. OPERATIONAL CHECKS GOOD. AIRCRAFT OK FOR SERVICES. (K)