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

Email Problem

Former Member
0 Likes
242

Hi,

I am trying to send mail through FM SO_NEW_DOCUMENT_ATT_SEND_API1. But I don't want to send the attachements.

But the mail body text is also attached with the mail. Anybody will suggest me what I need to do for this??

1 REPLY 1
Read only

Former Member
0 Likes
222

data: maildata type sodocchgi1.

data: mailtxt type table of solisti1 with header line.

data: mailrec type table of somlrec90 with header line.

start-of-selection.

clear: maildata, mailtxt, mailrec.

refresh: mailtxt, mailrec.

maildata-obj_name = 'SAPRPT'.

maildata-obj_descr = 'Test'.

maildata-obj_langu = sy-langu.

maildata-sensitivty = 'F'.

mailtxt-line = 'This is a test for mail sending'.

append mailtxt.

mailrec-receiver = 'abc@xyz.com'.

mailrec-com_type = 'INT'.

mailrec-rec_type = 'U'.

append mailrec.

call function 'SO_NEW_DOCUMENT_SEND_API1'

exporting

document_data = maildata

document_type = 'RAW'

put_in_outbox = 'X'

tables

object_header = mailtxt

object_content = mailtxt

receivers = mailrec

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.

*

*

wait up to 2 seconds.

  • if gd_error eq 0.

submit rsconn01 with mode = 'INT'

with output = 'X'

and return.

  • endif.

regards

shiba dutta