Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

mail sending - how to restrict from SAP inbox,

I am passing my internal table gt_message in the below FM code .

It is working fine.

1). HOWEVER I AM GETTING MAIL TO MY SAP INBOX.

*My functional consultant don't want this.*

How can I send only to mail id with out saving SAP mail.

2).

I am not able to send mails to other mails ids other than our outlook. We need to send mail to our customer.
How to do this . Please help / or just below coding is sufficient to send mail to external mailis like our customers ?

FORM send_email_message.

wa_doc_data-doc_size = 1.

wa_doc_data-obj_langu = sy-langu.

wa_doc_data-obj_name = 'SAPRPT'.

wa_doc_data-obj_descr = text-017. " 'Results of EDI 869 and 870'. " psubject.

wa_doc_data-sensitivty = 'F'.

CLEAR wa_packing_list.

REFRESH gt_packing_list.

wa_packing_list-transf_bin = space.

wa_packing_list-head_start = 1.

wa_packing_list-head_num = 0.

wa_packing_list-body_start = 1.

DESCRIBE TABLE gt_message LINES wa_packing_list-body_num.

wa_packing_list-doc_type = 'RAW'.

APPEND wa_packing_list TO gt_packing_list.

wa_receivers-receiver = 'mahesh.bagel at the rate cadi.com'.

wa_receivers-rec_type = 'U'.

wa_receivers-express = ' '.

wa_receivers-com_type = 'INT'.

wa_receivers-notif_del = 'X'.

wa_receivers-notif_ndel = 'X'.

APPEND wa_receivers TO gt_receivers.

CLEAR wa_receivers.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = wa_doc_data

put_in_outbox = 'X'

IMPORTING

sent_to_all = v_sent_all

TABLES

packing_list = gt_packing_list

contents_txt = gt_message

receivers = gt_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 EQ 0.

COMMIT WORK.

ENDIF.

v_error = sy-subrc.

LOOP AT gt_receivers INTO wa_receivers.

ENDLOOP.

ENDFORM. " SEND_EMAIL_MESSAGE

Edited by: Sam Kumar on Oct 9, 2008 9:40 PM

Tags:
Former Member replied
wa_receivers-rec_type = 'U'.
wa_receivers-express = ' '.   "here you are not specifying any thing 
wa_receivers-com_type = 'INT'.

even if you don't specify that option why are you getting the express option. are you using the same which you pasted above.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question