wrong material cost on receipt impacting production and inventory cost

we received material into sage a wrong cost per unit and now all products or components in our BOM when produced reflect the wrong costs impacting COGS and Inventory on the financials.  How can I correct this prior receipt of materials and possibly rerun transactions which have been impacted (namely Production Entry)?