11-01-2008 6:16 AM
hi experts,
i have worked on sending mail in pdf format.but now i have to make my basic knowlege clear on this.so can just send me step by step procedure to send mail as compressed pdf attachment????
cause i am not able to understand y spool is creted????
and what are the ways of sending mail as pdf attachment??
<removed_by_moderator>
pls reply back
Edited by: Julius Bussche on Nov 1, 2008 7:28 AM
11-01-2008 6:35 AM
Hi,
I hope the following links will help you,
https://forums.sdn.sap.com/click.jspa?searchID=15761020&messageID=1095698
Regards,
Harish
11-01-2008 6:29 AM
use this standard report rstxpdft4 to convert ur output to pdf by passsing ur spool no to it ...
get spool no from table TSP01..
and this f.m 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send
CONCATENATE 'Order' 'Acknowlegment' 'Notice' INTO v_string SEPARATED BY space.
x_document_data-obj_descr = v_string.
x_document_data-obj_langu = sy-langu .
x_document_data-sensitivty = 'F'.
x_document_data-doc_size = v_tot_lines * 255.
*
refresh it_packing_list[].
it_packing_list-transf_bin = ' '.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
it_packing_list-body_num = v_tot_lines.
it_packing_list-doc_type = 'RAW'.
APPEND it_packing_list.
*
**PDF Attachment
DESCRIBE TABLE it_contents_bin[] LINES v_lineno.
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
it_packing_list-doc_size = v_lineno * 255 .
it_packing_list-body_num = v_lineno.
it_packing_list-doc_type = 'PDF'.
it_packing_list-obj_name = 'SO Ack'.
it_packing_list-obj_descr = 'Order Acknowledgment Notice'.
it_packing_list-obj_langu = 'E'.
APPEND it_packing_list.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = x_document_data
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = it_packing_list
CONTENTS_BIN = it_contents_bin
CONTENTS_TXT = it_contents_txt
RECEIVERS = it_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 .
*
IF SY-SUBRC <> 0.
retcode = sy-subrc.
perform protocol_update.
else .
*
*
ENDIF.
11-01-2008 6:35 AM
Hi,
I hope the following links will help you,
https://forums.sdn.sap.com/click.jspa?searchID=15761020&messageID=1095698
Regards,
Harish