Realization of spectral-amplitude coding (SAC) in fiber-Bragg-grating (FBG)-based optical code-division multiple-access (OCDMA) network is demonstrated. Based on the developed multiple-access coding techniques, correlation subtractions of nearly orthogonal codes have been applied in this paper. We introduce the transmissive spectral characteristics of FBGs to construct our FBG encoder/decoder. Instead, it provides several important advantages. First, the cost is lowered due to our circulator-freed architecture. Second, the round-trip time problem is resolved. Besides, we also can eliminate the effect of chips power variance. The testbed consists of two active encoders and three decoders. Both matched and unmatched cases are demonstrated. Our measurements verify that our proposed scheme is successful and practicable.