E-mail body getting converted to .txt attachment

Hello All,
Below is the description of the issue: -
1) Smartform is sent as .pdf attachment in the mail along with some text in the email body, using the FM SO_NEW_DOCUMENT_ATT_SEND_API1.
2) Initially, the entire process was working fine.
3) However recently, there is a problem while sending the email. Whenever we are sending the email, the text in the email body is automatically converted into .txt attachment rather than being sent in email body.
4) There are no code changes which are done, have verified that.
5) I copy pasted the same code, in another system and the email is sent correctly with email body.
So wanted to know the following  :-
1) So is the conversion of email to .txt file due to some script running on the server / is this due to some configuration.
2) If it is due to some configuration, then where is this configuration maintiained ?
3) Anything which can be done on the ABAP side to control this ?
Regards,
Rinkesh Doshi

Hello All,
I have identified the root cause of this problem.
The issue is due to the configuration maintained in transaction SODIS, which is the transaction to add disclosures to the outgoing emails.
If the standard disclosure is activated over here, the original email body is sent as text attachment and the standard disclosure is added in the email body. If we deactivate this disclosure functionality, the process works perfectly fine.
(This logic is included inside the class CL_SEND_REQUEST_BCS, method ADD_DISCLOSURE_TO_MIME).
So is this standard functionality error ? I could not find SAP notes which are relevant in above context.
Regards,
Rinkesh Doshi

Similar Messages

  • Mail body from SBWP always as attachment

    Hi there,
    I want to send simple mails from Business Workplace to external users (internet address).
    The problem is, that the body always comes as attachment (txt-file) with the mail to the user. Not as body text in his mail client.
    Any help would be greatly appreciated,
    Bernd

    Hello Bernd,
    It is working as design. If you use the disclosure, than it will be
    put in the body, and all previous mail parts will be sent as attachment.
    The reason behind is, that SAP do not want to modify the original body
    of the mail.
    If you want to have a different behaviour, than you can design an own
    send program, where you put the disclaimer in the body itself.
    Regards,
    Wen Peng

  • Create hyperlink for reply to in mail body while sending email.

    Hi All,
    We have a requirement where we need to create an hyperlink for reply to in the mail body.
    We have implemented entire functionality using CL_BCS classes and everything is working fine.
    Only problem we have is when we give document type as HTM instead of RAW then entire formatting of mail body gets disturbed although we get the hyperlink.
    Is there any way where we can send the mail in html format using CL_BCS,CL_DOCUMENT_BCS ?
    KR Jaideep,

    Hi ,
    Please find the code below I am using to make the hyperlink. Do I need to fill the entire mail body using HTML Tags ? If yes, then I guess it will increase the complexity of program as the mail content will vary from one mail to another depending upon whether different invoice documents have text maintained in them.
    lwa_text = '<html>'.
        APPEND lwa_text TO li_text.
        CLEAR lwa_text.
        lwa_text = '<body>'.
        APPEND lwa_text TO li_text.
        CLEAR lwa_text.
        lwa_text = text-012.
        APPEND lwa_text TO li_text.
        CLEAR lwa_text.
        CONCATENATE '<a href="mailto:'
                    lv_receiver
                    '">'
                    lv_receiver
                    '</a>'
               INTO lwa_text.
        APPEND lwa_text TO li_text.
        CLEAR lwa_text.
        lwa_text = '</body>'.
        APPEND lwa_text TO li_text.
        CLEAR lwa_text.
        lwa_text = '</html>'.
        APPEND lwa_text TO li_text.
        CLEAR lwa_text.
        TRY.
            CALL METHOD cl_document_bcs=>create_from_text
              EXPORTING
                i_text         = li_text
                i_documenttype = 'HTM'
                i_subject      = 'Test for hyperlink'
                i_importance   = '1'
                i_sensitivity  = 'P'
              RECEIVING
                result         = lref_document_bcs.
          CATCH cx_document_bcs .
        ENDTRY.

  • Mail is sending the body of my email as a .txt attachment

    I have a serious problem when I send out an ordinary email, with no attachment. The first line appears as it should.."Dear whoever", and after that the email is blank. This makes me look rather stupid, but if the recipient checks the .txt attachment, they understand my message because the body of text has been punted into an attachment for some reason. I've had this feedback from several people. I use multiple email accounts in mail and I've had the same feedback for different accounts on separate domains. The message appears correct in my sent items, so I have absolutely no way of know that this has happened until the recipient tells me. It seems to be intermittent or not happening in every case.
    I would be so pleased if anyone could help me out with this one?

    Greetings,
    Mail doesn't create .txt files from email messages; it sends exactly what you type. If some of your recipients are claiming they receive .txt files, that would most likely be due to their email client, which no doubt is running Windoze. Only they can solve that problem. If the message is okay in your Sent mailbox, that's exactly what you sent, so the problem is on their end.

  • How to send a mail as .txt attachment ?

    Hi all,
    I got a requirement to write code for sending mail in oops.
    i have written code for .xls which is working fine. But requirement is to send the mail in the format of txt.
    i just only chnge the .xls to .txt where i can see the output properly in sap but problem is that i am unable to get the proper alignment. when i execute the report and see the output in sost i can see the attachment.i am downloading the attachment there only(Our server is not configured to get the mails directly) .So when i open the saved text file on my pc the output is appearing as follows...
    pernr nachn vorna
            0001 L0001 F0001
                0002 L0002 F0002
                   0003 L0003 F0003
                         0004 L0004 F0004...
    Where it should come in straight line as follows in my o/p code..
    pernr nachn vorna
    0001 L0001 F0001
    0002 L0002 F0002
    0003 L0003 F0003
    0004 L0004 F0004...
    i am puttin g my code ..please correct me where i am wrong .....waiting for your valuabel inputs..
    *& Report  ZGBTEST02
    REPORT  YSAS_MAIL2.
    *Changes done by sas
    *PARAMETERS: P_MAIL TYPE AD_SMTPADR OBLIGATORY, " G C by sas
    *P_MAIL1 TYPE AD_SMTPADR OBLIGATORY." G by sas
    TABLES: ADR6.
    SELECT-OPTIONS:P_EADDR FOR ADR6-SMTP_ADDR NO INTERVALS .
    *end of changes by sas
    DATA: I_GLT0 TYPE STANDARD TABLE OF GLT0.
    *DATA: I_pernr  TYPE STANDARD TABLE OF pa0002.  " MARA Entries
    DATA: BEGIN OF I_PERNR OCCURS 1 ,
    PERNR TYPE PA0002-PERNR,
    NACHN TYPE PA0002-NACHN,
    VORNA TYPE PA0002-VORNA,
    END OF I_PERNR..
    *      I_MARC  TYPE STANDARD TABLE OF MARC.  " MARC Entries
    DATA: L_TEXT  TYPE CHAR255.  " Text
    DATA: L_LINES TYPE I,
          L_SIZE  TYPE SOOD-OBJLEN.
    " Size of Attachment
    * Mail related
    DATA: I_CONTENT         TYPE   SOLI_TAB, " Mail content
          I_ATTACH          TYPE   SOLI_TAB, " Attachment
          I_ATTACH1         TYPE   SOLIX_TAB. " Attachment
    DATA: L_SEND_REQUEST    TYPE REF TO    CL_BCS,
                                                " E-Mail Send Request
          L_DOCUMENT        TYPE REF TO    CL_DOCUMENT_BCS,
                                                " E-Mail Attachment
          L_RECIPIENT       TYPE REF TO    IF_RECIPIENT_BCS,
                                                " Distribution List
          L_SENDER          TYPE REF TO    IF_SENDER_BCS,
                                                " Address of Sender
          L_UNAME           TYPE           SALRTDRCPT,
                                                " Sender Name(SY-UNAME)
          L_BCS_EXCEPTION   TYPE REF TO    CX_DOCUMENT_BCS,
                                                " BCS Exception
          L_ADDR_EXCEPTION  TYPE REF TO    CX_ADDRESS_BCS,
                                                " Address Exception
          L_SEND_EXCEPTION  TYPE REF TO    CX_SEND_REQ_BCS.
    " E-Mail sending Exception
    *Constants------------------------------------------------------------*
    CONSTANTS: C_TAB(1) TYPE C VALUE
               CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
                                         " Tab Character
               C_CR(1)  TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF,
                                         " Line Feed for End-Of_line
               C_EXT    TYPE SOODK-OBJTP VALUE 'TXT'. " XLS Extension
    START-OF-SELECTION.
      SELECT PERNR NACHN VORNA  FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE I_PERNR UP TO 20 ROWS.
    *select * from glt0 into table i_glt0.
    * Preparing body of the Mail
    *  MOVE 'SAP Material Master Records' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  CLEAR L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  MOVE 'Thanks,' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  MOVE 'SAP MM' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>Attached is your HRIS report(s) generated from the Firm''s' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE ' Human Resources  Information System (SAP).' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>  ' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>This is an automated report.' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    *        MOVE '<BR>  ' TO l_text.
    *        APPEND l_text TO i_content.
      MOVE '<BR>  ' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    *        MOVE '<BR>Please do not reply to this email' TO l_text.
    *        APPEND l_text TO i_content.
    *        MOVE '<BR>  ' TO l_text.
    *        APPEND l_text TO i_content.
      MOVE '<BR>Thank you.' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    * Creates persistent send request
      TRY.
          L_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
    * Creating Document
          L_DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
                                        I_TYPE  = 'RAW'
                                        I_TEXT  = I_CONTENT[]
                                        I_SUBJECT = 'Automated HRIS (SAP) Report' ).
    DATA: W_PERNR LIKE I_PERNR.
    * Preparing contents of attachment with Change Log
          PERFORM PREPARE_ATTACHMENT.
          DATA: compressed like solisti1 occurs 10 with header line.
    DATA: decompressed like solisti1 occurs 10 with header line.
          CALL FUNCTION 'TABLE_COMPRESS'
    *   IMPORTING
    *     COMPRESSED_SIZE       =
                        TABLES
    *      in                    = eerec
                          in                    = i_attach
                          out                   = compressed.
          CALL FUNCTION 'TABLE_DECOMPRESS'
            TABLES
              in  = compressed
              out = decompressed.
          DESCRIBE TABLE decompressed LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
          L_SIZE = L_LINES * 2 * 255.
    * Adding Attachment
          CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
            EXPORTING
              I_ATTACHMENT_TYPE    = C_EXT
              I_ATTACHMENT_SIZE    = L_SIZE
              I_ATTACHMENT_SUBJECT = 'Hr Details'
    *          i_att_content_hex    = i_attach[].
              I_ATT_CONTENT_TEXT   = decompressed[].
    *      DESCRIBE TABLE I_MARC LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
    *      L_SIZE = L_LINES * 2 * 255.
    ** Adding Attachment
    *      CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
    *        EXPORTING
    *          I_ATTACHMENT_TYPE    = C_EXT
    *          I_ATTACHMENT_SIZE    = L_SIZE
    *          I_ATTACHMENT_SUBJECT = 'MARC Details'
    *          I_ATT_CONTENT_HEX    = I_ATTACH1[].
    **          i_att_content_text   = i_attach1[].
    * Add document to send request
          CALL METHOD L_SEND_REQUEST->SET_DOCUMENT( L_DOCUMENT ).
          DATA:LR_SENDER TYPE REF TO IF_SENDER_BCS,
               LR_SEND TYPE REF TO CL_BCS.
    * Preparing the sender object
    *      LR_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( sy-uname ).
          DATA: L1_UNAME TYPE SY-UNAME.
          L1_UNAME = SY-UNAME.
          LR_SENDER = CL_SAPUSER_BCS=>CREATE( L1_UNAME ).
    * Setting the sender
          CALL METHOD L_SEND_REQUEST->SET_SENDER
            EXPORTING
              I_SENDER = LR_SENDER.
    * E-Mail
          LOOP AT P_EADDR.
            TRANSLATE P_EADDR-LOW TO LOWER CASE.
            L_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( P_EADDR-LOW ).
            CALL METHOD L_SEND_REQUEST->ADD_RECIPIENT
              EXPORTING
                I_RECIPIENT  = L_RECIPIENT
                I_EXPRESS    = 'U'
                I_COPY       = ' '
                I_BLIND_COPY = ' '
                I_NO_FORWARD = ' '.
            IF SY-SUBRC EQ 0.
              WRITE:/'** SUCCESS:  Email Sent to', P_EADDR-LOW COLOR COL_NORMAL.
            ELSE.
              WRITE:/'** ERROR: Failed to send Email to',P_EADDR-LOW COLOR COL_NEGATIVE .
            ENDIF.
          ENDLOOP.
    *Trigger E-Mail immediately
          L_SEND_REQUEST->SET_SEND_IMMEDIATELY( ' ' ).
          CALL METHOD L_SEND_REQUEST->SEND( ).
          COMMIT WORK.
        CATCH CX_DOCUMENT_BCS INTO L_BCS_EXCEPTION.
        CATCH CX_SEND_REQ_BCS INTO L_SEND_EXCEPTION.
        CATCH CX_ADDRESS_BCS  INTO L_ADDR_EXCEPTION.
      ENDTRY.
    *&      Form  PREPARE_ATTACHMENT
    FORM PREPARE_ATTACHMENT .
      FIELD-SYMBOLS: <LFS_TABLE>,    " Internal table structure
                     <LFS_CON>.      " Field Content
      DATA: L_TEXT TYPE CHAR1024.     " Text content for mail attachment
      DATA: L_CON TYPE STRING. "(50) TYPE c.        " Field Content in character format
      DATA: L_STR TYPE STRING,
            L_STR1 TYPE STRING.
    *data: w_pernr type TABLE OF I_PERNR.
      DATA: LS_SOLIX TYPE SOLIX.
    *  CONCATENATE 'PERNR' 'FIRST NAME' 'Last Name' C_CR INTO L_TEXT SEPARATED BY '|'.
    *  append l_text to i_attach.
    *  clear l_text.
    * Columns to be tab delimeted
      LOOP AT I_PERNR ASSIGNING <LFS_TABLE>.
        DO.
          ASSIGN COMPONENT SY-INDEX OF STRUCTURE <LFS_TABLE>
                 TO <LFS_CON>.
          IF SY-SUBRC NE 0.
            CONCATENATE C_CR L_TEXT INTO L_TEXT.
    *        CONCATENATE l_str c_cr l_text INTO l_str.
    *        ls_solix-line = l_text.
    *        APPEND ls_solix TO i_attach.
            APPEND L_TEXT TO I_ATTACH.
            EXIT.
          ELSE.
            CLEAR: L_CON.
            MOVE <LFS_CON> TO L_CON.
            CONDENSE L_CON.
            IF SY-INDEX = 1.
              CLEAR: L_TEXT.
              MOVE L_CON TO L_TEXT.
            ELSE.
              CONCATENATE L_TEXT L_CON INTO L_TEXT
                 SEPARATED BY C_TAB.
            ENDIF.
          ENDIF.
        ENDDO.
      ENDLOOP.
    *  i_attach1[] = i_attach[].
    ENDFORM.                    " PREPARE_ATTACHMENT
    Please if any one having 6.0 version please upload it and see..
    Regards
    Sas

    Hi ,
    Did you downloaded from  SOST  using the display icon and inside that 4th tab for attachment ....
    and see?
    Regards
    sas
    pS: THE FIRST page is not allowing the spaces in sdn...
    i am getting o/p as
    pernr vochn norna
    .........0001 f0001 l0001
    .................0002 F0002 L0002
    .......................0003 F0003 L0003.....
    Please remove dots and understand that is the o/p i am getting in my presenation file
    i just expecting the o/p as told earlier..
    Regards
    sas

  • Content coming as .txt attachment along with email but not in email body

    Hi,
    I have a proxy to email scenario. The requirement is to generate an excel sheet and keep it as an attachment and send it to user through email.
    I am able to get the excel sheet as an attachment in email but the content of email is also coming as attachment which I do not want.
    Problem area :
    ============================================
    The Content should come in Email body but it is coming as .txt attachment in email. The email body is blank.
    Can someone help as how I can get the content in email body.?
    /Regds
    Azahar

    Hi Azahar,
       May you can find the solution in the "
    Adapter-Specific Message Attributes
    Configuring the Receiver Mail Adapter (SAP Library - Partner Connectivity Kit)

  • Question: Is there a way to create a PDF from outlook e-mail that does not embed the attachment? better, is there a way to convert the e-mail with attachement (not embeded) as pdf pages? - Problem: I have 1400 e-mails with attachments that need to be conv

    Is there a way to create a PDF from outlook e-mail that does not embed the attachment? better, is there a way to convert the e-mail with attachement (not embeded) as pdf pages?
    - Problem: I have 1400 e-mails with attachments that need to be converted into pdf and the attachments cannot be embeded.
    System: PC Windows 7 using Acrobat X Prof. - Thank you!

    Hi ,
    There is an option of embedding index for faster search while converting email to a PDF .
    However I am not sure that will serve your purpose or not .
    I would recommend you to get in touch with Microsoft support as well .
    Meanwhile I'll work on it and get back to you in case I get a desired solution .
    Regards
    Sukrit Dhingra

  • Unable to get source file content as mail body in file to mail scenario

    Hi Friends,
    I am facing one problem with one of my file to mail scenario in PI(SP9).  I have done bypass scenario(without IR only with ID objects). Scenario is working fine, i am getting mail also.  But my requirement is i want complete source file content as a mail body (not xml format, text format).  I have checked all options, but configured scenario bydefault taking source content as a attachment and mail body is empty.  I have tested below options
    1. If i choose message protocol as FCC mechanism at source side content at target side i am getting xml format as a attachment( In mail adapter i have selected message protocol as xi payload, and without packate option on mail adapter). If i choose message protocol as xi all, i am getting 2 files as a attachment (one file as a payload content and second file as a source file content in xml format).
    2. If i choose message protocol as file at souce side that time i am getting source complete content as a attachment at target side in xml format, but mail attached file content is flat file(.xml extension) format. When i tried to open attachment file that time i am getting error in explorer, but i can see only one row in explorer  remaining rows unable to see.
    Please share your ideas on this.

    Hi,
    Follow below steps
    1. First basis level need to configure setup(SMTP) for mail.  After that only mail will go from SAP.
    2. Source side depending on requirement take communication channel(idoc, file etc)
    3. Receiver side communication channel take mail adapter and configure below setup
       3.1 select message protocol XI ALL/ XI PAYLOAD(WITH PACKAGE or WITHOUT PACKAGE)
       3.2 if message protocol is XI ALL, the complete content will be sent as a attachment along with payload file
       3.3 if message protocol is XI PAYLOAD, the source message, the source message will be sent as attachment.  Playload file filter automatically.
       3.4 If you use PACKAGE option on mail adaper, this time source strucute need to import from SAP (some standard structure only will be support, without strucutre we can't work).  If you choose package option no need to give mail id on communication channel, we need to pass mail id's from source structure.
    I hope now clear.

  • Mail body as attachment in email

    Hi,
    whenever we are sending mails through the FM SO_DOCUMENT_SEND_API1 the text in the body is going as text attachment in the mail. This problem is occuring when the mail is viewed in outlook , in the business workplace the mail is looking good (body as body only).
    Please let me know if anyone has encountered this problem and has the solution? 
    Thanks,
    Rajinikanth G

    Hi Rajnikanth,
    If my understanding is correct..
    please check the code in the below perform
    perform send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
    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_format type  so_obj_tp ,
            ld_attdescription type  so_obj_nam ,
            ld_attfilename type  so_obj_des ,
            ld_sender_address like  soextreci1-receiver,
            ld_sender_address_type like  soextreci1-adr_typ,
            ld_receiver like  sy-subrc.
      ld_email   = p_email.
      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-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.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      append t_receivers.
      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.
    regards,
    gowri

  • Prob in getting Mail body for the standard tcode F150(Dunning).

    Hello all,
    I am using F150 for the dunning notice print out.After seeing the display of the dunning notice once we come back it populates a popup window where it asks to send the mail to the particular mailid or not. I have used the BTE ---  SAMPLE_PROCEE_00001040 and copied it as z function module and customised according to my requirement in order to get the mail id of the customer in the pop up.My mail is going to the customers mail id properly only but my prob is that we are not able to get any mail body for that particular mail.Where can we add the mail body text to that mail in the standard tcode f150.can any one suggest is it possible or not.
    Regards,
    Pavani.
    Edited by: Pavani Rayappureddi on Aug 11, 2009 11:21 AM

    solved my self.
    added         C_ITCPO-TDTITLE  = 'Pending Receivables Statement-XXX GROUP'.
    in the bte code.

  • How to get the content of message in the mail body

    Hi,
    Can anyone suggest me to get the message content as the mail body using messagetTransformation bean????

    Hi
    In the Receiver Mail Adapter use these settings
    Message Protocol:XIPAYLOAD
    and tick on Use mail package.
    Gt back if you have more doubts
    Thanks

  • Mail Adapter Use Mail Package, Mail Body and Attachment

    Hello
    Have some body a idea, how I can configure the mail adapter with use mail package, that I have in the mail a attachment with content from the messages and a mail body with also text from the message.
    Thanks for your reply.
    Regards Tom
    The different Weblog , I have check:
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

    Hi Thomas,
    If you are configuring your Mail adapter as reciever then refer
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    your sender (say file) should have some message like this
    <i>
    <ml:Mail xmlns:ml=’http://sap.com/xi/XI/Mail/30’>
       <Subject>Important</Subject>
       <From>[email protected]</From>
       <To>[email protected]</To>
       <X_Mailer>Outlook Express </X_Mailer>
       <Content>
       This is the content.
       </Content>
    </ml:Mail></i>
    And for Sender Mail Adpater
    http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Hope this will be helpful
    Regards
    Suraj

  • Receiver Mail adapter with txt attachment

    I'm having a requirement to transfer Text fiels as-is to email as an attachment.
    With the study as of now I came to know that if I use mail adapter I can get my payload as XML attachment.
    Can we get text file as attachment instead of XML file in E-Mail?

    hi das
    check the below blogs
    eMail Report as Attachment (Excel/Word)
    eMail Report as Attachment (Excel/Word)
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    regards
    kummari

  • Hw to write txt in mail body using UTL mail when sending mail with attachme

    hi all
    i m using oracle demo mail package to send csv file as attachment to different users its successfull and i can also able to attach text file to it
    but i m unable to write any text in mail body .
    e.g.
    mail body can be--
    hi
    This is test mail.
    Regds
    Sender.
    can anyone suggest some way?

    u can try this code
    this code takes the file from database and attach with mail and also send the body with it
    it works fine.
    CREATE OR REPLACE
    procedure pdf_mail(
    p_sender varchar2, -- sender, example: 'Me '
    p_recipients varchar2, -- recipients, example: 'Someone '
    p_subject varchar2, -- subject
    p_text long, -- text
    p_case_id number,
    p_email_log_id number
    -- p_filename varchar2, -- name of pdf file
    p_blob   blob     pdf file
    ) is
    conn utl_smtp.connection;
    i number;
    len number;
    p_message_part varchar2(32767);
    cursor c1 is
    select file_name,document_pic
    from clm_case_attachments ca,email_log_detail em
    where
    case_id = p_case_id
    and ca.CASE_ATTACHMENT_ID = em.ATTACHMENT_ID
    and em.ACTIVE = 'Y'
    and em.EMAIL_LOG_ID = p_email_log_id;
    BEGIN
    conn := demo_mail.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => demo_mail.MULTIPART_MIME_TYPE);
    demo_mail.attach_text(
    conn => conn,
    data => p_text,
    mime_type => 'text/html');
    for lp in c1 loop
    demo_mail.begin_attachment(
    conn => conn,
    mime_type => 'application/pdf',
    inline => TRUE,
    filename => lp.file_name,
    transfer_enc => 'base64');
    -- split the Base64 encoded attachment into multiple lines
    i := 1;
    len := DBMS_LOB.getLength(lp.document_pic);
    WHILE (i < len) LOOP
    IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
    UTL_SMTP.Write_Raw_Data (conn
    , UTL_ENCODE.Base64_Encode(
    DBMS_LOB.Substr(lp.document_pic, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
    ELSE
    UTL_SMTP.Write_Raw_Data (conn
    , UTL_ENCODE.Base64_Encode(
    DBMS_LOB.Substr(lp.document_pic, (len - i)+1, i)));
    END IF;
    UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
    i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
    END LOOP;
    demo_mail.end_attachment(conn => conn);
    end loop;
    demo_mail.end_mail( conn => conn );
    END;
    /

  • E-Mail Body coming as an attachment

    Email body is coming as an attachment while sending external mail through SAP

    hi Sudhanshu,
          Give a little snippet of your code. It will help us to analyze the problem.
    Regards,
    Shaheen

Maybe you are looking for