09-19-2014 1:02 PM
Hi Experts.
I have crated one report program which will send an email to the person whose id is mentioned. Now Before sending the email the sender wants to see the preview of email.
I am using the below FM to send Email.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = lwa_mail_header
DOCUMENT_TYPE = 'HTM'
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
OBJECT_CONTENT = lt_mail_content
RECEIVERS = lt_mail_receivers
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
Is there any way to see the preview of email before sending email?
Thanks,
Pradeep.
09-19-2014 1:27 PM
As your mail body is an html, you could create a small preview with class cl_gui_html_viewer
(Many threads and SAP demo program like SAPHTML_EVENTS_DEMO, etc.)
NB: Also this is an old FM, did you try class CL_BCS to manage your mails...
Regards,
Raymond
09-19-2014 1:13 PM
09-19-2014 1:14 PM
I know these are not what you are looking for, but here are some other options:
Then you could popup a window with a link to the appropriate place with a Continue Yes or No buttons.
Neal
09-19-2014 1:27 PM
As your mail body is an html, you could create a small preview with class cl_gui_html_viewer
(Many threads and SAP demo program like SAPHTML_EVENTS_DEMO, etc.)
NB: Also this is an old FM, did you try class CL_BCS to manage your mails...
Regards,
Raymond
09-19-2014 6:29 PM