It is not possible to constrain rotations on 3d solid elements. Try to understand that if the top edge of the beam is held in X and the bottom edge of beam is held in X then no rotation can happen.
Instead use a shell element beam or just use beam elements.
If you must have 3d then you have some choices, here are some.
1. come up with a system of 1D/2D elements connected to your solid model with some type of link (rigid or weighted). Apply the constraint to the 1D/2D elements to be free in the rotation needed.
2. only hold the bottom edge of beam, rather than face (this creates a singularity- create a small volume region near and including the edge as a very stiff material)
3. hold end surface only in the "y" restrained translation direction and then restrain the rigid body motion using either inertia relief or this technique.