2009 Feb 24 12:31 PM
Hi all,
I am sending the PO smartform to mail as PDF attachment .
Attachment was happening correct. but problem is Attachment ICON was not showing as PDF ICON. When Double click on attachment to open , it is asking with OPEN WITH POPUP.in that I am choosing Acorobat reader.
but i need when i double click attachment , it shoube open in directly in PDF.
please help in this.
regards,
Rama
Edited by: ram reddy on Feb 24, 2009 1:47 PM
Hi all,
I am sending the PO smartform to mail as PDF attachment .
Attachment was happening correct. but problem is Attachment ICON was not showing as PDF ICON. When Double click on attachment to open , it is asking with OPEN WITH POPUP.in that I am choosing Acorobat reader.
but i need when i double click attachment , it shoube open in directly in PDF.
please help in this.
regards,
Rama
Edited by: ram reddy on Feb 24, 2009 1:47 PM
2009 Feb 24 12:49 PM
Just check if everything is fine or not.
TYPES : BEGIN OF ty_errorlog,
field(255) TYPE c,
END OF ty_errorlog.
DATA: lwa_objpack TYPE sopcklsti1, "Contents of the Email
lt_objpack TYPE STANDARD TABLE OF sopcklsti1,
lwa_reclist TYPE somlreci1, "Recievers List
lt_reclist TYPE STANDARD TABLE OF somlreci1,
lwa_errorlog TYPE ty_errorlog,
lwa_doc_chng TYPE sodocchgi1, "Mail Contents
lt_errorlog TYPE STANDARD TABLE OF ty_errorlog.
CONSTANTS :lc_1(15) TYPE n VALUE '1', "Email Params
lc_2(15) TYPE n VALUE '2', "Email Params
lc_raw(3) TYPE c VALUE 'RAW', "Email Params
lc_u TYPE c VALUE 'U', "Recipient Property
lc_01 TYPE c VALUE '1',
lc_docsize TYPE so_doc_siz VALUE '510',
lc_x TYPE c VALUE 'X'.
Pack to main body
lwa_objpack-body_start = lc_1.
lwa_objpack-head_start = lc_1.
lwa_objpack-body_num = lc_2.
lwa_objpack-doc_type = lc_raw.
APPEND lwa_objpack TO lt_objpack.
Fill receiver list
lwa_reclist-receiver = p_mail.
lwa_reclist-rec_type = lc_u.
APPEND lwa_reclist TO lt_reclist.
Filling Mail Contents
lwa_doc_chng-obj_descr = p_subject.
lwa_doc_chng-obj_prio = lc_01.
lwa_doc_chng-doc_size = lc_docsize.
lwa_errorlog-field = p_msg.
APPEND lwa_errorlog TO lt_errorlog.
Calling FM to Send Email
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_errorlog
receivers = lt_reclist
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.
MESSAGE e011(z_com_msg).
ENDIF.
Edited by: Phanindra Annaparthi on Feb 24, 2009 1:49 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |