  Complete complementary codes (CCCs) play a vital role not only in wireless
communication, particularly in multicarrier systems where achieving an
interference-free environment is of paramount importance, but also in the
construction of other codes that necessitate appropriate functions to meet the
diverse demands within today's landscape of wireless communication evaluation.
This research is focused on the area of constructing $q$-ary functions for both
of {traditional and spectrally null constraint (SNC) CCCs}\footnote{When no
codes in CCCs having zero components, we call it as traditonal CCCs, else, we
call it as SNC-CCCs in this pape.} of flexible length, set size and alphabet.
We construct traditional CCCs with lengths, defined as $L = \prod_{i=1}^k
p_i^{m_i}$, set sizes, defined as $K = \prod_{i=1}^k p_i^{n_i+1}$, and an
alphabet size of $q=\prod_{i=1}^k p_i$, such that $p_1<p_2<\cdots<p_k $. The
parameters $m_1, m_2, \ldots, m_k$ (each greater than or equal to $2$) are
positive integers, while $n_1, n_2, \ldots, n_k$ are non-negative integers
satisfying $n_i \leq m_i-1$, and the variable $k$ represents a positive
integer. To achieve these specific parameters, we define $q$-ary functions over
a domain $\mathbf{Z}_{p_1}^{m_1}\times \cdots \times \mathbf{Z}_{p_k}^{m_k}$
that is considered a proper subset of $\mathbb{Z}_{q}^m$ and encompasses
$\prod_{i=1}^k p_i^{m_i}$ vectors, where
$\mathbf{Z}_{p_i}^{m_i}=\{0,1,\hdots,p_i-1\}^{m_i}$, and the value of $m$ is
derived from the sum of $m_1, m_2, \ldots, m_k$. This organization of the
domain allows us to encompass all conceivable integer-valued length sequences
over the alphabet $\mathbb{Z}_q$. It has been demonstrated that by constraining
a $q$-ary function that generates traditional CCCs, we can derive SNC-CCCs with
identical length and alphabet, yet a smaller or equal set size compared to the
traditional CCCs.
