Smartforms: How to CC email & Include a few lines of Text in Body of email?

I have created a smartform and have it outputting PDf documents and sending then via e-mail and it all works great.  Except u2026 now I would like to CC someone and also have a few lines of text in the e-mail.  Does anyone have any ideas?
Here is my code:
IF p_mail = 'X'.
    wa_ctrlop-device = 'MAIL'.
    PERFORM mail_recipient_object.
    PERFORM mail_sender_object.
    PERFORM mail_appl_object CHANGING g_mail_app_obj.
  ENDIF.
  LOOP AT my_table.
    CONCATENATE 'ECS' comp_year izhr_emp_comp_summary-emp_lname INTO wa_outopt-tdtitle separated by space.
    CALL FUNCTION func_mod_name
      EXPORTING
        CONTROL_PARAMETERS      = wa_ctrlop
        MAIL_APPL_OBJ           = g_mail_app_obj
        MAIL_RECIPIENT          = email_recipient
        MAIL_SENDER             = email_sender
        OUTPUT_OPTIONS          = wa_outopt
        USER_SETTINGS           = u2018Xu2019
      IMPORTING
        DOCUMENT_OUTPUT_INFO    = document_output_info
        JOB_OUTPUT_INFO         = t_otfdata
      TABLES
        I_MYTABLE                 = imy_table
      EXCEPTIONS
        FORMATTING_ERROR        = 1
        INTERNAL_ERROR          = 2
        SEND_ERROR              = 3
        USER_CANCELED           = 4
        OTHERS                  = 5.
   ENDLOOP.
Determines the Recipent of the E-Mail
FORM mail_recipient_object.
  CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
    EXPORTING
      ip_mailaddr       = email_address     "E-mail Addr:Input Screen
      ip_type_id        = 'U'               "Internet Address
    IMPORTING
      ep_recipient_id   = email_recipient   "Recipient Obj Key
    EXCEPTIONS
      invalid_recipient = 1
      OTHERS            = 2.
  IF sy-subrc <> 0.
    MESSAGE e531(0u) WITH text-003.                      "Error E-Mailing
  ENDIF.
ENDFORM.    "mail_recipient_object.
*Sender of E-mail
FORM mail_sender_object.
CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
    EXPORTING
      ip_sender      = sy-uname             "User Logged in
    IMPORTING
      ep_sender_id   = email_sender
    EXCEPTIONS
      invalid_sender = 1
      OTHERS         = 2.
  IF sy-subrc <> 0.
    MESSAGE e531(0u) WITH text-e15.                      "Error E-Mailing
  ENDIF.
ENDFORM.    "mail_sender_object.
*Creates Mail Application Object to E-Mail Smartform
FORM mail_appl_object CHANGING g_mail_app_obj.
  SELECT SINGLE * FROM soud WHERE sapnam LIKE sy-uname AND deleted = ' '.
  IF sy-subrc NE 0.
    CALL FUNCTION 'SO_USER_AUTOMATIC_INSERT'
      EXPORTING
        sapname            = sy-uname
      EXCEPTIONS
        no_insert          = 1
        sap_name_exist     = 2
        x_error            = 3
        sap_name_not_exist = 4
        OTHERS             = 5.
  ENDIF.
  CLEAR sofmfol_key.
  sofmfol_key-type = 'FOL'.
  sofmfol_key-year = soud-inbyr.
  sofmfol_key-number = soud-inbno.
  bor_key = sofmfol_key.
  IF NOT bor_key IS INITIAL.
    swc_create_object folder 'SOFMFOL' bor_key.
    IF sy-subrc = 0.
      swc_object_to_persistent folder g_mail_app_obj.
      IF sy-subrc NE 0.
        CLEAR g_mail_app_obj.
      ENDIF.
    ENDIF.
  ELSE.
    CLEAR g_mail_app_obj.
  ENDIF.
ENDFORM.    "mail_appl_object.

Get rid of the smartform-based mail sending code if you can.  That interface is quite old, simplistic, and inflexible (i.e., you can't do what you're asking).  I would use class CL_BCS.  It's especially much easier once you have developed a (custom) standard email wrapper class for sending various types of emails, including smartform-based PDF-attached emails.  You can even go with HTML and dress-up your emails a bit.

Similar Messages

  • HT2500 Apple Email "From," and "Subject" lines do not match body of email

    After on and off problems with the imap server in iCloud the past couple weeks that prevented me from getting my .mac mail anywhere other than on the iCloud website, my inbox has morphed into a jumble of miss-matched Email Subject, From/Sent by, and Email Body.  In other words I will double click on an email that appears to be from my niece, but when it opens it is actually an email from Amazon - or someone else!  I am done with MAIL, but need HELP restoring my inboxes.  I have "Rebuilt" all inboxes but it didn’t repair the problem.  I have since switched to Outlook client for Mac and the problem does NOT occur with Outlook. 
    Ideas?

    I was able to repair this by deleting a specific file - more to come.  I did not have to do a complete restore.
    I will check for my notes and let you know how I fixed the problem.
    I think there is a good chance that Outlook mail for Mac may have been part of the problem.  It requred a rebuild (pulling data from Mail?)

  • How can I make a gray box or gray screen in Pages over a few lines of text?

    How can I make a gray box or gray screen in Pages over a few lines of text?

    Thanks. Almost what I was looking for.
    While that makes for a gray over the lines, it still does not form a box.
    Any other suggestions to form a solid rectangular gray box?

  • How do you change the spacing between lines of text?

    using Dreamweaver 6 how do you change the spcing between lines of text. Not seeing it as a option in the page properties menu.

    Try CSS line-height property.
    Kenneth Kawamoto
    [link removed by moderator]

  • To display few lines of texts in a paragraph in bold in chinese

    Hi,
    I have a requirement to display smartform output in English and Chinese.In a paragraph few lines have to be displayed in bold in chinese.
    I have created a standard text in chinese languge to diplay this text.In the standard text,few lines have to displayed in bold.How to achieve this?

    Dear Hema,
    To me, I think you create a text node to put your chinese in it and create a character node in smartstyles for bold some paragraph.
    please check
    regards,

  • Output skips few line item texts

    Hi All,
    In smartform output for purchase order it displays line item and their text in main window.
    For some PO's it works fine and for some it skips few lines of some line item text.
    In debugging i could find all line items populated.
    Steps Taken:
    1) In table defination i checked no page-break. Problem is it works fine but the first page comes blank and rest is fine.
    Is there any way to resolve this?
    Thanks,
    M Mishra

    Hi All,
    In smartform output for purchase order it displays line item and their text in main window.
    For some PO's it works fine and for some it skips few lines of some line item text.
    In debugging i could find all line items populated.
    Steps Taken:
    1) In table defination i checked no page-break. Problem is it works fine but the first page comes blank and rest is fine.
    Is there any way to resolve this?
    Thanks,
    M Mishra

  • Receiving attachments as jarbled text in body of email.

    Is there a setting in the Mail preferences that deals with receiving attachments in the body of the email? I have been trying to send an xls. attachment to a Tiger based imac and they get the file as 200 lines of text instead of a file. Is there a setting in the computer that can remedy this?
    imac   Mac OS X (10.4.7)  

    No responses yet; any idea? :)

  • SMARTFORMS: how to link two varibles in one line.

    Hi guys,
    I am experiencing a problem with SMARTFORMS.
    I have a string longer than 255 characters. I want to print it in a smartforms, but due to the limitation in the characters I have to separate the string in two strings.
    My question is the next, how can I put together in the same line the two variables?
    In the smart form I put someting like that:
    <i>var1.
    var2.</i>
    So, then the PDF appears something like that
    <i>content of varible1 is in this line
    content of variable 2 makes an not desired return carriage</i>
    and what i want is the next :
    <i>content of varible1 is in this line content of variable 2 makes an not desired return carriage</i>
    That is, all together without the return of carriable.
    Can anybody help me to solve this?
    Thanks a lot.

    Hi,
        Its too simple, just put both variables next to each other. like...
    <var1><var2>
    This will print continous order.You can even put fullstop in end( like : <var1><var2>. )
    FYI:
    If you want to give separators in between, then you can use. like ...
    for date,
    <month>-<date>-<year>
    This will display : 06-21-2007
    Reward points if helpful
    Regards,
    Seema

  • How do I upload only a few lines of a file from the presentation server?

    Hi there guys,
    I'd like to upload the contents of a file on my HD (presentation server) to an internal table. I know this can be achieved by using the GUI_UPLOAD function module. But what if I only want to upload a part of the file, not the whole thing? Like the first 100 bytes or 10 lines or something like that. Some files are just way too big to upload them as a whole. I tried using the OPEN DATASET statement, but that seems to work only for files on the application server. If I try to open 'C:     emp     est.txt' (for example) with OPEN DATASET, I get an error. Do I have to put the filename differently or am I totally wrong with OPEN DATASET? I'm kinda stuck here and I'd appreciate your help.
    Cheers,
    Björn.

    Hi Shashi,
    thanks for your reply. If I understand you correctly, this means I will have to wait for GUI_UPLOAD to upload the whole file and afterwards filter into another table. I don't want to upload the whole thing because it's that big, I'd like to only upload a portion of it in the first place. Can this be done?
    Cheers,
    Björn.

  • How do I get rid of various lines around text boxes when using navigation panes

    How can I get rid of these various lines that are displaying sporatically around different text boxes . . . but only when the navigation panel is displaying?  I previously had the issue and changed the text box properties to no fill.  It fixed the problem in the document with no navigation panel, but once the navigation panel is displayed the lines appear.  And yes, I fixed the text box properties before creating the bookmarks for the navigation panel.

    Every device, browser and browser version has its idiosyncrasies.
    Just using a stroke and a drop shadow should not have been enough to require Muse to convert the page fill to an image. Were/are there also other effects on the page? Are the page corners slightly rounded?
    Bevel and Inner Glow definitely require an image to be created. Most other effects/properties do not.

  • How to determine the length of a line of text in a multi line text control

    I am working on a simple widget to compare two snippets of text.  The string controls are side by side with a colum of square bools in between
    the two string controls.
    The Bools line up with the lines of text in each string control.  The Bools are used as a quick indicator that at that line point there is a difference
    between the two string controls.
     There is a slider that allows the user to scroll up and down,  the slider scrolls both string controls simutaneously.
    As the string controls are scrolled I will be comparing the left and right lines of text and reflecting the match status in the Bool Colum.
    The reason I need to know the length of the line of text is so each line can be compared against one another.  It is not as simple as counting the
    col width of the string control and parsing the text because if there is a line return the text will word wrap before before it extends all the way accross the string control, which will cause parsing discrepencies.
    Any suggestions on obtaining the multi line string control text character length would be much appreciated.
    Best Regards
    Tim C. 
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

    Front panel of widget....
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
    Attachments:
    One.vi ‏27 KB

  • How do I add sound to a line of text?

    Here is what I am trying to do: I am putting together a Sunday School lesson. I have a audio file of 24 spoken scripture verses.
    • I copied and pasted the text of the first scripture verse into Keynote and made the text appear when I clicked.
    • I put the 24 verses into iMovie cut the audio at the first verse, deleted the image, the other 23 verses and saved the file.
    • I dragged the audio file into Keynote, it appeared as a black rectangle and I made it automatically start when the text appears.
    This works and does what I want to accomplish. I can make the black rectangle very small or hide it behind a graphic. However there must be a better way to do the same thing.

    First I exported a segment of a sound file out of iMovie, which made a QT sound file and put it in my Keynote presentation. That works fine but shows up on the Keynote screen as a black rectangle. I found that I could assign it a size and position in Key note so the rectangle is not a problem.
    I wanted to see if there is a better way to create sound files for Keynote.
    I dragged a segment of a sound directly from iMovie to Keynote. The file appeared as a speaker icon. And they seemed to work fine, however this morning they are not working, so I guess that was a bad idea.
    This morning I dragged the same segment of a sound file out of iMovie to the desktop and it made a "aiff" file out of it. I dragged it into Keynote and it seems to work. However, I compared the size of the aiff file to the QT file. the aiff file is 40.6 MB and the QT file is only 96 KB.
    I guess from this the best way that I know is to export QT files unless someone has a better idea.

  • How to extend MobileIconItemRenderer to display multiple lines of text?

    Hi,
    I am using Flex hero which has the added Mobile APIs.
    Has anyone been able to extend the MobileIconItemRenderer to display multiple lines of text.
    The current version of the MobileIconItemRenderer only displays 4 things: an image on the left, a label on the top to the right of the image , a message below the lable, which could be a sentence that can take multiple lines and an icon on the right.
    So I would like to replace the messageField content with multiple single lines , one after the other.
    Has anyone does this?
    Otherwise, i suppose I would have to implement my own ItemRenderer if I want to customize the location of the components inside the item?
    thank you

    Hi,
    I am using Flex hero which has the added Mobile APIs.
    Has anyone been able to extend the MobileIconItemRenderer to display multiple lines of text.
    The current version of the MobileIconItemRenderer only displays 4 things: an image on the left, a label on the top to the right of the image , a message below the lable, which could be a sentence that can take multiple lines and an icon on the right.
    So I would like to replace the messageField content with multiple single lines , one after the other.
    Has anyone does this?
    Otherwise, i suppose I would have to implement my own ItemRenderer if I want to customize the location of the components inside the item?
    thank you

  • How copy just line in text file with cat? (SOLVED)

    Hi.
    How i make to copy just only line in text file with cat?
    For example:
    [:0.0]
    file=/home/Arch/./.wallpaper.png
    mode=0
    bgcolor=# 0 0 0
    I want copy just "/home/Arch/./.wallpaper.png" part.
    Actually i want create a shortcut for last wallpaper set from Nitroget, then i put this in SLim background.
    Recently i use hsetroot for wallpaper (~/.wallpaper.png) and i create a shortcut in /usr/share/slim/theme/MYTHEME whith ln -s ~/.wallpaper.png /usr/share/slim/theme/MYTHEME/background.png.
    I want make a same with Nitrogen.
    I now this looks like crazy, but...
    Sorry my English.
    Last edited by kramerxiita (2008-06-04 16:50:48)

    moljac024 wrote:
    kramerxiita wrote:
    moljac024 wrote:How can you make SliM change the background ? You link the theme background to another file ?
    Yes. In theme directory i put background.png shortcut for my wallpaper. So, when a change wallpaper, slim background change too.
    Example:
    ln -s mywallpaper.png /usr/share/slim/themes/default/background.png
    So, Slim background always is my wallpaper.
    So the wallpaper has to be a *.png ?
    No, jpg is possible. But when you create a symbolic link, remember put the extension too. If change png to jpg, change a symbolic link extension.
    But, remember if slim theme directory have background.png and background.jpg, Slim always choice .png. So, put only one this.

  • How to get a scroll pane to scroll as text is appended to it?

    Hi All,
    I have a file management GUI with a JTextArea. As the application processes files, a string is appended to a textarea (in a scrollpane viewport) telling the user when a file has been copied, deleted etc. The problem is that when number of lines of text exceeds the size of the scrollpane the output stays showing the first few lines of text (the scroll bars appear as expected). Is there anyway to get the textarea to scroll automatically so that the latest strings are always displayed?
    Thanks!

    call setCaretPosition(int position) on the JTextArea
    Edited by: tjmerdian on Sep 11, 2008 8:25 AM

Maybe you are looking for