An application to a court for an order shall be by motion. A motion other than one made during a trial or hearing shall be in writing unless the court permits it to be made orally. It shall state the grounds upon which it is made and shall set forth the relief or order sought. It may be supported by an affidavit.
SDCL 23A-44-1