The structure of a straight interface (wall) between regions with differing values of the pitch in planar cholesteric layers with finite strength of the surface anchoring is investigated theoretically. It is found that the shape and strength of the anchoring potential influences essentially the structure of the wall and a motionless wall between thermodynamically stable regions without a singularity in the director distribution in the layer can exist for sufficiently weak anchoring only. More specifically, for the existence of such a wall the dimensionless parameter Sd = K22/Wd (where W is the depth of the anchoring potential, K22 is the elastic twist modulus and d is the layer thickness) should exceed its critical value, which is dependent on the shape of the anchoring potential. General equations describing the director distribution in the wall are presented. Detailed analysis of these equations is carried out for the case of infinitely strong anchoring at one surface and finite anchoring strength at the second layer surface. It is shown that the wall width L is directly dependent upon the shape and strength of the anchoring potential and that its estimate ranges from d to (dLp)1/2 (where Lp = K22/W is the penetration length), corresponding to different anchoring strengths and shape potentials. The dependence of the director distribution in the wall upon all three Frank elastic moduli is analytically found for some specific limiting cases of the model anchoring potentials. Motion of the wall is briefly investigated and the corresponding calculations performed under the assumption that the shape of a moving wall is the same as a motionless one. It is noted that experimental investigation of the walls in planar cholesteric layers can be used for the determination of the actual shape of surface anchoring potentials.