Reg OTR text display in Email as HTML

Is there any function module is there to display the Text in email.

You can use the concept of class  and all to display text.. or use fm SO_SEND*AP11
For class refer the below code.
DATA: send_request       TYPE REF TO cl_bcs.
  DATA: text               TYPE bcsy_text.
  DATA: binary_content     TYPE solix_tab.
  DATA: document           TYPE REF TO cl_document_bcs.
  DATA: sender             TYPE REF TO cl_sapuser_bcs.
  DATA: recipient          TYPE REF TO if_recipient_bcs.
  DATA: bcs_exception      TYPE REF TO cx_bcs.
  DATA: sent_to_all        TYPE os_boolean.
  DATA:lv_fax TYPE ad_fxnmbr,
       lv_filename_cl TYPE sood-objdes.
         Convert the OTF file format ino the PDF format.
        CALL FUNCTION 'CONVERT_OTF_2_PDF'
          IMPORTING
            bin_filesize           = lwa_bin_filesize
          TABLES
            otf                    = lt_otf
            doctab_archive         = lt_doctab_archive
            lines                  = lt_pdf_lines
          EXCEPTIONS
            err_conv_not_possible  = 1
            err_otf_mc_noendmarker = 2
            OTHERS                 = 3.
         get the pdf data into the attachment table .
        CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
          EXPORTING
            line_width_dst              = 255
          TABLES
            content_in                  = lt_pdf_lines
            content_out                 = lt_objbin
          EXCEPTIONS
            err_line_width_src_too_long = 1
            err_line_width_dst_too_long = 2
            err_conv_failed             = 3
            OTHERS                      = 4.
         Refresh the local tables and workareas.
        REFRESH: lt_reclist,
                 lt_objtxt,
                 lt_objpack.
        TRY.
    -------- create persistent send request ------------------------
            send_request = cl_bcs=>create_persistent( ).
    -------- create and set document with attachment ---------------
    create document from internal table with text
            APPEND 'test1' TO text.
            APPEND 'test2.' TO text.
            APPEND 'test3' TO text.
            document = cl_document_bcs=>create_document(
                            i_type    = 'RAW'
                            i_text    = text
                            i_length  = '12'
                            i_subject = 'Electronic Payment Notification' ).
            FIELD-SYMBOLS <fs_x> TYPE x.
            DATA lv_content  TYPE xstring.
            LOOP AT lt_objbin INTO lwa_objbin.
              ASSIGN lwa_objbin TO <fs_x> CASTING.
              CONCATENATE lv_content <fs_x> INTO lv_content IN BYTE MODE.
            ENDLOOP.
            pdf_content = cl_document_bcs=>xstring_to_solix(
                    ip_xstring = lv_content ).
    add attachment to document
    BCS expects document content here e.g. from document upload
    binary_content = ...
            CONCATENATE 'test_' sy-datum sy-uzeit '.pdf' INTO lv_filename_cl.
            CALL METHOD document->add_attachment
              EXPORTING
                i_attachment_type    = 'PDF'
                i_attachment_subject = lv_filename_cl
                i_att_content_hex    = pdf_content.
    add document to send request
            CALL METHOD send_request->set_document( document ).
    --------- set sender -------------------------------------------
    note: this is necessary only if you want to set the sender
          different from actual user (SY-UNAME). Otherwise sender is
          set automatically with actual user.
            sender = cl_sapuser_bcs=>create( sy-uname ).
            CALL METHOD send_request->set_sender
              EXPORTING
                i_sender = sender.
            CALL METHOD send_request->set_status_attributes(
              EXPORTING
              i_requested_status = 'N'
              i_status_mail = 'N' ).
         Fill the receiver for the email with PDF attachemnt.
            CLEAR : lwa_reclist,
                    lwa_lfa1,
                    lwa_adr6.
            READ TABLE lt_lfa1
                  INTO lwa_lfa1
                  WITH KEY lifnr = lwa_reguh-lifnr.
            IF sy-subrc EQ 0.
              READ TABLE lt_adr6
                    INTO lwa_adr6
                    WITH KEY addrnumber = lwa_lfa1-adrnr.
              IF ( sy-subrc EQ 0 )
                AND ( lwa_adr6-smtp_addr IS NOT INITIAL ).
    --------- add recipient (e-mail address) -----------------------
    create recipient - please replace e-mail address !!!
                recipient = cl_cam_address_bcs=>create_internet_address(
                                                 lwa_adr6-smtp_addr ).
              ELSE.
                lv_fax = lwa_lfa1-telfx.
                recipient = cl_cam_address_bcs=>create_fax_address(
                i_country = lwa_lfa1-land1
                 i_number = lv_fax ).
              ENDIF.
            ENDIF.
    add recipient with its respective attributes to send request
            CALL METHOD send_request->add_recipient
              EXPORTING
                i_recipient = recipient
                i_express   = 'X'.
    ---------- send document ---------------------------------------
            CALL METHOD send_request->send(
              EXPORTING
                i_with_error_screen = 'X'
              RECEIVING
                result              = sent_to_all ).
            IF sent_to_all = 'X'.
              WRITE text-003.
            ENDIF.
            COMMIT WORK.
          CATCH cx_bcs INTO bcs_exception.
            WRITE: 'Error Occured'.
            WRITE: 'Error', bcs_exception->error_type.
            EXIT.
        ENDTRY.
       endif.
Thanks
Nabheet

Similar Messages

  • OTR  text display

    i have this code
    htmlb:label for  = "<%= CL_BSP_HAP_DOCUMENT_CS=>C_BSP_INPUT_APPRAISAL_NAME %>"
                     id   = "INPUT_DOCUMENT_DESCR"
                     required = "<%= l_mandatory %>"
                     text ="Document Name"/>
    i need to  make the  translation so that when the client is opened in different language it should display translated version of the
    <b>"Document Name"</b> in that respective language.I gone through some forum threads but could not able to get the out put.
    help me out
    Thanks

    Hi,
    try this:
    Change the Text "Document Name" to
    "<%= otr(ZPACKAGE/DOCUMENTNAME) %>" where ZPACKAGE is the Package of your BSP. Doubleklick on the OTR Element and fill the text.
    After that you can translate the OTR-Text with transaction SE63_OTR.
    Hope this help.
    Best regards
    Renald
    PS: Ooops, Eddy was faster
    Message was edited by: Renald Wittwer

  • IMessage texts displaying as email- can't select my phone #

    Hello,
    I recently went into the Apple store as my iPhone 5 was having some issues. One thing we did was restore my phone from the iCloud. Ever since, all my iMessages are showing to other users as from my email address.
    I have seen prior suggestions to go to "Settings" - Messages "Send and Receive." However, when I go here my phone # is greyed out. I can't delete the email address.

    I was able to find an answer from Apple- I needed to go to "Settings" - iCloud- Delete Account and then re-login into the account.

  • How do you set email so that it is in html instead of plain text on ATT email?

    I would like to view my emails in html but do not know how to change it off of the current settings where it always displays it in plain text. I have att yahoo email.

    The Alt attribute isn't meant to show as a tooltip on hover.
    The Alt attribute is meant to show if the image isn't or can't be displayed.
    The title attribute is meant to show if you hover an image or link.
    *http://kb.mozillazine.org/Image_tooltips_do_not_work
    Some extensions can interfere and disable the tooltip.
    * [[Troubleshooting extensions and themes]]
    * http://www.w3.org/TR/html401/struct/global.html#title title
    * http://www.w3.org/TR/html401/struct/objects.html#alternate-text
    *Popup ALT Attribute: https://addons.mozilla.org/firefox/addon/1933

  • Mail not displaying emails in HTML - With images etc

    Recently aka the last couple of days all my mail accounts in mail have stoped showing all images and HTML coding, casically everything is in plain text.
    I have not changed any settings that I know of and if I log in on .mac the emails display properly with images etc.
    So far I have tried re-building the mail boxes and the display remote images in html option is selected in preferences.
    I would really appreciate it if anyone here can help me as plain text emailing is very annoying.
    Thanks, Luke

    DR T,
    Now that you have reported the results of your test with a New User Account, which you say was successful, we know it is not a problem with the application. You need to do the following:
    Quit Mail, and in the Finder open Home/Library and locate the Mail folder. Control-click over the Mail folder, and choose Duplicate -- then drag the resulting copy to the Desktop for temporary backup. Next, open Home/Library/Preferences and find the com.apple.mail.plist file and drag it to the desktop.
    Relaunch Mail, which will open as though new, and when prompted to import anything DECLINE. Instead, re-enter your account info, and Mail will re-discover the account folders for your accounts, and all should be well.
    Ask any needed questions, and keep us posted. It would appear your preferences, or something about your normal User Account are corrupt, or incorrect. This test a refresh of preferences, much like what you did when setting up the New User Account.
    Luke, this may not be what you need, but will do no harm. But please don't feel compelled to try this yet.
    Ernie

  • No Page Displayed in the window (HTML)  when a WItem is Executed from Email

    Hi Workflow Masters!
    I have a problem regarding my Email Notification regarding SWNCONFIG.
    When a wokitem received thru Email (Lotus) is Executed, a Window opens and <i>supposedly</i>, the workitem will be displayed. However, there is no page displayed in the window (html) for execution.
    I haven't configured yet a Universal Worklist for my SWNCONFIG. Am I right that I have to configure a UWL or is there any other option where a workitem is Displayed and could be executed?
    Please send me a link about UWL or other solution.
    We are on Ecc6 and I used SWNCONFIG for the extended notification thru SWN_SELSEN report.
    Please share some words on my issue.
    Thanks for the help.

    Well, the UWL is not 100% necessary.
    But let's start from basics. This all depends on what kind of application is supposed to open, when you click the item. What happens if you click the item in Business Workplace? Is there some web based application (web dynpro?), or is there just a normal SAP transaction?
    In the extended notification configuration you can define that "where" the application should start. For example if you have a web dynpro application, you can define the host of web dynpro in SWNCONFIG (I think that it was in the general settings). Or if it is a transaction, you could open the transaction in webgui.
    Another option is that you remove the links from the mail (if you don't get them working). This is also possible, just configure it in SWNCONFIG or SWNADMIN. For example you can modify the text of the mail to "You have new work items in Business workplace, please go there and process the items...", and no links in mail. => The users are just informed to process their items, but they cannot do it directly from the mail. Of course this is not that  cool...

  • How to view my email in HTML format instead of Plain Text format?

    I receive plenty of HTML format emails everyday.
    but when I check those emails on iPhone, all emails were automatically converted to Plain Text format.
    I wish to view my emails in HTML format (just as it shown in Outlook)
    with graphic (jpep loaded, instead of attachment), and Text formatting.
    Can anyone suggest me any solution?
    or do Mail apps in iPhone does not support HTML format?
    Pls guide.
    Thx.

    To get a source code for jsp mail visit http://www.jspinsider.com/tutorials/jsp/javamail.view

  • Mail doesn't display full email text, only displays the subject line

    Mail doesn't display full email text, only displays the subject line.
    My preview shows first three lines of email, but when I chose the email specifically mail doesn't display any lines of text.  Been this way for about ten days.  Please help.  Ben

    Awesome.  Rebooting the phone worked.  I had never turned the phone off before (for the next guy - you hold down the "sleep" button for longer than you'd think and that'll do a full shutdown).  thank you for your help.

  • OTR text not displayed correctly

    Hi,
    I have view in which there are 3 tables with 3 colums each.
    All the data binding etc is fine and it is displayed correctly in the portal.
    My issue is with the OTR texts maintained. The text for column headings in the table is binded with the OTR texts (created through transaction sotr_edit) $OTR:<package>/<alias> in properties value field.
    We have an option to change the language in the portal. So when a language is selected, the texts for these column heading is displayed in the corresponding language selected.
    But for some langauges selected, the texts show some random language instead of the one selected.
    Any idea on how this can be corrected.

    Thanks for the reply Thomas.
    And sorry for delayed reply.
    I could see that the binding of the OTR was not correctly done with the texts.
    After i made the changes, the languages were displayed correctly.
    My concern here is that i have made the changes as this is a custom development and the issue was solved.
    But this same issue is seen in a standard component where the text was not displayed in the language selected and this issue is coming only for the users assigned to a particular role. And for all others, the texts are displayed with the language selected.
    Any inputs on this would be helpful.
    Thanks.

  • Map html tags to text display in jeditorpane

    hi,
    i am looking for some way to map the position of a tag in a html i/p to the actual display in the JEditorPane... below are the details of why i need this feature...
    i have a JEditorPane whose text is set from a html file i/p... and i have a JTree which is like a table of contents for the content in the JEditorPane... when i click on any of the jTree nodes, i want to scroll the JEditorPane to the position corresponding to that element in the text...
    currently i am doing a string search (for ex, "1. My_First_Heading: ") and getting the position from the editorPane.getDocument().getText() method and then using a modelToView() to determine the scrollBar position...
    but i would like to have a more correct searching method, since the string could appear at many places... i would like to have some anchor or some tags defined at the place of each table of content element in the JEditorPane's html i/p... then search for those tags and somehow map the position in the html to the position in the display...
    is there a way i can do this...
    thanks,
    prasuna

    Hi Tarabyte,
    Actually wanted to know how to map the postion of any tags in the html to the display in the jeditorpane...
    Hi StanislavL,
    Thank you very much for your answer... it solved my problem... awarded the 5 duke dollars to you for that...
    Cheers,
    Prasuna

  • Html newsletters displayed in Email

    This seems like an easy topic but it is not to be found in
    these forums. I contantly get emails that display an html page when
    opened. They are linked to the sender's site to get the images. I'm
    on a Mac, how do I make my email newsletter display in emails my
    clients get? I have the newsletter up on a server now ready to
    download but how do I get the viewers email program to download and
    display it automatically? I'd rather they don't have to click on a
    link to see it.

    1. Upload all of your cotent to the site.
    2. navigate to that page.
    3. click ctrl +A to select the entire page.
    4. now click ctrl + c to copy the page.
    5. now paste it into your email and your done.
    Note: Make sure your images have the full url reference to
    them. You can do this quickly with the find/replace function.
    So your images should go from:
    /images/imagename.jpg
    to
    http://www.yoursitename.com/images/imagename.jpg

  • PO output email text displayed incorrect with #

    Hi All,
    When sc is created and resp PO is created and email sent to the vendor.
    Her the problem is the text in the email is displayed with # as
    " Please find the purchase order XXXXXXXXXX entitled kumar#08.12.2011#05:04."
    Please tell me how to solve this issue.
    Kumar

    Dear Kumar,
    It is possible that this issue is happening due to cusomized smartforms. In order to check make sure that standard smartforms BBP_OUTPUT_COVER is being used and retest the issue.
    Kind Regards,
    Conor Harkin

  • Reg Embedding table into standard email text

    Hi All,
    We have requirement wherein we need to embed a table that contains a list of employees and their details along with some standard text in the email. Need some pointers on how this can be done. Is there a way to embed the table into the standard text email?
    Thanks & Regards,
    Sujana Reddy Kumbham

    Are trying to load thru flat file? If yes, you need to include one field for Language also. Fill the value EN for all the records.
    If you are pulling the data thru R3, make sure that this field (Olangu) is mapped correctly.
    Thanks...
    Shambhu

  • Unable to receive email in HTML format on BB Torch 9860 with BIS

    I recently purchased BB Torch 9860 with OS 7 and configured by personal and work email on BIS. I am receiving emails only in text format. In some emails with images that have hyperlink, I just see a link and images not displayed. All the images comes as an attachment in the email. My friend having another BB Torch is able to view emails as HTML. But he is with BES. 
    Is there any solution for my issue? I am not receiving any options in the email preference to enable HTML format for emails.
    Appreciate if anyone could help me with this.
    Regards,
    Midhun

    Hi Midhun,
    Welcome to the Community
    To help you with the issues you're having, on your Blackberry go to your mailbox, press menu, choose options, then Email Preferences and check the box for Enable HTML Email, Download Images Automatically and Confirm External Image Download. The screen may look like the screenshot below:
    For more information please check these links:
    Blackberry Tips and Tricks
    Blackberry 101
    Enjoy!
    Ron
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up Blackberry Battery Saving Tips | Follow me on Twitter

  • From:, To: and Subject: end up in email body - html email using sendmail

    To the experts and the experienced:
    I am trying to send email in html format from a Korn shell script on Solaris 10. The
    email does get delivered and is displayed html-formatted, except that the From:, To: and
    Subject: lines are displayed in the email body, rather than in the email header. I
    would appreciate it very much if experts and the experienced could shed some light.
    I use this command line to send the email:
    sendmail -t [email protected] < testmail
    The content of the testmail file is as follows:
    MIME-Version: 1.0
    Content-Type: multipart/alternative; boundary="frontier"
    --frontier
    Content-Type: text/plain
    From: [email protected]
    To: [email protected]
    Subject: test html email
    This is a plain-text email.
    Newman
    --frontier
    Content-Type: text/html
    From: [email protected]&lt;br/&gt;
    To: [email protected]&lt;br/&gt;
    Subject: test html email&lt;br/&gt;
    &lt;h3 align="center"&gt;This is a html email&lt;/h3&gt;
    &lt;p&gt;This is the paragraph.&lt;/p&gt;
    &lt;p&gt;Newman&lt;/p&gt;
    frontier\
    The email received in Microsoft Outlook (html-formatted), looks like this:
    From:         [email protected]
    To:
    Subject:
    From: [email protected]
    To: [email protected]
    Subject: test html email
    <h3 align="center">This is a html email</h3>
    <p>This is the paragraph.</p>
    Newman
    Two things in the email need fixing:
    1. All the From:, To: and Subject: lines are treated as part of the email body and are
    displayed in the email body, rather than in the header as I wanted them to.
    2. The From: line in the email header is the actual sender, not the Bursar.Office as I
    put in the testmail file. This can be easily done when using SMTP (telnet to port 25)
    or mailx.
    How do I tell sendmail/the email client to display in the intended places the From:,
    To: and Subject: information that I specified in the testmail file?
    Many thanks!
    Newman

    I searched in google and found a solution:
    mailx -r [email protected] -s "test html email
    content-type: text/html" john.doe < testmail
    The testmail file is a pure html file with one <html></html> element. The content embedded in this element is the body of the email, with all the usual tags you would like to use: <head>, <style>, &lt;h3&gt;, &lt;p&gt;, &lt;ul&gt;, etc.
    The trick is piggy-backing a content-type with the subject. It seems to me this it to get the content-type into the email header rather than into the body. And that was exactly the problem I had.
    The command lines was executed on Solaris 10. It works.
    Hope this could be useful to someone who would encounter the same problem.
    Newman

Maybe you are looking for