As Biju k said, you must test the same scenario in you system.
In standard, we can change the valuation class if any valid PO is not available in system.
Find the all open PO from ME2* report.
Then set deletion flag for all line item which id belong to this material, then change the valuation class for material. Then remove the deletion flag from all PO, then you can continue the further process for this material.
Note : No need to do anything for PR, you can well change the valuation class if any PR exist for material.
The above scenario is standard process.
But if you test the same in your system, you can understand it properly.