on 01-22-2007 5:23 AM
Hi Experts,
i have a requirement, in smart forms, we did the form to be sent to the email as pdf. we want to add some text in the body of the emil message. can we do this?
Hi,
I need to add A WebLink in the body of the mail.
Any help will be great.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for the replay,
i am using the structure SSFCOMPOP (SAP Smart Forms: Smart Composer (transfer) options) to send the email to the recpient. this structure has a field called TDTITLE to set the title in the Email if i set the output device TDDEST as 'EM-R' or EMAIL-REPORT. The qestion is 'Can I add some text in the body of the email that will be sent?'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for the replay,
i want to add some fixed text in the email (the body not the subject of the email)
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the following is the code for send the mail with both subject and body .plz go thru. hope it will be helpful.
************************************************
Creating the document to be sent with success message.
IF gt_error IS INITIAL.
gs_doc_chng-obj_name = 'Standard Price'(010).
gs_doc_chng-obj_descr = 'Material Standard Price update Successful'(011)
.
gs_objtxt = 'Materials updated Sucessfully with new Standard Price'(012)
.
APPEND gs_objtxt TO gt_objtxt.
LOOP AT gt_success INTO gs_success.
gs_objtxt = gs_success.
APPEND gs_objtxt TO gt_objtxt.
ENDLOOP.
ELSE.
Creating the document to be sent with error message.
gs_doc_chng-obj_name = 'Error Price'(002).
gs_doc_chng-obj_descr = 'Material Standard Price Updation Errors'(003)
.
gs_objtxt = 'The following Material Numbers failed to update'(004).
APPEND gs_objtxt TO gt_objtxt.
LOOP AT gt_error INTO gs_error.
gs_objtxt = gs_error.
APPEND gs_objtxt TO gt_objtxt.
ENDLOOP.
IF gt_success IS NOT INITIAL.
gs_objtxt = 'Materials updated Sucessfully with New Standard Price'(012)
.
APPEND gs_objtxt TO gt_objtxt.
LOOP AT gt_success INTO gs_success.
gs_objtxt = gs_success.
APPEND gs_objtxt TO gt_objtxt.
ENDLOOP.
ENDIF.
ENDIF.
DESCRIBE TABLE gt_objtxt LINES gv_tab_lines.
READ TABLE gt_objtxt INTO gs_objtxt INDEX gv_tab_lines.
gs_doc_chng-doc_size = ( gv_tab_lines - 1 ) * 255 + STRLEN( gs_objtxt )
.
Creating the entry for the compressed document
CLEAR gs_objpack-transf_bin.
gs_objpack-head_start = 1.
gs_objpack-head_num = 0.
gs_objpack-body_start = 1.
gs_objpack-body_num = gv_tab_lines.
gs_objpack-doc_type = 'RAW'.
APPEND gs_objpack TO gt_objpack.
Entering names in the distribution list
IF p_plist IS NOT INITIAL.
gs_reclist-receiver = p_plist.
gs_reclist-rec_type = gc_c.
APPEND gs_reclist TO gt_reclist.
CLEAR gs_reclist.
ENDIF.
Populating the reciever list
gs_reclist-receiver = p_plist.
gs_reclist-rec_type = gc_u.
APPEND gs_reclist TO gt_reclist.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gs_doc_chng
put_in_outbox = gc_x
commit_work = gc_x
TABLES
packing_list = gt_objpack
object_header = gt_objhead
contents_bin = gt_objbin
contents_txt = gt_objtxt
receivers = gt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
CASE sy-subrc.
WHEN 0.
WRITE: 'eMail sent successfully'(005).
WHEN OTHERS.
WRITE: / 'eMail could not be sent'(008).
ENDCASE.
ENDFORM. " send_log_mail
tel me the correct requirement do u want to add the data in the form r email
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.