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

Mail Thru SAP

Former Member
0 Likes
435

I have written a program to send mail thru SAP, whcih was working fine till date. Suddenly it started giving problem.

Body of the message is now going as an attachment which was working fine previously.

I am using following function.

concatenate 'Please find attached Vendor Age Report for BA - '

gt_vendor_mail-gsber ' .'

into p_it_message.

append p_it_message.

p_it_message = 'Message Body text, line 2...'.

append p_it_message.

call function 'SO_DOCUMENT_SEND_API1'

exporting

document_data = wa_w_doc_data

put_in_outbox = 'X'

sender_address = lv_sender_address

sender_address_type = lv_sender_address_type

commit_work = 'X'

importing

sent_to_all = lv_w_sent_all

tables

packing_list = lt_packing_list

contents_bin = lt_attachment

contents_txt = p_it_message

receivers = lt_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.

Please help.

Regards,

Sachin Raut

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
404

Hi,

Check your settings in TCODE SCOT

Double click on SMTP note . For "Internet" click on set, under "Output format for SAP documents" RAW Text musts be set as "TXT"

[Email attachment poblem|]

Regards

I have written a program to send mail thru SAP, whcih was working fine till date. Suddenly it started giving problem.

Body of the message is now going as an attachment which was working fine previously.

I am using following function.

concatenate 'Please find attached Vendor Age Report for BA - '

gt_vendor_mail-gsber ' .'

into p_it_message.

append p_it_message.

p_it_message = 'Message Body text, line 2...'.

append p_it_message.

call function 'SO_DOCUMENT_SEND_API1'

exporting

document_data = wa_w_doc_data

put_in_outbox = 'X'

sender_address = lv_sender_address

sender_address_type = lv_sender_address_type

commit_work = 'X'

importing

sent_to_all = lv_w_sent_all

tables

packing_list = lt_packing_list

contents_bin = lt_attachment

contents_txt = p_it_message

receivers = lt_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.

Please help.

Regards,

Sachin Raut

2 REPLIES 2
Read only

Former Member
0 Likes
404

Hi,

Check with Basis, whether they have changed any settings. Basis can handle such things. Check in the SDN for more information

Regards,

Aditya

Read only

Former Member
0 Likes
405

Hi,

Check your settings in TCODE SCOT

Double click on SMTP note . For "Internet" click on set, under "Output format for SAP documents" RAW Text musts be set as "TXT"

[Email attachment poblem|]

Regards