10-09-2008 10:34 PM
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
10-09-2008 11:19 PM
Nimesh,
Sorry , it is not working. they are still going to SAP BOX.
.....
And one more problem is after output of the program when I press back button , I am getting pop up says
title as
'SAP office express info'
'Express document "Cannot be sent : Results of EDI " received from author "XXXXXX"'
is coming ....
HOW TO AVOID THIS POP UP ?
THAN Q.
Edited by: Sam Kumar on Oct 10, 2008 12:22 AM
10-09-2008 10:53 PM
In your call don't pass put_in_outbox = 'X'.
Don't pass the Transmission Medium in the Receiver
Like:
wa_receivers-receiver = 'mahesh.bagel at the rate cadi.com'.
wa_receivers-rec_type = 'U'.
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 = space " <<
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.
Regards,
Naimesh Patel
Edited by: Naimesh Patel on Oct 9, 2008 4:54 PM
10-09-2008 11:19 PM
Nimesh,
Sorry , it is not working. they are still going to SAP BOX.
.....
And one more problem is after output of the program when I press back button , I am getting pop up says
title as
'SAP office express info'
'Express document "Cannot be sent : Results of EDI " received from author "XXXXXX"'
is coming ....
HOW TO AVOID THIS POP UP ?
THAN Q.
Edited by: Sam Kumar on Oct 10, 2008 12:22 AM
10-10-2008 3:40 AM
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.
10-10-2008 2:59 AM
Hi,
Make the rec_type as 'C'... this will be for the internet mail id...
And then you can create a distribution list (SO23) and then create a dist. list for mass mailing...
regards,
Madan...
10-10-2008 4:36 PM
Iam sorry.
I am using external mail id xxxxx at ya hoo.com
because of which above error is populating .
I have removed xxxxx at ya hoo.com, now the error not