a ceph-2-em or a ceph-3-em compound) reacting a compound of the formula ##STR16## G, A, B,R,R.sub.1 and the dotted line have theabove meanings and P is a hydrogen, chlorine, fluorine or bromine atom or a group --CH.sub.2 Y.sup.1, wherein Y.sup.1 is a replaceable residue of a necleophile) with a nucleophile whereafter if necessary and desired in each instance, any of the followingreactions (d) are