Message body is incomplete (e-mail)

Hello experts,
I am currently analyzing my code wherein it sends an e-mail message to specified users.
Now, When I checked in tcode scot I noticed that the message body lacks some text or in other
words, incomplete(particularly when a user changes an address. Anyway, below is my code to give you
guys better understanding of my problem.
  for records that were modified
    IF NOT it_address_status[] IS INITIAL.
      CLEAR maildata.
      maildata-obj_name = 'Record Changed in table ZTS0001'.
      maildata-obj_descr = 'Record Changed in table ZTS0001'.
      maildata-obj_langu = sy-langu.
      LOOP AT it_zshipto_email.
        mailtxt-line =  'FYI: Record changed in table ZTS0001'.
        APPEND mailtxt.
        CLEAR it_address_status.
        LOOP AT it_address_status.
          IF NOT it_address_status-old_address IS INITIAL AND
             NOT it_address_status-new_address IS INITIAL.
            CONCATENATE: 'Address of dealer' it_address_status-kunnr
                         'code' it_address_status-cdseq 'was changed'
                         'from' it_address_status-old_address 'to'
                         INTO lv_contents
                         SEPARATED BY space.
            mailtxt-line = lv_contents.
            APPEND mailtxt.
            CLEAR lv_contents.
            CONCATENATE: it_address_status-new_address 'in table'
                         'ZTS0001 and ZTS_STPGEOLOC by user' sy-uname
                         INTO lv_contents
                         SEPARATED BY space.
            mailtxt-line = lv_contents.
            APPEND mailtxt.
            CLEAR lv_contents.
          ENDIF.
          IF NOT it_address_status-old_person IS INITIAL AND
             NOT it_address_status-new_person IS INITIAL.
        CONCATENATE: 'Contact person of dealer' it_address_status-kunnr
                           'code' it_address_status-cdseq 'was changed'
                               'from' it_address_status-old_person 'to'
                                it_address_status-new_person 'in table'
                           'ZTS0001 and ZTS_STPGEOLOC by user' sy-uname
                                           INTO lv_contents
                                           SEPARATED BY space.
            mailtxt-line = lv_contents.
            APPEND mailtxt.
            CLEAR lv_contents.
          ENDIF.
          IF NOT it_address_status-old_number IS INITIAL AND
             NOT it_address_status-new_number IS INITIAL.
        CONCATENATE: 'Contact number of dealer' it_address_status-kunnr
                           'code' it_address_status-cdseq 'was changed'
                               'from' it_address_status-old_number 'to'
                                it_address_status-new_number 'in table'
                           'ZTS0001 and ZTS_STPGEOLOC by user' sy-uname
                                            INTO lv_contents
                                            SEPARATED BY space.
            mailtxt-line = lv_contents.
            APPEND mailtxt.
            CLEAR lv_contents.
          ENDIF.
        ENDLOOP.
        mailtxt-line = 'NOTE: Do not reply to this message.'.
        APPEND mailtxt.
        mailrec-receiver = it_zshipto_email-zemail.
        mailrec-rec_type  = 'U'.
        APPEND mailrec.
        CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
             EXPORTING
                  document_data              = maildata
                  document_type              = 'RAW'
                  put_in_outbox              = 'X'
                  commit_work                = '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 <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CLEAR:    mailtxt,  mailrec.
        REFRESH:  mailtxt, mailrec.
      ENDLOOP.
      CLEAR it_address_status.
      REFRESH it_address_status.
    ENDIF.
  ENDIF.

Hi Viray,
try to pass only object_content, don't pass object_header. since both are holding the same data, and use only one. and see....
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
<b>object_header = mailtxt</b>
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 <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards
vijay

Similar Messages

  • To Call a transaction from message body of an e-mail sent from SAP

    I have requirement to call a transaction (say MM03) when I click on some text ( Like  Hyperlink ) in the message body of an email sent by SAP.
    Please let me know how it should be done.

    I dont know whether you can do hyperlink in the mail but i can think of following 2 options:
    1)  Use Workflow and send it to user and then attach transaction MM03 to that so that when user receives message, he/she can directly open MM03.
    2)  In report, you can have hyperlink.

  • Want to change message body of OPEN_MAIL_DIRECT (Notification Mailer messag

    The default value of the BODY attribute is blank. The attribute description says 'substituted message body', type 'text' and source 'send'. How do I determine what it's substituted with?
    How would i determine which package is used to form the value of the body.

    Yes, the value for &BODY is dynamically built within PLSQL or OA Fwk (11.5.10 onwards) based on how the notification message is defined.
    PLSQL Notification
    Procedure WF_MAIL.GetLOBMessage3 procedure calls WF_NOTIFICATION.GetFullBody to get the content and WF_XML.GenerateMessage replaces the &BODY token in 11.5.10.2. Please note that these APIs are for internal use only since I don't see them in Workflow API guide.
    WF_NOTIFICATION.GetFullBody generates the notification body.
    OA Fwk Notification
    The procedure WF_XML.GenerateMessage leaves the &BODY token unsubstituted and provides an URL to OA Fwk page NotifMailerPG that generates the content. The mailer that runs within a concurrent manager invokes this URL and replaces &BODY token before sending it as e-mail.
    oracle.apps.fnd.wf.worklist.webui.NotifMailerPG generates the notification body. Please refer to Embedding Oracle Applications Framework Regions in Messages in Oracle Workflow Developer Guide for more information.
    In summary, it could be either PLSQL or OA Fwk that could be generating the content based on how you have defined the notification message.
    Hope this helps.
    Vijay

  • Message Body Not Displayed in Mail on "New" iPad

    I first noticed this after I had first turned off Wi-Fi force everything to LTE.  The new iPad apparently defaults to Wi-Fi if it is available.
    Now, whether Wi-Fi is on or not, only message headers are displayed on the right side of the screen.  This applies to new messages as well as those already in the various account inboxes.  "Download Remote Images" is "On" and I cannot find any other settings that seem relevant.  A hard reset (holding down off /on switch until previous screen content is re-displayed) does not fix the problem.
    How can I get message bodies to display again?

    Quit the mail app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Single page PDF file in mail always appears in message body, instead of as an attachment, contrary to a multiple page PDF. Why?

    When sending a single page PDF file in mail, it always appears as an open file in the message body. Multiple page PDF files appear as attachments. Why the difference and how to change the behavior of single page PDF files so that they appear as attachments instead of open files?

    Hello billsbs,
    Welcome to the Apple Support Communities!
    I understand that when you add a PDF to mail you see its entire contents, but when you add two or more pages Mail shows them as a document icon. To change this behavior for that specific email, please follow the instructions in the attached article. 
    Mac OS X Mail: About PDF attachments
    Have a great day,
    Joe

  • How to read the message body in a mail

    how can we read the message body of a mail. i am using pop3 server for reading the mails. my program is
    public class GetMessageExample {
    public static void main (String args[]) throws Exception {
    String host = args[0];
    String username = args[1];
    String password = args[2];
    Properties props = new Properties();
    Session session = Session.getInstance(props, null);
    Store store = session.getStore("pop3");
    store.connect(host, username, password);
    Folder folder = store.getFolder("INBOX");
    folder.open(Folder.READ_ONLY);
    BufferedReader reader = new BufferedReader (
    new InputStreamReader(System.in));
    Message message[] = folder.getMessages();
    for (int i=0, n=message.length; i<n; i++) {
    System.out.println(i + ": " + message.getFrom()[0]
    + "\t" + message[i].getSubject());
    System.out.println(
    "Do you want to read message? [YES to read/QUIT to end]");
    String line = reader.readLine();
    if ("YES".equals(line)) {
    message[i].writeTo(System.out);
    } else if ("QUIT".equals(line)) {
    break;
    folder.close(false);
    store.close();
    i am getting the following exception
    Exception in thread "main" java.lang.NoSuchFieldError: contentStream
    at com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:115)
    at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSou
    rce.java:61)
    at com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.
    java:755)
    at javax.activation.DataHandler.getContent(DataHandler.java:511)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1072)

    The Part interface that the Message class implements describes 3 ways for getting the content of a message. To use an Input Stream, you can call the getInputStream() method on the message itself, rather than System.in.
    Hope this helps!

  • TS4002 iCloud emails message body showing blank in Mac mail.

    The content of emails (message body) is sometimes blank in Mac mail but visible on both my iPhone and iCloud. I can't seem to find a fix?

    Strange that this is such an old thread - seems like the problem has popped up again here.

  • How to export mail message body data detectors information, not address bok

    Is there anyway to export Apple mail's "data detectors" information within the message body other than to the address book? I don't want to export the other non detector information contained in the body of the message. I would also like to include From, Subject and Date. Preferably the export result would be in a organized comma format.
    Any suggestions?
    Thanks in advance.

    James,
    Two routes to try come to mind, the first being Applescript. Mail is obviously "aware" of the info contained in the detectors, and of course it knows all about what is contained in the header. You can probably use Applescript to extract the desired data, placing it in a Text Edit document. It has been some time since I haves used Applescript myself, so I won't be much help in guiding you. Regardless, you would need to teach yourself how to use Applescript, even with assistance.
    The other route to take would be to drag these emails out of Mail to the Finder, creating standard text files. You could then handle them in one of the command line text editors- scripted, of course- to extract and format the needed data. Again, this is something you'd need to explore on your own.
    Since these messages all have the same formatting, it is simply a matter of identifying the data you need, then placing that data in a properly formatted text document. Generally speaking, this is part and parcel of what both Applescript be text editors do.
    Scott

  • How can i make apple mail dislay message body to the left not below the mes

    How can i make apple mail display message body to the left not below the messages
    headers pane ? something like outlook

    There is a plugin to do this in Leopard but currently its not compatible with SL however you might like to try the beta release which has preliminary support for 10.6:
    http://www.macupdate.com/info.php/id/21899

  • SBO mailer message body configuration

    Hi all,
    I would like to know if we can configure the message body of an email, see belowé
    1.      Date      Customer      Remarks                                                     Due Date
    111100029     07/25/2011     Amber Mann     Based On Sales Orders 111000042.     07/25/2011
    The customer would like to delete the Remarks,
    any idea ?
    thanks
    Charles

    Hi Charles,
    This remark is linking to the table column directly. Unless you can taken out the column from the email source, nothing you can do about it.
    Thanks,
    Gordon

  • In PSE 11 and Windows 8, why can't I type a message into the body of my Photo Mail?

    In PSE 11 and using Windows 8, why can't I type into the body of my Photo Mail?

    As I mentioned, the most common causes are other applications conflicting with the software. I'd recommend testing this: http://helpx.adobe.com/x-productkb/global/disable-startup-items-services-windows.html

  • When I want to attach a file to an e-mail I'm sending from my iCloud account it makes the file show up in the body of the e-mail instead of attaching it as a separate file the receiver can open.  How can I change this?

    When I want to attach a file to an e-mail I'm sending from my iCloud account it makes the file show up in the body of the e-mail instead of attaching it as a separate file the receiver can open.  How can I change this?

    It should be an attachment.  Your Mac just displays a preview of certain attachments (such as .pdfs) in the body of the message.  A PC, for example, will see it as an attached file rather than a preview.
    You can save the attachment on your Mac by Control-clicking on it and selecting Save Attachment.

  • Is it possible to exclude .PDF file from Email Message body ?

    Hello Friends,
    I am sending e-mail from one program with attachment of EXCEL file.
    I am using following function SO_NEW_DOCUMENT_ATT_SEND_API1
    I am getting body of the message as a separate .PDF file.
    Even I want in real message body.
    <REMOVED BY MODERATOR>
    Regards,
    NVM
    Edited by: Alvaro Tejada Galindo on Dec 28, 2007 7:47 AM

    NB - the "data" that is returned by these classes is the data as defined in an adobe form - it doesn't return the content of non-form PDF documents.
    The PDF must be an interactive form ( although that doesn't restrict you to using the SAP process for creating the form is my understanding - but I could be wrong. )
    Edit - I was wrong! ONLY PDF documents that have been created by the ADS can have data extracted using these classes. So unless you are using Adobe interactive forms - then you will get no value from this functionality - and if you're using AIF then you're probably just use the standard UI element
    Edited by: Chris Paine on Oct 26, 2010 6:04 PM

  • How to send HTML as message body using SMTP

    I need to send HTML formatted emails. I used the Report Generation Toolkit to build my HTML document and make sure I had all of the formatting right. Then I modified the Save Report To File.vi to also give me the HTML text string on an output connector and I wire this string to the message input on the SMTP Email Send Message.vi.
    I receive the email OK, but all I see is the HTML code in the message body. What can I do to make sure that the email displays the message correctly.
    I use Outlook and I know it will receive and display HTML emails, I get them all the time.
    I would appreciate any help.

    Hi Dgw,
    it is similar. You must change message MINE content-type to "text/html" type. Because everyone document in email protocol have set MINE content-type. It is inforamtion for email servers and for email cients (Thunderbird, Outlook and etc.)
    For sendning mail with attachments you must use and modified "SMTP Send Multiple Attachments.vi" - if you can do backup of this VI and subVIs. Open Diagram of "SMTP Send Multiple Attachments.vi" after "SMTP Send Multiple
    Attachments Message.vi" and ther is VI "MIME Send Data Attachment.vi" - have control "MIME content-type" but code from NI don't use it.
    And like as my previous message, create new string control "MINE content-type" and take out this control to "main" Email VI.
    And embedd
    ed file you set up in control-cluster "attachments". I don't test it, but I mind thet must working :-)
    Have nice day
    JCC
    Attachments:
    email.jpg ‏70 KB

  • How to include original message body in the reply to a workflow notificatio

    Hi,
    I have a requirement from my clients.
    Standard Functionality: When a Manager clicks on the APPROVE (button / link) to approve a workflow notification from a mailing application, a (response) mail gets composed to the Workflow Mailbox with the NID and Access Key. The content as shown below.
    ===========================
    Action: 'Approve'
    Comments: ''
    NID[3699/874478985@WFMAIL3]
    ===========================
    Requirement:
    The requirement is that, when the Maanger clicks on Approve / Reject, the original message body also has to get populated into the response mail along with the NID and Access Key.There would be audits conducted(looking into the workflow mail box) on the approval / rejection decisions taken by the users. The intention of getting the originial message body is to identify, to which notification(or letter) this action was taken. Me, being a Technical person can get it from the Notification Id in the workflow mail box, but the people conducting the Audit cant identify that. So, I need to get the original message body into the response. This is the reason for the requirement.
    Actually, I dont need the whole message body, but the value in an URL attribute, which is one of the SEND attributes of the notification in question.
    fyi, It is a VOTING ACTIVITY and hence, I donot know how many users would get the notification.
    I tried creating a RESPONSE Attribute(I understand that, a response attribute is an attribute where I accept inputs from the user), but couldnt assign the value to that attribute.
    Regards
    Anil K A

    Sadly, I believe this will require a bit of development to make it happen. The project I'm on now...we are finding that to get it to do what we want it to do, a development to customize the email message to include all the case fields is required.
    D

Maybe you are looking for

  • Problems With MacBook Connecting to the Internet

    This is quite an annoying little problem that I have. And apparently Tech Support can't help me and just said "good luck" and hung up on me. So here we go: I purchased a new MacBook about two weeks ago and it won't connect to my wireless at home. I c

  • Smartview 11.1.2 - Planning and Excel formulas giving problems

    Hi, I am using Smartview 11.1.2 with HP 11.1.2, when I open one webform done and in one cell I write =10 and after I write different number like 5, it's still with =10 so, has someone had problems with you start to use a formula in one cell and after

  • Message:typing error in 5800 xm

    i recently upgraded to firmware v51 after updating  i m experiencing a strange problem """"while pressing O it types L  ---- the key just below it-----""""" and with other keys too pressing something and typing something else............ anyone plz g

  • I am not able to open my mail appicaton?

    i am not able to open my mail application. i am getting an error if i open my mail.....

  • Starting the web dbm on RH fedora core 2

    Hello all I have installed the RPM package maxdb-web-7.5.0.23-1.i386.rpm According to the online help http://help.sap.com/saphelp_nw04/helpdata/en/fe/389e3a85166506e10000000a114084/content.htm i should now start the web dbm with: /etc/rc.d/sdb-web st