Skip to Content
author's profile photo Former Member
Former Member

Mail from abap - issue

Hi ,

To send external mails from r/3 we have the std FM SO_NEW_DOCUMENT_SEND_API1. We are presently using this FM to send external mails ,The only issue being that sent mails can me read from tcode SOST if the user has the required authorization.

Is there any way to send external mails from r/3 directly which cannot be read in r/3 or encrypted when seen from r/3?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:23 AM

    You can set job for SOST transaction to send mail automaticly

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks for replying .. we have a job in place which picks up mails from sost and sends it .. we want to avoid anyone readingthe mail ... in the time duration before the scheduled job kicks off.#

      i.e from the time the mail sits in sost to the time the job picks it up.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:55 AM

    Try this program..

    Change the mail id in it..



    data reciever type table of ADR6-SMTP_ADDR.

    data subject type SO_OBJ_DES.

    data text type bcsy_text.

    data line type soli-line.

    data send_request type ref to cl_bcs.

    data document type ref to cl_document_bcs.

    data recipient type ref to if_recipient_bcs.

    data bcs_exception type ref to cx_bcs.

    data sent_to_all type os_boolean.

    data adresse type ADR6-SMTP_ADDR.

    data mailflag(1) value space.

    data dat(10).

    data time(10).

    data tfree(12).

    write sy-datum to dat.

    write sy-uzeit to time.


    subject = 'This is my Subject '.

    line = ' I am the body of the message '.

    append line to text.

    *Mail Send Mail out to external Mail Server .


    *create the send request

    send_request = cl_bcs=>create_persistent( ).

    document = cl_document_bcs=>create_document(

    i_type = 'RAW'

    i_text = text

    i_subject = 'Hi this is my subject' ).

    *add document to send request

    send_request->set_document( document ).

    *create recipient and add to send request

    adresse = ''.

    recipient = cl_cam_address_bcs=>create_internet_address(

    adresse ).

    send_request->add_recipient( i_recipient = recipient ).

    *send mail now

    sent_to_all = send_request->send( i_with_error_screen = 'X' ).

    if sent_to_all = 'X'.

    Message s022(so).


    catch cx_bcs into bcs_exception.

    message e865(so) with bcs_exception->error_type.


    *Close Transaction.

    commit work.

    *End of the Code.

    *End of the Code.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.