Notebook gets sleep while copying data

How does the hard disk get affected, when the data is being written and the laptop goes to sleep (by closing lid)? Will it simply stop the process or will it result in damaging the hard drive(bad sector or any similar problem?
