A motion made before a trial shall be determined before the trial unless the court, for good cause, orders that it be deferred for determination at the trial of the general issue or until after the verdict, but no such determination shall be deferred if a party's right to appeal is adversely affected. Where factual issues are involved in determining a motion, the court shall state its essential findings on the record.
SDCL 23A-8-8