Use this method to close down the mail merge function.
CALL METHOD mail_merge->shutdown EXPORTING no_flush = no_flush IMPORTING error = error retcode = retcode.