Use FM MD_CONVERT_MATERIAL_UNIT
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = lv_matnr
i_in_me = 'PCE'
i_out_me = 'PAL'
i_menge = lv_qte
IMPORTING
e_menge = lv_nbpal
EXCEPTIONS
error_in_application = 1
OTHERS = 2.