All-electron relativistic self-consistent-field (RSCF) method based upon Dirac-Coulomb Hamiltonian is extended to include the magnetic part of the Breit interaction term in the SCF; cycle. The explicit form of the Fock matrix for the magnetic part is derived and simplified within the restricted open-shell scheme. The effects of the magnetic part of the Breit term on spin-orbit splittings and dipole moments are investigated for (2) Pi states of diatomic hydrides AH (G =Be,B,C,N,O,F,Mg,AI,Si,P,S). Calculated spin-orbit splittings are improved significantly by the inclusion of the magnetic part and approach the experimental values to within 10 cm(-1) even for the second-row diatomic hydrides. The magnitude of the effect of the magnetic part is similar for the molecules composed of atoms in the same group regardless' of the nuclear charge implying that the magnetic part and probably the whole Breit term become less important for molecules with large spin-orbit interactions. With the present RSCF method, the effects of magnetic term on properties can be estimated from expectation values. The effects of the magnetic term on dipole moments of (2) Pi states of AH molecules are quite small.