Sunan Ibn Majah – Hadith No : 247

‘Abdullah bin Abu Qatadah narrated that his father said: “The Messenger of Allah said: ‘The best things that a man can leave behind are three: A righteous son who will pray for him, ongoing charity whose reward will reach him, and knowledge which is acted upon after his death.'” (Hasan)Another chain with similar wording.

Hadith In Arabic Text :

حدثنا إسماعيل بن أبي كريمة الحراني، حدثنا محمد بن سلمة، عن أبي عبد الرحيم، حدثني زيد بن أبي أنيسة، عن زيد بن أسلم، عن عبد الله بن أبي قتادة، عن أبيه، قال قال رسول الله صلى الله عليه وسلم ‏”‏ خير ما يخلف الرجل من بعده ثلاث ولد صالح يدعو له وصدقة تجري يبلغه أجرها وعلم يعمل به من بعده ‏”‏ ‏.‏

Chapter : The Book of the Sunnah – كتاب المقدمة