How do I add text message to this email with PDF attachment?

Good day, everyone!
Okay, we have a "z"-version of program RFFOUS_T and some of its include codes.  One include code, RFFORIO6, has a form called MAIL_PDF_ADVICE.  It is in this form that we are emailing a remittance advice form.  The actual form is attached as a PDF file.
Unfortunately, there's no text in the body of the email -- it's just the attachment -- so the users would like us to add a couple basic lines in the body of the email that explain the attachment.  I'm pretty new to using this particular FM and emailing the PDF attachment, and I've gotten stuck in my research trying to find out exactly how to do this.  I'm guessing this shouldn't be all that difficult, but I'm not finding the right solution.  Here's the form:
*&      Form  mail_pdf_advice
      E-mail PDF advice
     -->IT_ADVICE     PDF form (output from Adobe server)
     -->I_PDF_LEN     length of PDF advice in bytes
FORM mail_pdf_advice USING it_advice   TYPE solix_tab
                           i_pdf_len   TYPE i.
  DATA:
    lt_receivers       TYPE TABLE OF somlreci1 WITH HEADER LINE,
    l_user             LIKE soextreci1-receiver,
    ls_send_doc        LIKE sodocchgi1,
    lt_pdf_attach      TYPE TABLE OF sopcklsti1 WITH HEADER LINE.
  CHECK NOT finaa-intad IS INITIAL.
  CHECK finaa-nacha EQ 'I'.
*--- determine E-Mail sender and recipient
  IF fsabe-usrnam EQ space.
    l_user = sy-uname.
  ELSE.
    l_user = fsabe-usrnam.         "Office-User des Sachbearb.
  ENDIF.
  lt_receivers-receiver = finaa-intad.
  lt_receivers-rec_type = 'U'.      "E-mail address
  APPEND lt_receivers.
  ls_send_doc-obj_descr =  itcpo-tdtitle.
  lt_pdf_attach-transf_bin = 'X'.
  lt_pdf_attach-doc_type   = 'PDF'.
  lt_pdf_attach-obj_langu  = reguh-zspra.
  lt_pdf_attach-body_start = 1.
  lt_pdf_attach-doc_size   = i_pdf_len.
  DESCRIBE TABLE it_advice LINES lt_pdf_attach-body_num.
  APPEND lt_pdf_attach.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data              = ls_send_doc
      sender_address             = l_user
    TABLES
      packing_list               = lt_pdf_attach
      contents_hex               = it_advice
      receivers                  = lt_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.
<error checking code snipped>
Does someone know how to do this?  <b><REMOVED BY MODERATOR></b>  Thanks so much in advance!
Dave
Message was edited by:
        Alvaro Tejada Galindo

Hi Dave,
Table <b>contents_bin</b> is used to pass attachment file and <b>contents_txt</b> is used to pass mail body contents. You need to declare one more int table to give contents for mail body.
For reference check the code below
ut_message is for message body
and ut_attach is having attachement file.
  FORM send_file_as_email_attachment TABLES ut_message
                                          ut_attach
                                    USING uv_email
                                          uv_mtitle
                                          uv_format
                                          uv_filename
                                          uv_attdescription
                                          uv_sender_address
                                          uv_sender_addres_type
                                 CHANGING uc_error
                                          uc_reciever.
  DATA:  l_error                TYPE  sy-subrc,
         l_reciever             TYPE  sy-subrc,
         l_mtitle               LIKE  sodocchgi1-obj_descr,
         l_email                LIKE  somlreci1-receiver,
         l_format               TYPE  so_obj_tp ,
         l_attdescription       TYPE  so_obj_nam ,
         l_attfilename          TYPE  so_obj_des ,
         l_sender_address       LIKE  soextreci1-receiver,
         l_sender_address_type  LIKE  soextreci1-adr_typ,
         l_receiver             LIKE  sy-subrc.
  DATA:   lt_packing_list    LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
          lt_contents        LIKE solisti1   OCCURS 0 WITH HEADER LINE,
          lt_receivers       LIKE somlreci1  OCCURS 0 WITH HEADER LINE,
          lt_attachment      LIKE solisti1   OCCURS 0 WITH HEADER LINE,
          lt_object_header   LIKE solisti1   OCCURS 0 WITH HEADER LINE,
          l_cnt TYPE i,
          l_sent_all(1) TYPE c,
          lw_doc_data LIKE sodocchgi1.
  l_email               = uv_email.
  l_mtitle              = uv_mtitle.
  l_format              = uv_format.
  l_attdescription      = uv_attdescription.
  l_attfilename         = uv_filename.
  l_sender_address      = uv_sender_address.
  l_sender_address_type = uv_sender_addres_type.
Fill the document data.
  lw_doc_data-doc_size = 1.
Populate the subject/generic message attributes
  lw_doc_data-obj_langu = sy-langu.
  lw_doc_data-obj_name  = 'SAPRPT'.
  lw_doc_data-obj_descr = l_mtitle.
  lw_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
  CLEAR lw_doc_data.
  READ TABLE ut_attach INDEX l_cnt.
  lw_doc_data-doc_size =
     ( l_cnt - 1 ) * 255 + STRLEN( ut_attach ).
  lw_doc_data-obj_langu  = sy-langu.
  lw_doc_data-obj_name   = 'SAPRPT'.
  lw_doc_data-obj_descr  = l_mtitle.
  lw_doc_data-sensitivty = 'F'.
  CLEAR lt_attachment.
  REFRESH lt_attachment.
  lt_attachment[] = ut_attach[].
Describe the body of the message
  CLEAR lt_packing_list.
  REFRESH lt_packing_list.
  lt_packing_list-transf_bin = space.
  lt_packing_list-head_start = 1.
  lt_packing_list-head_num = 0.
  lt_packing_list-body_start = 1.
  DESCRIBE TABLE ut_message LINES lt_packing_list-body_num.
  lt_packing_list-doc_type = 'RAW'.
  APPEND lt_packing_list.
Create attachment notification
  lt_packing_list-transf_bin = 'X'.
  lt_packing_list-head_start = 1.
  lt_packing_list-head_num   = 1.
  lt_packing_list-body_start = 1.
  DESCRIBE TABLE lt_attachment LINES lt_packing_list-body_num.
  lt_packing_list-doc_type   =  l_format.
  lt_packing_list-obj_descr  =  l_attdescription.
  lt_packing_list-obj_name   =  l_attfilename.
  lt_packing_list-doc_size   =  lt_packing_list-body_num * 255.
  APPEND lt_packing_list.
Add the recipients email address
  CLEAR lt_receivers.
  REFRESH lt_receivers.
  lt_receivers-receiver = l_email.
  lt_receivers-rec_type = 'U'.
  lt_receivers-com_type = 'INT'.
  lt_receivers-notif_del = 'X'.
  lt_receivers-notif_ndel = 'X'.
  APPEND lt_receivers.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data              = lw_doc_data
      put_in_outbox              = 'X'
      commit_work                = 'X'
    IMPORTING
      sent_to_all                = l_sent_all
    TABLES
      packing_list               = lt_packing_list
      contents_bin               = lt_attachment
      contents_txt               = ut_message
      receivers                  = lt_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.
Message was edited by:
        Amit Kumar

Similar Messages

  • How do I add text messages to my icloud account

    How do I add text message to my online icloud backup account?

    Hello mawardjr,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    iCloud: iCloud storage and backup overview
    http://support.apple.com/kb/PH12519?viewlocale=en_US
    Here’s what iCloud backs up:
    Purchased history for music, movies, TV shows, apps, and booksYour iCloud backup includes information about the content you have purchased, but not the purchased content itself.
    Photos and videos in your Camera Roll
    Device settings
    App data
    Home screen and app organization
    iMessage, text (SMS), and MMS messages
    Ringtones
    Visual Voicemail
    Have a nice day,
    Mario

  • How do I forward text messages to my email?

    How do I forward text messages to my email? I watch my email inputs. It would be convenient to have announcements of text messages arrive via email. Oherwise I have to login to comcast every time I want to find out about text messages. Being of the text-message-illiterate generation, I get very few text messages. So checking for them is mostly futile. If they were forwarded to my email, I would not have to look in two different places.  

    After considerable poking around I found the right preferences page. I have forwarded ny text messages to my email !

  • How do i add a photo to an email as an attachment and not an image?

    How do I add a photo to an email as an attachment? Everytime I try to and the attachment it puts the photo in the email as an image not a file attachment.

    Control+Click or right click on the image in the email and select 'view as icon'. Also make sure you have 'Send Windows-friendly attachments' selected in Mail>Edit>Attachments.

  • How do I setup an automatic daily email with PDF attachment?

    I would like to setup an automatic daily e-mail (that will send every day around 6 AM), with an PDF attachment retrieved from a web URL.  The web URL is constant (that is the PDF file name never changes).    Any ideas?  I've messed around with automator with poor results at best.  Thanks in advance!
    P.S..... Apologies if this is in the wrong forum!

    Just one specific email addres... myself. 
    There is an online report that is updated every morning at 5:30 AM MST.  The ideal solution would email that document to myself every morning.; thus when I wake up, it's sitting in my inbox (iPhone/Macbook/Gmail, etc.)

  • How do I forward text messages to my email account?

    I was able to do this in the past but cannot figure out how to do it now, running IOS 7.0.3.

    Hello wmann143,
    This is done by holding your finger on the desired message or attachment, then tapping more, finally tapping the .
    iPhone User Guide - Manage conversations
    http://help.apple.com/iphone/7/
    Cheers,
    Allen

  • How do you add a button that will email the PDF its on?

    I need to create a form but they want it to have a button that will open up an email to send that PDF as an attachment or something along those lines.  Is that possible?

    Just a bit more info. E-mail can be used, but has potential problems -- often related to the client machine that you have no control over. Use the data submissions (either FDF or XML) rather than the full PDF so you do not have to deal with Reader Rights and the related license issues. The FDF and XML data files are easily imported into the original form so that you see what the client sees. With those aspects in mind, just go ahead and try one. Be aware that you can add form fields using the form tools in the Advanced Editing tools, OR use the forms menu that will take you to Designer. You might want to try both to see the pros and cons. Be sure to keep such a test simple so you are not wasting time on your final form just for testing. I typically create a 1 page form that has all of the possible fields for such a test.

  • How do I add text to an image?

    I have purchased a template and imported it to Photoshop. I then sliced the template into sections, saved it for web and opened the index file in dreamweaver. My questions is, how do I add text to the images? I want to add the text content, within the boxes on the template, but because they are exported as images from Photshop I can't seem to do it...So let's say there is a box in the middle of the template and I want it to say, Services at the top and below that have a little information about the services offered with a "read more" button at the bottom. I have exported the template out of photoshop with text added and with the boxes empty. I tried to add the text in dreamweaver but couldn't. When I export the sliced template out of photoshop with the text already included, it does show up in Dreamweaver, however it is not in html and I would like it to be for SEO purposes. Forgive me if this question is silly or already answered, I have looked everywhere and couldn't find the answer.
    Thanks in advance to anyone that can help.

    Hi,
    I prefer to use tables for that. For example (First of all you have to store this new file):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>AddedText</title>
    </head>
    <body>
    <table width="40%" border="4">
      <tr>
        <td>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </td>
      </tr>
      <tr>
        <td align="center" valign="top"><div align="center"><img src="yourPicture.jpg" alt="image 01" width="127" height="33" /></div></td>
      </tr>
      <tr>
        <td>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </td>
      </tr>
    </table>
    </body>
    </html>
    Here I took a table with only one column, you can modify my choice.
    There is so too a possibility to use a complete flow text around a picture. If you like that, please give me a shout.
    About the story "hotspots" look here where I tried to give an answer a short while ago: http://forums.adobe.com/message/2700306#2700306
    Hans-G.

  • How do i add text to my photos?

    How do i add text to my photos - previously you could do this on iphoto

    Many users find the excellent and highly-recommended BorderFX more than meets their needs.
    A couple of things to note:
    - "Photos" misleads us into an understanding of what we manipulate with our computers that differs from what our computers are programmed to manipulate.  Within Aperture, you have Images (called, imho confusingly, also Versions and also Photos); outside of Aperture you have image-format files that you see listed in the Finder and use in other programs.  BorderFX lets you overlay text and watermarks, and add borders, to Images in Aperture.  When you do this, a new file is created and automatically imported (it becomes a new Original).  You can also export via BorderFX, in which case a file based on your Image and the changes you've set in BorderFX is saved to the location (outside of Aperture) that you specify.
    - Adding text to an Image is a _graphics_ operation, and not a _digital camera file_ operation:  it is outside the remit of Aperture, which hews to being a photographer's non-destructive RAW digital camera file storage and development workspace.  You use Aperture to store, organize, and develop (make as good as possible for a particular use) digital camera files.  When you need a new graphics file, you (generally) export your Image from Aperture, and create new graphics files using a graphics program (e.g.: Photoshop, Pixelmator, GIMP, etc.).  Graphics programs are built from the ground up as compositors.  Aperture does almost no compositing.  BorderFX is a slick, purpose-driven compositing plug-in.

  • How do i add text from a pc to iphone

    how do i add text from a pc to iphone
    like saved docs in microsof office

    You have to first install a document management app such as "Pages" or such on your iPhone.  Search the App store for one; there are many, some Free.
    Hope this helps

  • How do i get text messaging through my macbook pro?

    how do i get text messaging through my macbook pro?

    Welcome to Apple Support Communities
    If you have an iPhone, iPad or iPod touch and you use iMessage, you can use it in your Mac if you want. OS X Mountain Lion includes Messages, that allows you to use iMessage.
    First, check that your computer is supported > http://www.apple.com/osx/specs If so, open  > About this Mac, and see what OS X version you have:
    10.5 or older: you have to upgrade first to Snow Leopard > http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    10.6 or 10.7: open  > Software Update, and install the most recent version. Then, open the App Store and purchase OS X Mountain Lion.
    10.8: you are already using OS X Mountain Lion, so open the Messages app.
    While OS X Mountain Lion is being downloaded, make a backup of your files and check that your apps are compatible > http://www.roaringapps.com
    If you aren't referring to iMessage, you can't send text messages in your computer

  • How can i add text to a photo in iphoto

    How can i add text to a photo in iphoto?

    Have a look at this discussions page.   ...
    how to add a text to a photo in iphoto?: Apple Support Communities
    Depends to some degree on what iPhoto version you are running but on the  whole this covers most.

  • How can i add text to photo in iphoto?

    How can I add text to photo in iphoto without having lion or mtn lion?

    You can't add text to a Photo in iPhoto. You need an external editor for that:
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate. You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • How to send a text message to a group of people and save the list for next time?

    how to send a text message to a group of people and save the list for next time from an iphone 4s?

    Hey there ipremacha,
    It sounds like you need to enable Text Message Forwarding on your iPhone for your iPad to send MMS/SMS messages through your phone.
    Connect your iPhone, iPad, iPod touch, and Mac using Continuity
    Go to Messages > Text Message Forwarding, and enable the device(s) you would like to forward messages to.
    Your Mac, iPad, or iPod touch will display a code. Enter this code on your iPhone to verify the SMS feature.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • How can I disable Text Messaging on my Iphone?

    How can I disable Text Messaging on my Iphone -- so I do not receive any texts. I do not have nor currently want an AT&T text plan, and I really don't want to be charged .20 for the text messages that will inevitably be sent my way from friends & coworkers who do not know I don't want texts.
    AT&T had a link only for blocking spam texts, but I don't think this will stop standard SMS texts.
    Anyone do this? Does this involve a call to AT&T. There must be a way to disable it, no?
    Thanks in advance!
    Message was edited by: motifone

    You would have to ask AT&T if they can turn off your text capabilities.

Maybe you are looking for

  • Tables for Campaign in marketing

    Hi, Has anybody got a list of tables for CRM Marketing ? We are especially looking for a table containing the territory id within a campaign and another one for identifying the hierarchy level of marketing project elements. Thanks, Tunde and Damaris

  • Can't export to PLD with CNTR_BCD_SDC PLD component.

    Hello all, I'll be brief here. I've designed a 0-99 counter with a next and reset button for a digital electronics class I'm in. However, I am not able to export the document to the PLB board (basically get the .bit file to program the FPGA board I h

  • Report drilldown in different dimension

    Company hierarchy is split in to 3 regions.( A,B,C) Under each regions there are 10 company each (approx). Reprting requirement is such that on each region client  wants to drilldown uniquely and see the data either by product, or functional area or

  • I did something and now I don't have the tool bar

    I installed version 4 of Safari, which was great at first, I right clicked the tool bar to do something and clicked hide/remove tool bar and now I can't figure out how to get it back... Please help.

  • Close sidebar in Safari

    How to close the sidebar in Safari?