15-6-12(h). Waiver or preservation of certain defenses. (1) A defense of lack of jurisdiction over the person, insufficiency of process, or insufficiency of service of process is waived (A) if omitted from a motion in the circumstances described in § 15-6-12(g), or (B) if it is neither made by motion under § 15-6-12 nor included in a responsive pleading or an amendment thereof permitted by § 15-6-15(a) to be made as a matter of course.
(2) A defense of failure to state a claim upon which relief can be granted, a defense of failure to join a party indispensable under § 15-6-19, and an objection of failure to state a legal defense to a claim may be made in any pleading permitted or ordered under § 15-6-7(a), or by motion for judgment on the pleadings, or at the trial on the merits.
(3) Whenever it appears by suggestion of the parties or otherwise that the court lacks jurisdiction of the subject matter, the court shall dismiss the action.Source: SDC 1939 & Supp 1960, § 33.1002; SD RCP, Rule 12 (h), as adopted by Sup. Ct. Order March 29, 1966, effective July 1, 1966; as amended by Sup. Ct. Order No. 2, March 31, 1969, effective July 1, 1969.