Using a barbecue before Shabbat



This Shabbat we are making Al Haesh for the seudah. To keep the food warm we want to take off the grate and stick the pan with food on top of the coals. Is that Ok ?



In order to do that you will need to put a piece a foil on top of the coals and then put the pan on that . You may not put the pan directly on the coals.

There are two issues here . One is that there is no problem of Shehiya on Erev Shabbat. The other issue is  there is a problem of Hatmana.
The Mishna in Shabbat 36b: a stove that was lit on Shabbat eve with straw or with scraps from the field, one may place a pot of cooked food atop it . If the stove was lit with olive pulp, or with wood, one may not place a pot atop it on Shabbat until he sweeps the coals from the stove  or until he places ashes on the coals.

The Mishna says that it is forbidden to put a pot on top of coals unless you clear then out and leave a hot oven floor or cove then with ash. The Gemara Ḥananya says: Any food that has already been cooked to the extent of the food of ben Drosai, who would only cook his food the minimum amount necessary, one is permitted to leave it atop a stove on Shabbat even though the stove is not swept and not covered with ashes.

 Rav Sheshet said that Rabbi Yocḥanan said: With regard to a stove that was lit with Gefet or with wood, one may leave cooked food even if it was not yet completely cooked. However, if one removed the food from the stove, one may only return it if he sweeps the coals out of the stove while it is still day, or if he places ashes on the coals. He holds that in our Mishna we learned, about ‘Returning the cooked food’,  however, with regard to leaving a pot on top of the stove, one may leave it  even if it is not swept and not covered with ashes. 

Rabbi Yitzchak bar Naḥmani said that Rav Oshaya said: A stove that he covered with ashes and that reignited on Shabbat, he may leave cooked food that was already completely cooked upon it. Conclude from this halakha that even when it is food that reduces and improves by remaining on the fire, it is nevertheless permitted to leave it. Here, it is different because he covered the coals in the stove with ashes. The Gemara asks: If so, what purpose was there to say this halakha?  The Gemara answers: The case where he covered it with ashes and it reignited on Shabbat was necessary and required additional articulation. Lest you say that since it reignited, it returns to its original status and is prohibited, therefore it taught us that this is not the case. 
Rabba bar bar Ḥana said that Rabbi Yoḥanan said: With regard to a stove that he swept out or covered with ashes before Shabbat and subsequently reignited on Shabbat, one may leave and cooked food that was already completely cooked upon it, even if the coals were from the wood of a broom tree, which are very hot and long-burning. If so, conclude from this that even if food shrivels and improves while on the stove, it is permitted.
The Rishonim argue about what the psak is.
The Rif and the Rambam say that it is forbidden leave the pot on a flame which is not cooked completely and will start to burn if it keeps on cooking, on a fire which is not scraped out or covered. Rashi and Rabbeinu Chananel bot say that if the food is cooked until it’s edible it is permitted to leave it on a flame on Erev Shabbat.
The Shulchan Aruch  Orach Chaim 253:1 . It seems from the fact that Shulchan Aruch quotes Rashi as ‘some say’  he rules stringently like the Rambam even if the food is cooked completely if more cooking is good for it it is forbidden to leave it on a flame which is not lessened. The Rema though rules leniently:
The Mishna Berura that it is permitted to leave food before Shabbat if the food is cooked until it’s edible (half cooked), on a fire.

That is the issue of leaving in a fire but there is also a problem of Hatmana here.
The Shulchan Aruch Orach Chaim 153:1 writes:  Shehiya is permitted when the pot is placed on grate or stones but if it placed on coals it is considered Hatmana and forbidden.  The Rema argues that even if it sits on the fire itself as long as the pot is not covered by the top it is not Hatmana. Just one should put something in between the pot and the coals…it would be permitted to take out the pot and just be careful not to move the coals even if they move a little it is fine since he did not intend.

The Shulchan Aruch and the Rema argue by Hatmana . the Shulchan Aruch rules that tis forbidden to put food on coals on Erev Shabbat. The Rema is lenient but since when you take the pot out of the coals they will move  the Rema also advises to not put the pot/pan directly on the fire.
In our case if the food was fully cooked on the grill and you want to just keep it warm, it would be OK according to halacha.  However since you are closing the lid also it would be a problem of Hatmana. Therefore you must put a piece of foil on top of the coals and then put the pan on it and it  won’t be surrounded by heat.  It is better as well to keep the lid open.