‎2007 Jun 12 12:37 PM
Hi All,
I am using this FM to send the PDF file attached as an email. The issue is the mail is stopped in SAP Outbox and it is not reaching the recipient. Do I need to take care anything else. Also How can I populate group of users to this FM.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = gt_objpack
object_header = wa_objhead
contents_bin = gt_objbin
contents_txt = gt_objtxt
receivers = gt_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.
Thanks & Regards,
Shankar
‎2007 Jun 12 12:46 PM
Hi
u have to configure SCOT(tcode)--->SMTP address node , here u have to give mail ID (e.g outlook ) server address.
If you have this setting done then you can send mail properly..
Also generally group of intended receipients are set in "Select Options" or "ranges"
Mark if helpful
Regards
Tushar Mundlik
‎2007 Jun 12 12:42 PM
Hi Shankar,
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
here please remove this 'X' in ur program.
This will help u .
Regards,
Sree.
PS: Reward points if Useful.
‎2007 Jun 12 12:44 PM
Hi Sreekanth,
Thanks for the reply. I tried with it but it did not work.
Regards,
Shankar
‎2007 Jun 12 12:46 PM
Hi
u have to configure SCOT(tcode)--->SMTP address node , here u have to give mail ID (e.g outlook ) server address.
If you have this setting done then you can send mail properly..
Also generally group of intended receipients are set in "Select Options" or "ranges"
Mark if helpful
Regards
Tushar Mundlik
‎2007 Jun 12 12:52 PM
Hi Tushar,
Thanks for the reply. I have checked the SCOT settings & It is assigned with the Outlook address. I dont see any issue there. Please let me know If I am wrong anywhere.
Regards,
Shankar
‎2007 Jun 12 12:51 PM
Hi ,
Convert the data to PDF using 'SX_OBJECT_CONVERT_OTF_PDF'.
and use
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = packing_list
object_header = objhead
contents_txt = objcont
contents_hex = t_content_hex
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
Regards,
Savitha
‎2007 Jun 12 1:10 PM
‎2007 Jun 12 1:26 PM
‎2007 Jun 13 4:54 PM
Shankar,
Could you please let us know how u solved it. I think I'm facing the same problem.
Ramesh
‎2007 Jun 13 5:05 PM
Hi ramesh,
Please see the FM below which solves.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
commit_work = 'X'
TABLES
packing_list = gt_objpack
object_header = wa_objhead
contents_bin = gt_objbin
contents_txt = gt_objtxt
receivers = gt_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.
ENDIF.