Each night, before the recitation of the Amida prayer during Arbit, we recite "Hashkibenu," though the text of "Hashkibenu" that we recite on Friday night differs from that which we recite during the week. In the text recited on weeknights, we pray to Hashem for protection. We recite the verse, "Hineh Lo Yanum Ve’lo Yiyshan Shomer Yisrael" ("Behold, the Guardian of Israel neither slumbers nor sleeps"), and we conclude by speaking of G-d’s role in protecting His people ("Shomer Et Amo Yisrael Mi’kol Dabar Ra La’ad"). On Shabbat, however, we do not need to pray for protection, because, as taught by the Zohar and mentioned by the Tur, Shabbat itself serves as a source of protection. Our "Shemirat Shabbat" – our "protecting" Shabbat from desecration – is reciprocal: we protect Shabbat, and Shabbat protects us. This concept is expressed in the famous hymn composed by Ibn Ezra: "Ki Eshmera Shabbat, Kel Yishmereni" – "When I keep Shabbat, the Almighty will keep me." Therefore, we recite a different text of "Hashkibenu" on Shabbat, without praying for protection.
Nevertheless, if one mistakenly recited the weeknight text on Friday night, or the Friday night text on a weeknight, he does not have to repeat the prayer. This is the ruling of Hacham Ovadia Yosef, in his Hazon Ovadia.
However, the Sha’ar Ha’kavanot emphasizes the importance of reciting in the Friday night prayers the words, "Ve’hagen Ba’adenu U’fros Alenu Sukat Shlomecha," as through this recitation we receive our "Neshama Yetera" – the "extra soul" granted to us on Shabbat. Therefore, the Kaf Ha’haim (Rav Yaakob Haim Sofer, Baghdad-Israel, 1870-1939) ruled that if one mistakenly recited the weeknight text on Friday night, although he is not strictly required to repeat "Hashkibenu," he should recite the phrase from "Ve’hagen Ba’adenu" through the end of the blessing, omitting Shem U’malchut ("Hashem Elokenu Melech Ha’olam"). Rav Moshe Halevi (Israel, 1961-2001), in his Menuhat Ahaba, disputed this ruling, claiming that reciting these words after completing "Hashkibenu" would constitute a "Hefsek" (improper interruption in the prayer). Hacham Ovadia Yosef, however, refutes this argument and accepts the Kaf Ha’haim’s ruling. Therefore, if one mistakenly recited the weeknight text of "Hashkibenu" on Friday night, he should say the final phrase of the prayer – from "Ve’hagen Ba’adenu" through the end of the Beracha – without Shem U’malchut.
Summary: The text of "Hashkibenu" which is recited before the Amida prayer at Arbit on Friday night differs from the text recited during the week. If one mistakenly recited the weeknight text of "Hashkibenu" on Friday night, he does not repeat the prayer, but he should preferably recite the final phrase of the Beracha – from "Ve’hagen Ba’adenu" until the end – without the words "Hashem Elokenu Melech Ha’olam."