صحيح البخاري Sahih Bukhari كتاب العمل في الصلاة The Book of Dealing With Actions In As-Salat (The Prayer)
بَابُ لاَ يَرُدُّ السَّلاَمَ فِي الصَّلاَةِ:

(15) Chapter. One should not retum greetings during the Salat (prayer).

2 hadith
Hadith 1216
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ أَبِي شَيْبَةَ ، حَدَّثَنَا ابْنُ فُضَيْلٍ ، عَنْ الْأَعْمَشِ ، عَنْ إِبْرَاهِيمَ ، عَنْ عَلْقَمَةَ ، عَنْ عَبْدِ اللَّهِ , قَالَ : " كُنْتُ أُسَلِّمُ عَلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَهُوَ فِي الصَّلَاةِ فَيَرُدُّ عَلَيَّ ، فَلَمَّا رَجَعْنَا سَلَّمْتُ عَلَيْهِ فَلَمْ يَرُدَّ عَلَيَّ وَقَالَ : إِنَّ فِي الصَّلَاةِ لَشُغْلًا " .
Narrated `Abdullah: I used to greet the Prophet while he was in prayer and he would return my greeting, but when we returned (from Ethiopia) I greeted the Prophet (while he was praying) but he did not return the greeting, and (after finishing the prayer) he said, "In the prayer one is occupied (with a more serious matter)."
Hadith Reference Sahih Bukhari / The Book of Dealing With Actions In As-Salat (The Prayer) / Hadith: 1216
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 1217
حَدَّثَنَا أَبُو مَعْمَرٍ ، حَدَّثَنَا عَبْدُ الْوَارِثِ ، حَدَّثَنَا كَثِيرُ بْنُ شِنْظِير ، عَنْ عَطَاءِ بْنِ أَبِي رَبَاحٍ ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ رَضِيَ اللَّهُ عَنْهُمَا , قَالَ : " بَعَثَنِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فِي حَاجَةٍ لَهُ فَانْطَلَقْتُ ثُمَّ رَجَعْتُ وَقَدْ قَضَيْتُهَا ، فَأَتَيْتُ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَسَلَّمْتُ عَلَيْهِ فَلَمْ يَرُدَّ عَلَيَّ فَوَقَعَ فِي قَلْبِي مَا اللَّهُ أَعْلَمُ بِهِ ، فَقُلْتُ فِي نَفْسِي لَعَلَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَجَدَ عَلَيَّ أَنِّي أَبْطَأْتُ عَلَيْهِ ، ثُمَّ سَلَّمْتُ عَلَيْهِ فَلَمْ يَرُدَّ عَلَيَّ فَوَقَعَ فِي قَلْبِي أَشَدُّ مِنَ الْمَرَّةِ الْأُولَى ، ثُمَّ سَلَّمْتُ عَلَيْهِ فَرَدَّ عَلَيَّ فَقَالَ : إِنَّمَا مَنَعَنِي أَنْ أَرُدَّ عَلَيْكَ أَنِّي كُنْتُ أُصَلِّي ، وَكَانَ عَلَى رَاحِلَتِهِ مُتَوَجِّهًا إِلَى غَيْرِ الْقِبْلَةِ " .
Narrated Jabir bin `Abdullah: Allah's Apostle sent me for some job and when I had finished it I returned and came to the Prophet and greeted him but he did not return my greeting. So I felt so sorry that only Allah knows it and I said to myself,, 'Perhaps Allah's Apostle is angry because I did not come quickly, then again I greeted him but he did not reply. I felt even more sorry than I did the first time. Again I greeted him and he returned the greeting and said, "The thing which prevented me from returning the greeting was that I was praying." And at that time he was on his Rahila and his face was not towards the Qibla.
Hadith Reference Sahih Bukhari / The Book of Dealing With Actions In As-Salat (The Prayer) / Hadith: 1217
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة