Towards a NNLO calculation in hadronic heavy hadron production