  We propose a modification of the mechanism of charmed quarks fragmentation
into $D$ mesons in hadronic collisions. It is shown that the distinction in
valence quark distributions in the initial $\pi^{\pm}$ and $K^{\pm}$ mesons
leads to different inclusive spectra of $D$ and $D_s$ mesons produced in
$\pi^{\pm}$ and $K^{\pm}$ beams.
