Assuming that you have replaced the transmission fluid with the correct fluid type and have filled it as per this guide
http://www.pelicanparts.com/bmw/tech...Fluid_Auto.htm
the most likely cause is a stuck shift solenoid. Double check that the cause is not air in the cooling system that is preventing the temperature sensor signalling he DME/EGS that the engine has warmed up as this is also a possibility.