A method in a radio network node for transmitting a reference signal over an antenna port, wherein the reference signal is transmitted in a code division multiplexing, CDM, group, the CDM group consisting of two CDM subgroups, each CDM subgroup being transmitted on a different subcarrier, each CDM subgroup comprising resource elements, wherein the method comprises the steps of: - transmitting the reference signal over a first CDM subgroup using an orthogonal cover code, the first CDM subgroup comprising resource elements in a first time slot and a subsequent time slot, and - transmitting (620, 920) the reference signal over a second CDM subgroup using a first permutation of the orthogonal cover code, the second CDM subgroup comprising resource elements in the first time slot and the second time slot, wherein the first permutation of the orthogonal cover code is selected in such a way as to enable decoding of the reference signal in the frequency domain, by applying the orthogonal cover code only to resource elements in the CDM group which are comprised in the first time slot, and the first CDM subgroup (510, 910) is repeated an equal number of times as the second CDM subgroup (520, 920) over two resource blocks, and wherein the method further comprises transmitting a second reference signal over a second antenna port in a second CDM group, the second CDM group consisting of two CDM subgroups, each CDM subgroup being transmitted on a different subcarrier, each CDM subgroup comprising one or more resource elements, and the steps of: - transmitting the second reference signal over a third CDM subgroup using a second permutation of the orthogonal cover code, the third CDM subgroup comprising resource elements in a first time slot and a subsequent time slot, and - transmitting the second reference signal over a fourth CDM subgroup using the orthogonal cover code, the fourth CDM subgroup comprising resource elements in the first time slot and the subsequent time slot, wherein the second permutation of the orthogonal cover code is selected in such a way as to enable decoding of the second reference signal in the frequency domain, by applying the orthogonal code only to resource elements in the second CDM group which are comprised in the first time slot, and wherein the first permutation comprises a reversal of order of the code elements of the orthogonal cover code, and the second permutation is the orthogonal cover code twice cyclically shifted, with a first pair of adjacent code elements of the orthogonal cover codes swapped in relative position with a second pair of adjacent code elements. - transmitting the reference signal over a first CDM subgroup using an orthogonal cover code, the first CDM subgroup comprising resource elements in a first time slot and a subsequent time slot, and - transmitting (620, 920) the reference signal over a second CDM subgroup using a first permutation of the orthogonal cover code, the second CDM subgroup comprising resource elements in the first time slot and the second time slot, - transmitting the second reference signal over a third CDM subgroup using a second permutation of the orthogonal cover code, the third CDM subgroup comprising resource elements in a first time slot and a subsequent time slot, and - transmitting the second reference signal over a fourth CDM subgroup using the orthogonal cover code, the fourth CDM subgroup comprising resource elements in the first time slot and the subsequent time slot,