"And the Ark of the LORD was in the field of the Philistines seven months" (1 Samuel 6:1). It is written, "For these seven ewe-lambs, etc." (Genesis 21:28). The Holy One, blessed be He, said to him [to Abraham]: You gave him seven ewe-lambs; by your life, I shall delay the rejoicing of your children for seven generations. Another interpretation: You gave him seven ewe-lambs; by your life, his sons shall slay seven righteous ones of your sons. These are they: Samson, Hophni and Phinehas, Saul and his three sons. Another interpretation: You gave him seven ewe-lambs; by your life, his sons shall destroy seven sanctuaries of your sons. These are they: the Tent of Meeting, and Gilgal, and Nob, and Gibeon, and Shiloh, and the Eternal House twice. Another interpretation: You gave him seven ewe-lambs; by your life, my Ark shall go about in the field of the Philistines seven months. This is what is written: "And the Ark of the LORD was in the field of the Philistines seven months."
Abraham's Seven Ewes and Seven Punishments to Israel
Midrash Shmuel 12:1
ויהי ארון ה' בשדה פלשתים שבעה חדשים (שמואל א' ו' א'), כתיב כי את שבע כבשות וגו' (בראשית כ"א כ"ח), אמר לו הקדוש ברוך הוא [לאברהם] אתה נתת לו שבע כבשות, חייך שאני משהה בשמחת בניך שבעה דורות. דבר אחר אתה נתת לו שבע כבשות, חייך שבניו הורגים שבעה צדיקים מבניך, אלו הן שמשון חפני ופנחס שאול ושלשת בניו. דבר אחר אתה נתת לו שבע כבשות, חייך שבניו מחריבין שבע משכנות מבניך, אלו הן אהל מועד וגלגל ונוב וגבעון ושילה ובית העולמים תריין. דבר אחר אתה נתת לו שבע כבשות, חייך שארוני מחזר בשדה פלשתים שבעה חדשים, הדא הוא דכתיב ויהי ארון ה' בשדה פלשתים שבעה חדשים.