on 09-16-2009 11:47 PM
Hi,
I am able to convert smartform with images in to HTML format and able to send as e-mail using the program similar to SF_XSF_DEMO_MAIL.
As soon as the user receives e-mail, he should able to click on images and should redirect to other webpage. (Image should work like hyper link).
Can you please suggest how to work on this issue ?
Thank you very much.
Regards
Badari
Using smart form we can not send image as hyper link. This functionality is not available using smartform.
Instead of using smart form written the HTML Code and used the following function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' and works fine for me.
wa_objtxt-line ='</body>'.
APPEND wa_objtxt TO t_objtxt.
wa_objtxt-line = '</html>'.
APPEND wa_objtxt TO t_objtxt.
HTML close
wa_objtxt-line = '</body> </html> '.
APPEND wa_objtxt TO t_objtxt.
Document data
DESCRIBE TABLE t_objtxt LINES w_tab_lines.
READ TABLE t_objtxt INTO wa_objtxt INDEX w_tab_lines.
wa_docdata-doc_size =
( w_tab_lines - 1 ) * 255 + STRLEN( wa_objtxt ).
Packing data
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = 1.
wa_objpack-head_num = 0.
wa_objpack-body_start = 1.
wa_objpack-body_num = w_tab_lines.
we will pass the HTML, since we have created the message
body in the HTML
wa_objpack-doc_type = 'HTML'.
APPEND wa_objpack TO t_objpack.
*ENDFORM. " CREATE_TITLE_DESC_BODY
&----
*& Form fill_receivers
&----
Filling up the Receivers
----
*FORM fill_receivers .
wa_reclist-receiver = I_email. "p_email.
wa_reclist-rec_type = 'U'.
APPEND wa_reclist TO t_reclist.
CLEAR wa_reclist.
*ENDFORM. " fill_receivers
&----
*& Form send_message
&----
Sending Mail
----
*FORM send_message .
Send Message to external Internet ID
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel.6.10
TABLES
packing_list = t_objpack
object_header = t_objhead
contents_txt = t_objtxt
receivers = t_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 NE 0.
E_STATUS = 'Sending Failed'.
ELSE.
E_STATUS = 'Sending Successful'.
ENDIF.
Edited by: Badari Narayana1 on Oct 6, 2009 10:09 PM
Edited by: Badari Narayana1 on Oct 6, 2009 10:09 PM
Edited by: Badari Narayana1 on Oct 6, 2009 10:10 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.