In this paper, we study the relation between periodicity of two-dimensional words and their abelian pattern complexity. A pattern P in Z n is the set of all translations of some finite subset F of Z n . An F -factor of an infinite word is a finite word restricted to F . Then the pattern complexity over a pattern P counts the number of distinct F -factors of an infinite word, for P ∈ P. Two finite words are called abelian equivalent if for each letter of the alphabet, they contain the same numbers of occurrences of this letter. The abelian pattern complexity counts the number of Ffactors up to abelian equivalence. As the main result of the paper, we characterize two-dimensional convex patterns with the following property: if abelian pattern complexity over a pattern P is equal to 1, then the word is fully periodic. Similar result holds for a function on Z 2 instead of a word and for constant sums instead of abelian complexity equal to 1. In dimensional 1, we characterize patterns for which there exist non-constant functions with constant sums.