This research includes a simulation of optical code division multiple access system transceiver (OCDMA) of the spectral amplitude coding (SAC). The study investigates the effect of the pulse generator type used in the transmitter SAC-OCDMA of direct detection technique and the effect of the length of the optical fiber on the signal quality factor (Q) and on the bit error ratio( BER) . In addition a comparison is made between the SACOCDMA system of direct detection technique and another one of complementary subtraction technique in terms of signal quality factor and the bit error ratio when using the same parameters for both systems.