We present the extraction of heavy mesons fragmentation functions using a phenomenological approach. For the first time, we calculate non-perturbative fragmentation functions for B and D mesons at NNLO in the so-called zero-mass variable-flavour-number scheme in QCD.
We will also incorporate the effect of charmed-meson mass corrections and determine D-meson fragmentation functions by fitting LEP and SLD data. We present NNLO single-inclusive production cross sections in electron-positron annihilation and estimate the uncertainties by means of the Hessian approach. The comparison with other calculations is discussed as well.