MM01
field RMQAM-AKTIV
I know it can be set active when creating the materials with a BAPI, e.g. in data migrations.
But for online maintenance I only know BADI_MATERIAL_REF to default values, and I cant really see anything abut QM in there (but my ABAP knowledge is just surface)