Hi Masoumeh,
SAP has provided a note for Unreleasing a productive Template. Be Extremely careful when using this.
888650 - Cancel release of an Appraisal Template in use
With this note, the Z Program needs to be created by copying the code provided in the Note.
Hope this helps.
Kumarpal