Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

'SO_NEW_DOCUMENT_ATT_SEND_API1'

Former Member
0 Likes
1,993

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,014

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,014

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.

Read only

0 Likes
1,014

Hi Sreekanth,

Thanks for the reply. I tried with it but it did not work.

Regards,

Shankar

Read only

Former Member
0 Likes
1,015

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

Read only

0 Likes
1,014

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

Read only

Former Member
0 Likes
1,014

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

Read only

Former Member
0 Likes
1,014

hi,

<b>Check these link for sample coding.</b>

http://www.sap-img.com/fu016.htm

regards,

Ashokreddy.

Read only

Former Member
0 Likes
1,014

Solved.

Regards,

Shankar

Read only

0 Likes
1,014

Shankar,

Could you please let us know how u solved it. I think I'm facing the same problem.

Ramesh

Read only

0 Likes
1,014

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.