To reuse, you would need to try to wipe the pipe, and knock the solder out of the fitting, while still hot. Easy enough to do on the pipe. Fittings can be a little harder. Most folks would use a new fitting, just to save time...but copper is not cheap these days!
You will want to reflux the joint, and flow some new solder. The solder which remains will "tin" the joint and make it flow easier.