Problem in sending email text through BTE2040-pls help

Hello,
Does anyone know how to give an email body to the Payment Advice sent as an email through BTE 2040? We use the standard program RFFOAVIS_FPAYM. While debugging I figured out that the standard program just sends the payment advice as PDF attachment without the email body. Any suggestions please? its very urgent.
Thanks.

HI  SPauli     ,
If you want to add email with bodytext, you need to implement sap note1033893.
For SAP_APPL Release 4.6C and 4.7
For SAP_APPL Release 5.00 and higher
depend on which release you are working in, u need to implement as accordingly.
I try and it works.
let me know if u had more questions.

Similar Messages

  • Having problems in sending email..always saved in outbox and cannot send mail bcoz of the server failed

    Having problems in sending email..always saved in outbox and cannot send bcoz of server failed

    The email server you are using to send mail through requires the password, if any is required it needs to be set in the location that I pointed out in the earlier post.
    It is usually the same password you use for receiving emails.
    I don't use either Facebook or Twitter so I am not sure how to help with those.

  • Problem in Sending email from Reports Queue Manager

    Hi
    I am getting problem in sending email from reports queue manager.
    It says that error in logging to mail server.
    If any body knows the sol then pl help me out.
    thanks

    Hi
    I am getting problem in sending email from reports queue manager.
    It says that error in logging to mail server.
    If any body knows the sol then pl help me out.
    thanks

  • Got a Galaxy S 5 and people are still sending me texts through iMessage

    Someone stole my iPhone and I got a new phone, but switched to a galaxy S 5 and now my friends are still sending me texts through iMessage and I cannot receive them. Is there a way to deactivate iMessage without having the phone?

    And the very last entry says that if you cannot log out with your iCloud account that you need to contact Apple Support. Try calling them.
    If you don't have access to your iPhone, or if you can't deactivate iMessage from your iPhone, please contact Apple Support. Support for this issue is free.

  • I'm having problems receiving/sending emails thru Outlook.

    I switched internet connection from AT&T to Comcast and I'm still utilized several AT&T email address's for free. I'm having problems receiving/sending emails thru Outlook.  Could the problem be due to using their free emails with no support.
    Do I have to go thru yahoo to read/send emails?

    Change the ISP would not effect the email connection generally. (Only when ISP disable your mailbox which they could control directly.)
    I suppose that your Outlook still store/cache the AT&T messages, try to export them as PST data file for backup.
    Setup the new Yahoo in your current Outlook first and then import that backup.pst to continue to use.
    http://support.microsoft.com/kb/287070/en-us
    Thanks
    Tony Chen
    TechNet Community Support

  • Could not able to send email notification through approval workflow

    Hi,
    I am trying to send an email notification to the requester and approver on request creation and when the approver approves the request then an email should get triggered to the request with approve/reject outcome. All the SOA configuration has been done and also able to send test email through SOA console but could not able to send email through SOA composite.
    For configuring an email notification, I am using notification tab in ApprovalTask, but still problem is not resolved.
    Please help me in resolving the issue.
    Thanks.

    Use this link to check again whether you have configured the Email driver properties properly. http://www.iamidm.com/2012/09/oim-11g-r2-lab-6-managing-notifications.html
    Also check whether any firewall issue is there which is preventing OIM to contact the email server in sending out emails. Check the logs if there are any issues.
    Also check this system property 'RequestNotificationLevel'. This property indicates whether or not notification is sent to the requester and beneficiary when a request is created or the request status is changed. If the value is 0 for this system property, make it 1.
    I was facing a similar type of issue due to two reasons:
    1. System property
    2. Firewall
    Check both of them and try again.
    Edited by: Durgaprasad on Apr 15, 2013 2:08 AM

  • Problem in sending email ??

    Hi Guys
    we are facing a strange problem. We have a lot os programs which sends emails from SAP. Since this week the system is not sending any emails. Once the program is executed the program generates the emails which we can see in the SOST transaction. It is NOT in ERROR but still it is not sent to the inbox( internet).
    All the messages are staying in the queue with the message 711. When i check the long text of this message it says
    <i>Message transferred by node to communication system
    Message no. XS711
    Diagnosis
    The node has passed the message to its communication system.
    System Response
    Processing was ended normally.
    Additional information on the node used (in the system language of the node):
    Procedure
    No action is necessary. The message will shortly reach the recipient.
    </i>
    But we have waited for one complete day and the emails are still in the queue. Any idea what is missing. I also tried to select the unsent emails and Force send it but it still did not work. I then executed the RSCONNECT program to send all the emails still it did not work.
    Any idea????????
    ~Suresh

    Hi Suresh,
    As you are saying that the mail functionality was working fine last week and not working during this week that means there must be something changed. May be you have not applied support pack but basis may have changed system parameters, or check with the batch jobs if they are working fine.
    Regards,
    Atish

  • Problem in sending Email notification from BPEL

    Hi,
    i am trying to send email from BPEL using Email activity.Using SoaSuite10.1.3.3
    i configured the ns_emails.xml file properly as below.
    when i run the process, it is executing fine without any error.
    but i am not receiving any mail.
    even i applied patch set p6148874 also.
    below pasted is the ns_emails.xml file.
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>Oracle BPM</FromName>
    <FromAddress>[email protected]</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>domain.com</SMTPHost>
              <SMTPPort>25</SMTPPort>          
    </OutgoingServerSettings>
    <IncomingServerSettings>
    <Server>domain.com</Server>
    <Port>110</Port>
    <Protocol>pop3</Protocol>
    <UserName>ckommalapati</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">Chandu@1205</Password>
    <UseSSL>false</UseSSL>
    <Folder>Inbox</Folder>
    <PollingFrequency>1</PollingFrequency>
    <PostReadOperation>
    <MarkAsRead/>
    </PostReadOperation>
    </IncomingServerSettings>
    </EmailAccount>
    Even i tried adding <AuthenticationRequired> details to the above and its not working.
    i restarted the server after modifications.
    i tried pinging the SMTP server of my domain, and its connecting successfully.
    Could any one suggest me the solution for this problem.
    is there anything extra need to be configured for this..?
    Thanks in advance.

    Hi, ravigali :
    Following are some steps I take to set Email notification in BPEL:
    A important thing: get the right parameters of your Email server.
    Step:
    1. Alter ns_emails.xml (in D:\soft\SOASuite\product\10.1.3.1\OracleAS_1\bpel\system\services\config directory), an example is as following:
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="EMAIL">
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>*Your Name*</FromName>
    <FromAddress>*Your Email: ***@***.com*</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>*mail.***.com*</SMTPHost>
    <SMTPPort>25</SMTPPort>
    </OutgoingServerSettings>
    <IncomingServerSettings>
    <Server>*mail.***.com*</Server>
    <Port>993</Port>
    <Protocol>IMAP</Protocol>
    <UserName>***@***.com</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">***</Password>
    <UseSSL>true</UseSSL>
    <Folder>Inbox</Folder>
    <PollingFrequency>1</PollingFrequency>
    <PostReadOperation>
    <MarkAsRead/>
    </PostReadOperation>
    </IncomingServerSettings>
    </EmailAccount>
    </EmailAccounts>
    Note: the detail explain of every XML element is in http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28982/service_config.htm#sthref324 (2.2.1 Configuring the E-mail Server)
    2. Add the following property to wf_config.xml (in D:\soft\SOASuite\product\10.1.3.1\OracleAS_1\bpel\system\services\config directory):
    <property name="oracle.bpel.services.notification.publisher_interval" value="1" />
    Then the BPEL server will send notification every 1 minute. More detail about this configuration to see http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/notif.htm#sthref1678 (14.2.1 Reliable Notification Service).
    3. Re-start all SOA Suite services. (opmnctl startall)
    After the BPEL process invoke any E-mail notification activity and if we can’t receive any E-mail notification, we need to check the BPELNOTIFICATION table (ORABPEL database schema). And delete any error data in this table, then correct the E-mail notification setting through above steps and re-start all SOA Suite services.
    Thanks,
    Melody

  • Send Email Form10gIDS through outlook but no smtp / mail server available.

    how i can send email in oracle?
    but i have no smtp server.
    outlook configure with gmail/hotmail
    oracle can send through oulook
    because i will try directly gmail port 465 in gmail but not access

    Junaid.
    try this may it helps u.
    Go to Control Panel->Add or Remove Programs->Click on
    Add/Remove Wndows Components
    Check IIS check box.
    Select Internet Information Service (IIS) option and click on Details button
    Check whether SMTP Service is checked or not.
    If not selected then select SMTP check box.
    This process should be done on server.
    It will help out from ORA-29278: SMTP transient error: 421 Service not available problem.
    Furthermore, Oracle MetaLink documents also offers information regarding ORA-29278 in conjunction with "attempting to utilize UTL_SMTP on Microsoft Windows 2003 Server utilizing Oracle Database."
    It states that to aid in resolving ORA-29278, the document advises that the user, "Shutdown any applications that are blocking or preventing use of the port, 25, required by UTL_SMTP." because the cause of the error may be associated with other applications (like anti-virus utilities), "blocking access to the port required for UTL_SMTP."
    sarah

  • Having problem to send email with POP account ...

    Hi,
    I didn't have that problem before upgrading to my new 3GS iPHone. I have 3 email accounts on my iPhone: POP (videotron.ca), GMail and MobileMe. They all work fine except my POP account.
    From the POP account I can receive my email but I cannot send any. Funny enough, my emails are sent when the account is desactivated from my «Mail, contacts and Calendar» preferences on my iPhone.
    Can somebody help me ? Regards.
    Robert

    Hi Robert,
    I upgraded with the Iphone 3Gs a week ago and got the same problem with Videotron. The problem is with videotron as usual. If you want to be able to send email from your Iphone just go to Gmail, open an account FREE with them and then use this account to send Email...Work perfectly OK with me. Then of course you will have to phone videotron to make sure your account is fully available when you go on there Web site open the read email and be able to read your email if not solve the problem with them by phone. unless you will be able to send email easily with gmail and mather of fact it is free.
    Hope this will help from Quebec to Quebec!!!

  • Sending EMail "Text-File" from Application Server!

    Hi Experts,
    how can I sending a Text-File from Application Server via Email?
    Is there existing a Function Modul?
    With Kind regards
    Ersin
    Moderator message: sending emails = FAQ, please search before posting.
    Edited by: Thomas Zloch on Nov 25, 2010 4:23 PM

    STF (Search the forum)!  This type of question has been asked...and answered....many times.

  • Problem in sending email to other domain users

    Hi All,
    I am using javamail for sending emails and able to send to people within my exchange server domain. The problem is i am unable to send mail to other domain users like yahoo.com, hotmail.com..the error it is throwing out is *"Invalid Address"*
    Is there any spaecial API for this to work?
    Thanks,
    Kishore

    More details, please.
    Please read the JavaMail FAQ. Post the protocol trace if you can't figure it
    out yourself.

  • Problems with sending email about SO_OBJECT_SEND

    Hi,
    I have to send html emails from a ABAP Program and have found the module SO_OBJECT_SEND. When I fill in the data and call the function, I got the exception "OWNER_NOT_EXIST". In my userdetails, I have typed in my emailadress.
    My parameters, I use for the function call:
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    w_object_hd_change-file_ext = 'HTM'.
    receiver_list-recextnam = '[email protected]'.
    receiver_list-recesc = 'E'.
    receiver_list-sndart = 'INT'
    receiver_list-sndpri = '1'.
    I have one line in objcont, object_type = 'RAW' and owner = sy-uname.
    Does anybody knows the problem?
    Cheers Arne

    DATA: ds_object_hd_change   LIKE sood1.
    DATA  g_object_type         LIKE sood-objtp VALUE 'RAW'.
         clear it_asci.
          INSERT it_asci INDEX 1.
          it_asci-line    = 'Comment: '.
          it_asci-line+14 = g_comment.
          INSERT it_asci INDEX 1.
          it_asci-line    = 'Transaction: '.
          it_asci-line+14 = g_tcode.
          INSERT it_asci INDEX 1.
          ds_object_hd_change-acout = 'X'.
          CONCATENATE 'Employee AD & D Insurance'
                       sy-uname
                  INTO ds_object_hd_change-objdes
                  SEPARATED BY space.
          CONCATENATE g_user_id '@yahoo.com'
                 INTO it_recv-recextnam.
          it_recv-recesc = 'U'.
          it_recv-sndex = 'X'.
          it_recv-sndcp = 'X'.
          APPEND it_recv.
    Send email to security admin
          CALL FUNCTION 'SO_OBJECT_SEND'
               EXPORTING
          object_hd_change           = ds_object_hd_change
            object_type                = g_object_type
               TABLES
                    objcont                    = it_asci
                    receivers                  = it_recv
               EXCEPTIONS
                    active_user_not_exist      = 1
                    communication_failure      = 2
                    component_not_available    = 3
                    folder_not_exist           = 4
                    folder_no_authorization    = 5
                    forwarder_not_exist        = 6
                    note_not_exist             = 7
                    object_not_exist           = 8
                    object_not_sent            = 9
                    object_no_authorization    = 10
                    object_type_not_exist      = 11
                    operation_no_authorization = 12
                    owner_not_exist            = 13
                    parameter_error            = 14
                    substitute_not_active      = 15
                    substitute_not_defined     = 16
                    system_failure             = 17
                    too_much_receivers         = 18
                    user_not_exist             = 19
                    originator_not_exist       = 20
                    x_error                    = 21
                    OTHERS                     = 22.
          IF sy-subrc <> 0.
            WRITE: / 'Error:  Cannot sent email (code=', sy-subrc, ').'.
          ELSE.
            MESSAGE s002 WITH 'Message sent'.
          ENDIF.
    hope this will solve ur problem
    vijay

  • Problem in sending emails to someone who has thesame domain

    Hi Everybody,
    First of all this is my first post and it is really impressing me seeing this great community for BB users.
    Well, my colleagues in the company have some issue in sending internal emails "Same domain", we are not using BES, and we are on BIS.
    After investigations I found out that they don't store their emails on Exchange Server, so I thought it would be the problem so I enabled the Exchange to keep a copy of their emails in the server and still not working. Rather than that they are able to send emails to anybody except their colleagues in the company. In addition, I'm able to do so myself and I have no issues in sending internal emails!
    Really appreciate your help.
    Tarek

    More details, please.
    Please read the JavaMail FAQ. Post the protocol trace if you can't figure it
    out yourself.

  • Problem about sending email

    i am having internal table contains values.
    i want that output should be send as an email attachment
    to email id given in selection screen.
    but chinese can't diaplay rightly in attachment .
    the code is this:
    data: begin of TAB,
            X(1) type x value '09',
          end of tab,
          C(10)  type c.
    class cl_abap_char_utilities definition load.
    c+5(1) =  cl_abap_char_utilities=>horizontal_tab.
    *&      Form  SEND_EMAIL
          text
    -->  p1        text
    <--  p2        text
    FORM SEND_EMAIL.
    READ TABLE TA_YP043D INDEX 1.
    IF SY-SUBRC = 0 .
    Retrieve sample data from table ekpo
    PERFORM DATA_RETRIEVAL.
    Populate table with detaisl to be entered into .htm file
      PERFORM BUILD_XLS_DATA_TABLE.
    Populate message body text
      PERFORM POPULATE_EMAIL_MESSAGE_BODY.
    Send file by email attached as .htm file
      PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                     TABLES it_message
                                            it_attach
                                      USING p_email
                                            '&#26465;&#30721;&#31995;&#32479;&#20986;&#24211;&#26377;&#38382;&#39064;&#30340;&#26465;&#30721;'
                                            'HTML'
                                            'WC_Document'
                                   CHANGING gd_error
                                            gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    ENDIF.
    ENDFORM.                    " SEND_EMAIL
    *&      Form  BUILD_XLS_DATA_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_XLS_DATA_TABLE .
    CONCATENATE '<' 'HTML' '>' INTO it_attach .
    APPEND it_attach.
    CONCATENATE '<' 'HEAD' '>' INTO it_attach .
    APPEND it_attach.
    CONCATENATE
    '<meta http-equiv=Content-Type content=' '"' 'text/html; charset= GB2312
    ''"' '>' INTO it_attach.
    APPEND it_attach.
    CONCATENATE '<' '/HEAD' '>' INTO it_attach .
    APPEND it_attach.
    CONCATENATE '<P style=''font-size:12.0PT''><B> &#25209;&#27425;&#65306;' pa_zbat
    '</B></P>' INTO it_attach SEPARATED BY
    CL_ABAP_CHAR_UTILITIES=>horizontal_tab.
    APPEND it_attach.
    CONCATENATE '<P style=''font-size:12.0pt''><B> &#26085;&#26399;&#65306;' sy-datum
    '</B></P>' INTO it_attach SEPARATED BY
    CL_ABAP_CHAR_UTILITIES=>horizontal_tab.
    APPEND it_attach.
    CONCATENATE '<P style=''font-size:12.0pt''><B>' '&#30827;&#21270;&#26410;&#19978;&#20256;&#30340;&#26465;&#30721;&#26377;&#65306; '
    '</B></P>' INTO it_attach SEPARATED BY
    CL_ABAP_CHAR_UTILITIES=>horizontal_tab.
    APPEND it_attach.
    *CONCATENATE '<P style=''font-size:12.0pt''><B>' ' ' ' </B></P>' INTO
    *it_attach.
    *APPEND it_attach.
    LOOP AT TA_YP043D .
    *CONCATENATE  '< style=''font-size:12.0pt''><B> ' TAB-ZBARCD  '</B>'
    CONCATENATE  '<B> ' TA_YP043D-ZBARCD '   </B>' INTO
    it_attach .
    APPEND it_attach.
    ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_EMAIL_MESSAGE_BODY .
    DATA: TP_TEST0(255) TYPE C,
    TP_TEST3(255) TYPE C,
    TP_TEST(255) TYPE C.
    TP_TEST = '&#24403;&#36718;&#32974;&#36827;&#34892;X&#20809;&#26426;&#25968;&#25454;&#19978;&#20256;&#26102;,&#26377;&#20123;&#26465;&#30721;&#22312;&#30827;&#21270;&#38454;&#27573;&#19981;&#23384;&#22312;&#36164;&#26009;'.
    TP_TEST0 = '&#35831;&#24744;&#26597;&#30475;&#24182;&#23613;&#24555;&#35299;&#20915;.'.
    CONCATENATE TP_TEST TP_TEST0 INTO TP_TEST3 SEPARATED BY ' , '.
      APPEND '&#23562;&#25964;&#30340;&#20808;&#29983;/&#22899;&#22763;,' TO it_message.
      APPEND ' ' TO it_message.
      APPEND TP_TEST3 TO it_message.
      APPEND '&#20855;&#20307;&#38382;&#39064;&#35831;&#26597;&#30475;&#38468;&#20214;.' TO it_message.
      APPEND ' ' TO it_message.
      APPEND '&#35874;&#35874;.' TO it_message.
      APPEND ' ' TO it_message.
      APPEND '&#26469;&#33258;,' TO it_message.
      APPEND SY-UNAME TO it_message.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    *&      Form  D_FILE_AS_EMAIL_ATTACHMENT                            *
    *&      Send                                                 *
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES pit_message
                                              pit_attach
                                        USING p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     CHANGING p_error
                                              p_reciever.
      DATA:
        ld_error    TYPE sy-subrc,
        ld_reciever TYPE sy-subrc,
        ld_mtitle LIKE sodocchgi1-obj_descr,
        ld_email LIKE  somlreci1-receiver,
        ld_email2 LIKE  somlreci1-receiver,
        ld_format TYPE  so_obj_tp ,
        ld_attdescription TYPE  so_obj_nam ,
        ld_attfilename TYPE  so_obj_des ,
        ld_sender_address LIKE  soextreci1-receiver value
    '[email protected]',
        ld_sender_address_type LIKE  soextreci1-adr_typ,
        ld_receiver LIKE  sy-subrc.
        data: TMP_MAIL(40)  TYPE C.
    DATA: MAIN_EMAIL(40)  TYPE  C.
    DATA: TMP_POS TYPE I .
    DATA: ADD_EMAIL(40)  TYPE  C.
    DATA: L_POS TYPE I, R_POS TYPE I, MAIL_LEN TYPE I.
      ld_email               = p_email.
      ld_email2               = p_email2.
      ld_mtitle              = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_type   = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
    TP_MAIL_MAIN = PA_MAIL.
    TP_MAIL = PA_MAIL1.
    if sy-subrc = 0 .
      t_receivers-receiver   = TP_MAIL_MAIN.
      t_receivers-rec_type   = 'U'.
      t_receivers-com_type   = 'INT'.
      t_receivers-notif_del  = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
    ENDIF.
    *READ FROM TP_MAIL LIST
    TP_MAIL_TMP = TP_MAIL  .
    WHILE SY-SUBRC = 0 .
      SEARCH TP_MAIL_TMP FOR ', ' .
      MAIL_LEN = STRLEN( TP_MAIL_TMP ) .
      IF SY-SUBRC = 0 .
        TMP_POS = sy-fdpos .
        ADD_EMAIL = TP_MAIL_TMP+0(TMP_POS) .
        R_POS = TMP_POS + 2 .
        L_POS = MAIL_LEN - TMP_POS .
        TP_MAIL_TMP = TP_MAIL_TMP+R_POS(L_POS) .
      ELSE.
        ADD_EMAIL = TP_MAIL_TMP .
      ENDIF.
      t_receivers-receiver   = ADD_EMAIL.
      t_receivers-rec_type   = 'U'.
      t_receivers-com_type   = 'INT'.
      t_receivers-notif_del  = 'X'.
      t_receivers-notif_ndel = 'X'.
      t_receivers-COPY      = 'X' .
      APPEND t_receivers.
    ENDWHILE.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM                            *
    *&      Instructs mail send program for SAPCONNECT to send email       *
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    please help me its urgent.thank you.
    Message was edited by:
            shanjing du
    Message was edited by:
            shanjing du

    hi,
    chkout this code...
    1..intab to CSV
    tYPE-POOLS: truxs.
    TYPES:
    BEGIN OF ty_Line,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    END OF ty_Line.
    ty_Lines TYPE STANDARD TABLE of ty_Line WITH DEFAULT KEY.
    DATA: itab TYPE ty_Lines.
    DATA: itab1 TYPE truxs_t_text_data.
    SELECT
    vbeln
    posnr
    UP TO 10 ROWS
    FROM vbap
    INTO TABLE itab.
    CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
    EXPORTING
    i_field_seperator = ';'
    TABLES
    i_tab_sap_data = itab
    CHANGING
    i_tab_converted_data = itab1
    EXCEPTIONS
    conversion_failed = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = 'C:TEMP     est.txt'
    TABLES
    data_tab = itab1
    EXCEPTIONS
    OTHERS = 1.
    2) to send email
    *& Report ZEMAIL
    REPORT ZEMAIL.
    data: itcpo like itcpo,
    tab_lines like sy-tabix.
    Variables for EMAIL functionality
    data: maildata like sodocchgi1.
    data: mailpack like sopcklsti1 occurs 2 with header line.
    data: mailhead like solisti1 occurs 1 with header line.
    data: mailbin like solisti1 occurs 10 with header line.
    data: mailtxt like solisti1 occurs 10 with header line.
    data: mailrec like somlrec90 occurs 0 with header line.
    data: solisti1 like solisti1 occurs 0 with header line.
    perform send_form_via_email.
    FORM SEND_FORM_VIA_EMAIL *
    form send_form_via_email.
    clear: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
    refresh: mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
    maildata-obj_name = 'TEST'.
    Mail Subject
    maildata-obj_descr = 'Subject'.
    Mail Contents
    mailtxt-line = 'Here is your file'.
    append mailtxt.
    Prepare Packing List
    perform prepare_packing_list.
    Set recipient - email address here!!!
    mailrec-receiver = '[email protected]'.
    mailrec-rec_type = 'U'.
    append mailrec.
    Sending the document
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
    document_data = maildata
    put_in_outbox = ' '
    tables
    packing_list = mailpack
    object_header = mailhead
    contents_bin = mailbin
    contents_txt = mailtxt
    receivers = mailrec
    exceptions
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    others = 99.
    if sy-subrc = 0.
    submit rsconn01 with mode = 'INT' and return.
    endif.
    endform.
    Form PREPARE_PACKING_LIST
    form prepare_packing_list.
    clear: mailpack, mailbin, mailhead.
    refresh: mailpack, mailbin, mailhead.
    describe table mailtxt lines tab_lines.
    read table mailtxt index tab_lines.
    maildata-doc_size = ( tab_lines - 1 ) * 255 + strlen( mailtxt ).
    Creation of the entry for the compressed document
    clear mailpack-transf_bin.
    mailpack-head_start = 1.
    mailpack-head_num = 0.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'RAW'.
    append mailpack.
    mailhead = 'TEST.TXT'.
    append mailhead.
    File 1
    mailbin = 'This is file 1'.
    append mailbin.
    describe table mailbin lines tab_lines.
    mailpack-transf_bin = 'X'.
    mailpack-head_start = 1.
    mailpack-head_num = 1.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'TXT'.
    mailpack-obj_name = 'TEST1'.
    mailpack-obj_descr = 'Subject'.
    mailpack-doc_size = tab_lines * 255.
    append mailpack.
    *File 2
    mailbin = 'This is file 2'.
    append mailbin.
    data: start type i.
    data: end type i.
    start = tab_lines + 1.
    describe table mailbin lines end.
    mailpack-transf_bin = 'X'.
    mailpack-head_start = 1.
    mailpack-head_num = 1.
    mailpack-body_start = start.
    mailpack-body_num = end.
    mailpack-doc_type = 'TXT'.
    mailpack-obj_name = 'TEST2'.
    mailpack-obj_descr = 'Subject'.
    mailpack-doc_size = tab_lines * 255.
    append mailpack.
    With PDF Attachment:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'Z_TEST'
    IMPORTING
    fm_name = v_fname.
    CALL FUNCTION v_fname
    EXPORTING
    control_parameters = x_ctrl_p
    IMPORTING
    job_output_info = x_output_data.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 134
    IMPORTING
    bin_filesize = v_size
    TABLES
    otf = x_output_data-otfdata
    lines = it_lines
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    OTHERS = 4.
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
    line_width_dst = 255
    TABLES
    content_in = it_lines
    content_out = it_soli
    EXCEPTIONS
    err_line_width_src_too_long = 1
    err_line_width_dst_too_long = 2
    err_conv_failed = 3
    OTHERS = 4.
    CALL FUNCTION 'FUNC_CONVERT_DATA_ODC01'
    EXPORTING
    iv_byte_mode = 'X'
    TABLES
    it_data = it_lines
    et_data = it_table.
    *-----To caluculate total number of lines of internal table
    DESCRIBE TABLE it_table LINES v_lines.
    *-----Create Message Body and Title and Description
    it_mess = 'successfully converted smartform from otf format to pdf' .
    APPEND it_mess.
    wa_doc_data-obj_name = 'smartform'.
    wa_doc_data-expiry_dat = sy-datum + 10.
    wa_doc_data-obj_descr = 'smartform'.
    wa_doc_data-sensitivty = 'F'.
    wa_doc_data-doc_size = v_lines * 255.
    APPEND it_pcklist.
    *-----PDF Attachment
    it_pcklist-transf_bin = 'X'.
    it_pcklist-head_start = 1.
    it_pcklist-head_num = 0.
    it_pcklist-body_start = 1.
    it_pcklist-doc_size = v_lines_bin * 255 .
    it_pcklist-body_num = v_lines.
    it_pcklist-doc_type = 'PDF'.
    it_pcklist-obj_name = 'smartform'.
    it_pcklist-obj_descr = 'smart_desc'.
    it_pcklist-obj_langu = 'E'.
    it_pcklist-doc_size = v_lines * 255.
    APPEND it_pcklist.
    *-----Giving the receiver email-id
    CLEAR it_receivers.
    it_receivers-receiver = [email protected]'.
    it_receivers-rec_type = 'U'.
    APPEND it_receivers.
    *-----Calling the function module to sending email
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = wa_doc_data
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = it_pcklist
    contents_txt = it_mess
    contents_hex = it_table
    receivers = it_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.
    also chk these links..
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=sendingmailsfrominternaltable&adv=false&sortby=cm_rnd_rankvalue
    thanks
    jaideep
    *reward points if useful...

Maybe you are looking for