1.Make sure you have Dangerous goods profile created from SPRO path -> SAP Transportation management -> Transportation management -> Basic functions -> Dangerous goods.
2. Assign this Dangerous goods profile to Freight unit type and Forwarding order type as well.
3. You should have incompatibilities created from Easy access -> Master data -> Application administration->Planning. This Incompatibility shall have Freight unit type assigned as a condition.
Please go through the below links.
Configuration of DG processing
Let me know if you stuck up somewhere or any specific question.
Thanks,
Bharath.