Dimensional analysis suggests that the dissipation length scale (l(c) = u(star)(3)/is an element of) is the appropriate scale for the shear-production range of the second-order streamwise structure function in neutrally stratified turbulent shear flows near solid boundaries, including smooth-and rough-wall boundary layers and shear layers above canopies (e.g. crops, forests and cities). These flows have two major characteristics in common: (i) a single velocity scale, i.e. the friction velocity (u(star)) and (ii) the presence of large eddies that scale with an external length scale much larger than the local integral length scale. No assumptions are made about the local integral scale, which is shown to be proportional to l(is an element of) for the scaling analysis to be consistent with Kolmogorov's result for the inertial subrange. Here is an element of is the rate of dissipation of turbulent kinetic energy (TKE) that represents the rate of energy cascade in the inertial subrange. The scaling yields a log-law dependence of the second-order streamwise structure function on (r/l(is an element of)), where r is the streamwise spatial separation. This scaling law is confirmed by large-eddy simulation (LES) results in the roughness sublayer above a model canopy, where the imbalance between local production and dissipation of TKE is much greater than in the inertial layer of wall turbulence and the local integral scale is affected by two external length scales. Parameters estimated for the log-law dependence on (r/l(is an element of)) are in reasonable agreement with those reported for the inertial layer of wall turbulence. This leads to two important conclusions. Firstly, the validity of the l(is an element of)-scaling is extended to shear flows with a much greater imbalance between production and dissipation, indicating possible universality of the shear-production range in flows near solid boundaries. Secondly, from a modelling perspective, l(is an element of) is the appropriate scale to characterize turbulence in shear flows with multiple externally imposed length scales.