Hi,
If raw material is not consumed then you can return it to the department from where you get it.
The raw material is replaced physically and you can utilize the new/replaced raw material. One thing I need to mention that as a production department person we will not accept the poor quality raw material but sometime we are not authorized to reject it. The rejection either done at the time of procurement or later on by the quality department and then MM will send it back to the vendor.
If you don't want to replace/consume the poor quality raw material then simply reverse the GI entry for raw material.
Regards,
Narresh