If the prosecuting attorney claims that any statement ordered to be produced under §§ 23A-13-6 to 23A-13-10, inclusive, contains matter which does not relate to the subject matter of the testimony of the witness, the court shall order the prosecuting attorney to deliver such statement for the inspection of the court in camera. Upon such delivery the court shall excise the portions of such statement which do not relate to the subject matter of the testimony of the witness. With such material excised, the court shall then direct delivery of such statement to the defendant for his use. If, pursuant to such procedure, any portion of such statement is withheld from the defendant and the defendant objects to such withholding, and the trial is continued to an adjudication of the guilt of the defendant, the entire text of such statement shall be preserved by the prosecuting attorney and, in the event the defendant appeals, shall be made available to the appellate court for the purpose of determining the correctness of the ruling of the trial judge. Whenever any statement is delivered to a defendant pursuant to this section, the court in its discretion, upon application of the defendant, may recess proceedings in the trial for such time as it may determine to be reasonably required for the examination of the statement by the defendant and his preparation for its use in the trial.
SDCL 23A-13-8