It is narrated from Abu Huraira (may Allah be pleased with him) that a man broke his fast in Ramadan (by having intercourse), so the Prophet (peace be upon him) ordered him to free a slave, or to fast for two consecutive months, or to feed sixty needy people. The man said: "I do not have the ability to do that." A large basket of dates was brought to the Prophet (peace be upon him). He said: "Take it and give it as charity." The man said: "There is no one more needy than me." At this, the Messenger of Allah (peace be upon him) laughed so much that his front teeth became visible, then he said: "Alright, (go and) eat it yourself." Imam Shafi'i (may Allah have mercy on him) said: "His fast was broken because of intercourse."
Hadith Referenceمسند الإمام الشافعي / كتاب الصيام / 651
Hadith Takhrijأخرجه البخاري، الصوم، باب اذا جامع في رمضان ولم يكن له شيء فتصدق عليه فليكفر (1936)، (1937) ۔ ومسلم، الصيام، باب تغليظ تحريم الجماع في نهار رمضان على الصائم ، ووجوب الكفارة .... الخ (1111)۔