Q) I forgot to take challah before Shabbos. Is there any option of taking challah on Shabbos itself?
A) The Shulchan Aruch (OC 339:4) rules that terumos and ma’asros cannot be separated on Shabbos. The Mishna Berura (s.k. 26 and Siman 261 s.k. 4) adds that one may also not separate challah on Shabbos.
Regarding Yom Tov, the Shulchan Aruch (OC 506:3) rules that one who kneads a dough on Yom Tov [which is permitted] is allowed to separate challah from the dough. However, challah cannot be separated from a dough that was kneaded before Yom Tov.
The Remo (ibid) adds that if one has a dough that was kneaded before Yom Tov he can knead another dough on Yom Tov and join the two doughs together, and take challah from both of the doughs (collectively). The Mishna Berura (s.k. 17) explains that since it is permitted to make a dough on Yom Tov, Chazal also permitted taking challah on Yom Tov. [I.e. since the obligation of taking challah comes about in a permitted way on Yom Tov, in such a situation Chazal allowed taking challah[1].]
We can now raise the following question: Is the prohibition of taking challah on Shabbos only because in the standard scenario the dough was obligated in challah before Shabbos – i.e. because one cannot make a dough on Shabbos, and we must be discussing a dough that was formed before Shabbos. If this is so, maybe it can be suggested that if we find a viable way to create a chiyuv challah on Shabbos itself – it should be mutor to take challah on Shabbos – similarly to the permissibility on Yom Tov.
Or, did Chazal decree that one may not take challah on Shabbos in all situations – even where the chiyuv challah came about on Shabbos itself?
The Mishna Berura (Siman 457 s.k. 10) writes that if a chiyuv challah only happened on Yom Tov – i.e. if one had several batches of matzos that did not each contain a shiur challah independently, and he combined them together on Yom Tov, one may be mafrish challah on Yom Tov. The Sha’ar Hatziyun (Siman 457 s.k. 19) writes that if this occurred on Shabbos (i.e. one combined several batches of matzos on Shabbos and thus caused a chiyuv challah on Shabbos) one may not separate challah.
We see from this Sha’ar Hatziyun that even if the chiyuv challah came about on Shabbos itself it is still forbidden to take challah on Shabbos.
In conclusion, it is forbidden to take challah on Shabbos itself in all situations – even if the obligation of hafroshas challah only came about on Shabbos.
[1] וע’ ט”ז (או”ח תק”ז ס”ק ו’) שמותר לגלגל ולאפות עיסה בי”ט כדי לאכול פת חמה לא גזרו [גם בהפרשת חלה]