On an appeal from a judgment the Supreme Court may review any order, ruling, or determination of the trial court, involving the merits and necessarily affecting the judgment and appearing upon the record including an order denying a new trial, and whether any such order, ruling, or determination is made before or after judgment. When the appeal is from an order subject to appeal, the Supreme Court may review all matters appearing on the record relevant to the question of whether the order appealed from is erroneous.
SDCL 23A-32-9