CD is no problem, you connect it to the tape input with a DIN-RCA -adapter (or directly if it happens to be a B&O CD with a DIN connector).
The grammophone input may have a pre-amp (depending on version), but it isn't really suited for modern magnetic pickups. You could connect the turntable to the tape input with an externall RIAA pre-amp, but then of course can't use the CD at the same time. If the particular BM900 is missing the preamp altogether (built for a ceramic pickup), the phono input might be usable as just another line level input.