Ab initio CI calculation of K shell absorption spectra in transition metal compounds