Making a Sukkah in a room that has had its roofing removed, but has its ceiling frame remain:
A. If the ceiling frame is material Kosher for Sechach:
If the ceiling supports are made of material kosher for Sechach, then one may make the Sukkah under this frame, or place the Sechach over the frame. Furthermore this frame material itself joins the Kosher Sechach to give majority shade and one may eat directly under it.
The Reason: Although these supports are ideally invalid for Sechach being that they were not placed there for shade but for dwelling purposes, nevertheless by removing the ceiling panels from it in order to replace it with Kosher Sechach one turns these supports back into Kosher Sechach.
Making the Sukkah under the frames: Then the frames invalidate all the Sechach directly under it.
Placing Sechach over ceiling supports [less than 4 Tefach wide]: Then even if the supports are within three handbreadths within each other, nevertheless we do not say the concept of Lavud, and therefore one may eat under the Kosher Sechach.
The reason that we do not say the concept of Lavud here is because: this status is only given when there is no interval between the two items that are in proximity of three handbreadths. Thus here since the Sechach intervenes the concept of Lavud does not apply.
If one did not remove any tiles from the pergola frame for the purpose of building the Sukkah then the frame remains invalid even if one places Kosher Sechach over the frames.
If the frames are within three Tefach from each other is it valid to make the Sukkah under it?
Yes. Although there are Poskim which are stringent.
Placing Kosher Sechach over non-Kosher Sechach and then removing the non-Kosher Sechach:
Even if one were to remove the non-Kosher Sechach from under the Kosher Sechach the Sukkah is invalid.
The reason for this is because: we learn from the verse of “the festival of Sukkahs make for you” that one must make the Sukkah directly and not have it be made consequently through doing another action. Thus here it is invalid as when one originally placed the Kosher Sechach over the non-Kosher Sechach the Kosher Sechach did not serve any purpose and thus the Sechach never received a Sechach status, and thus although now when one removes the invalid Sechach from under, it now serves to give shade, nevertheless since its giving of shade is now a result of a different action it is invalid due to the teaching above that the shade must be given through a direct action.
 The horizontal and vertical poles which one places the panels of the roofing over, such as is done in wooden Sukkahs, and in ceilings with Styrofoam square panels.
 In Admur the case specifically deals with wood that is Kosher for Sechach but never had anything removed from it. Meaning it was built for non-shade purposes and one never placed a ceiling insert in it. Thus the supports are invalid as they were never built for shade. It does not even help to place Kosher Sechach over them as one has never done an action to the actual supports to consider them to have been placed for shade. [626/13]
Initially however one is to only use supports which are themselves made of Kosher material as will be explained.
 Piskeiy Teshuvos 626/9; See Admur 626/15 which writes that one is to look in 631 regarding if it is permitted to eat under the frames, thus implying that the frames themselves remain invalid even if one places Kosher Sechach on them. Now although from 626/14 [which clauses the ruling in 626/13 that if one places the Sechach on top of the frames it is Kosher] it implies that the frames do join the Sechach and become Kosher just like it, in truth the novelty in that Halacha is simply that the frames do not invalidate any of the Kosher Sechach that is on top of it, [unlike in the previous case that the Sechach which is under the frames is invalid]. [See Levushei Serud 626/6] The reason for this is because the frames which are not Kosher are minority together with the Kosher Sechach and are hence nullified according to all opinions. [Shaareiy Tziyon 626/25; as explained in Admur 626/5-7] The Levushei Serud ibid writes the reason is because when one places the Sechach on top of the frame it is the Sechach that is giving the shade and not the frame. In any event the frames themselves do not become Kosher Sechach and hence if the frame is 4 Tefach one cannot eat under the frame as is explained in 631.
 See M”A 526/6 and Admur 626/13-14 from which it is implied that we do rule like the Bach and apply the concept of Lavud if there isn’t Kosher Sechach between the frames. M”B 626/17 suspects for the opinion of the Bach that we do say Lavud even to be stringent.
 as the shade is still being given by the non-Kosher Sechach
 As explained above that the main purpose of a Sukkah is shade and thus if the Sechach does not serve for shade then it is worthless.