Application Development 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: 

To send email out of SAP

Former Member
0 Kudos

Hi Experts,

I have used following code to send email out of SAP.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = lwa_docdata

document_type = lc_pdf

put_in_outbox = 'X'

commit_work = 'X'

TABLES

object_content = li_content

receivers = li_receiver

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.

SUBMIT rsconn01 WITH mode = 'INT'

WITH output = 'X'

AND return.

ENDIF.

The problem is when i use submit rsconn01.All the send request which are in queue will be sent and i am getting all those mail details in my inbox of SBWP. I want to get only details of mail which i sent.

If i do not use submit rsconno1,the send status in sbwp will be 'waiting'.so i have to use submit rsconno1.

Please help me on this

Regards,

Umesh J D

Moderator Message: Questions related to Sending Mails have been extensively discussed in these forums. Please search for relevant information.

Edited by: kishan P on May 19, 2011 12:08 PM

4 REPLIES 4

Former Member
0 Kudos

Hi,

For sending external mail ,try the new concept based on OOPS..

Go through the below link.

<<linkfarm removed by moderator>>

If u want any help on this plz let me know.

Regards

theres

Edited by: kishan P on May 19, 2011 12:09 PM

praveen_reddy2
Active Participant
0 Kudos

Hello,

If u uncomment the parameter in SO_NEW_DOCUMENT_ATT_SEND_API1

PUT_IN_OUTBOX = 'X'..

Then U will not receive the mail in SBWP..

former_member184578
Active Contributor
0 Kudos

Hi.,

You will not get mails into inbox if you use SUBMIT rsconn01 WITH mode = 'INT' ., you will get mails only if there are errors.

just use SUBMIT rsconn01 WITH mode = 'INT' .

hope this helps u.,

Thanks & Regards

Kiran

Former Member
0 Kudos

HI,

PUT_IN_OUTBOX = X will place the mail sent to external system in your SAP Outbox. So here you can have a reference of the mails you sent.

Passing OUTPUT = ' X' in the SUBMIT statement will place error details to your SAP Inbox. If you don't require this, then pass OUTPUT = ' '.

Regards,

Satish Kanteti