An Ising model with competing interaction is used to study the appearance of incommensurate phases in the basal plane of an hexagonal closed-packed structure. The calculated mean-field phase diagram reveals various 1q-incommensurate and lock-in phases. The results are applied to explain the basal-plane incommensurate phase in some compounds of the AABX_4 family, like K_2MoO_4, K_2WO_4, Rb_2WO4 and to describe the sequence of high-temperature phase transitions in other compounds of this family.