How to place a Logo, Picture ..etc in the main body of an email.

My requirement is to send an email having a logo as the header. The logo must be placed in the main body of the email and NOT as an attachment.
I have tried out the following but it gives garbage:
REPORT  ztest_pratik01.
INTERNAL TABLES
DATA:
      i_objpack   TYPE STANDARD TABLE OF sopcklsti1,
      i_objtext   TYPE STANDARD TABLE OF solisti1,
      i_objbin    TYPE STANDARD TABLE OF solisti1,
      i_hex       TYPE STANDARD TABLE OF solix,
      i_receivers TYPE STANDARD TABLE OF somlreci1.
WORK AREAS
DATA: wa_email_doc TYPE sodocchgi1,
      wa_objpack   TYPE sopcklsti1,
      wa_objtext   TYPE solisti1,
      wa_hex       TYPE solix,
      wa_receivers TYPE somlreci1.
CONSTANTS
CONSTANTS: c_x     TYPE flag   VALUE 'X',
           c_u     TYPE char1  VALUE 'U'.
DATA: v_body TYPE i.
START-OF-SELECTION
START-OF-SELECTION.
  PERFORM sub_get_logo.
END-OF-SELECTION
END-OF-SELECTION.
  wa_email_doc-obj_name = 'TEST Mail'.
  "Mail Subject
  wa_email_doc-obj_descr
  = 'TEST'.
  v_body = LINES( i_hex ).
Creating the entry for the compressed document
*--(1): Creating entry for the Main Mail body text in itab i_objtext
wa_objpack-transf_bin = 'X'.
  " Starting index(row) For header information in the itab i_objpack
  wa_objpack-head_start = 1.
  " No of lines for the header information in itab i_objpack
  wa_objpack-head_num   = 1.
  " The row(index) of the itab i_objtext from where the Mail Body starts
  wa_objpack-body_start = 1.  "Skipped the first Line
  " The number of lines in the Mail body
  wa_objpack-body_num   = v_body.  "We have two lines from the 2nd row
  " Document type. There are also whole lot of other options
  wa_objpack-doc_type   = 'RAW'.
  wa_objpack-obj_name   = 'LOGO.BMP'.
  wa_objpack-obj_descr  = 'MAIL BODY'.
  wa_objpack-obj_langu  = ' '.
  " In this case one can skip this. Normally ist calculated as
  " no of linex * 255
  wa_objpack-doc_size = v_body * 255.
  APPEND wa_objpack TO i_objpack.
  CLEAR wa_objpack.
*Building the recepient list
Receipient information
  wa_receivers-receiver = sy-uname.
  wa_receivers-rec_type = 'B'. "To SAP Inbox
  APPEND wa_receivers TO i_receivers.
  CLEAR wa_receivers.
  wa_receivers-receiver = mail id.
  wa_receivers-rec_type = c_u.
  APPEND wa_receivers TO i_receivers.
  CLEAR wa_receivers.
Finally Send the Document
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = wa_email_doc
      put_in_outbox              = 'X'
      commit_work                = 'X'
    TABLES
      packing_list               = i_objpack
      contents_bin               = i_objbin
      contents_txt               = i_objtext
      contents_hex               = i_hex
      receivers                  = i_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.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
*&      Form  SUB_GET_LOGO
      text
-->  p1        text
<--  p2        text
FORM sub_get_logo .
  DATA: graphic_url(255),
        graphic_refresh(1).
  DATA: graphic_size TYPE i.
  DATA: l_graphic_xstr TYPE xstring,
      l_graphic_conv TYPE i,
      l_graphic_offs TYPE i.
  DATA: BEGIN OF graphic_table OCCURS 0,
        line(255) TYPE x,
      END OF graphic_table.
  CLEAR: graphic_url,
         graphic_table[].
  CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
    EXPORTING
      p_object  = 'GRAPHICS'
      p_name    = 'Z_LOGO'
      p_id      = 'BMAP'
      p_btype   = 'BMON'
    RECEIVING
      p_bmp     = l_graphic_xstr
    EXCEPTIONS
      not_found = 1
      OTHERS    = 2.
  if sy-subrc = 1.
    message e287 with g_stxbitmaps-tdname.
  elseif sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    exit.
  endif.
  graphic_size = XSTRLEN( l_graphic_xstr ).
  CHECK graphic_size > 0.
  l_graphic_conv = graphic_size.
  l_graphic_offs = 0.
  WHILE l_graphic_conv > 255.
    graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
    APPEND graphic_table.
    l_graphic_offs = l_graphic_offs + 255.
    l_graphic_conv = l_graphic_conv - 255.
  ENDWHILE.
  graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
  APPEND graphic_table.
  LOOP AT graphic_table.
    wa_hex = graphic_table.
    APPEND wa_hex TO i_hex.
  ENDLOOP.
ENDFORM.                    " SUB_GET_LOGO
Any Ideas how to do the same???

Hi ,
I advice you to raise a OSS Note so that SAP Can suggest what needs to be done in this case .
Hope my suggestion is helpful.
Thanks & Regards
Pradeep Akula .

Similar Messages

  • How to place a  logo in the BEX

    Hello All,
    I am new to the BW.Could u pl.explain how to place a logo
    in the BEX.
    Thanks & regards
    NSB

    Hi Suresh,
    Are you asking about BEx Excel based reports, or the web reports..there are different ways to go about it.
    For the excel reports youc an create a workbook template and place the logo along with other custom settings for color, font etc.
    For the web based reports you would have to place the logo in your web template.
    Hope this helps...post back if you need more information.

  • Light room five keeps crashing my computer uninstalled it downloaded a fresh copy it works fine how do I get my pictures out of the old copy to the new one?

    Light room five keeps crashing my computer, uninstalled it downloaded a fresh copy it works fine. How do I get my pictures out of the old copy to the new one?

    Apparently you have two catalogs now, one from each installation. If you did importing, tagging and editing during the first installation, that will all be in the first catalog. Find the first catalog - it is a file with the suffix .lrcat and the default place for LR to put it is usually your Pictures folder - and (with LR closed) double-click on it. LR will launch with catalog #1 active.

  • Getting pictures etc from the blackberry link

    I am very frustrated with trying to find information on how to transfer pictures etc from the BB Link to other PC files.  Help

    Well I do not use Link so I do not know everything.  Did you ask yourself,  where did the files shown in Link come from ?
    I think they came from your computer so they are already on your computer so you can transfer them with your computer not with Link.
    Plus if you have files on your phone you can transfer them to your computer using BB Device Manager and if the files are on a SD Card you can also use USB Mass Storage.
    What I do not know or have left out someone else will reply and let you know.
    Here is a little extra info:   http://btsc.webapps.blackberry.com/btsc/viewdocument.do?externalId=KB26068&sliceId=2&docType=kc&noCo...

  • How to add a code TestIfElse(10) to the Main method of the Program.cs class?

    How to add a code  TestIfElse(10) to the Main method of the Program.cs class?
    Here is my code and I have copied from the Wiley book for Microsoft certification page 14,
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ifelse_Statement
        class Program
            static void Main(string[] args);
            TestIfElse(10);
            public static void TestIfElse(int n);
            if(n < 10)
                     Console.WriteLine("n is less than 10");
             else if(n < 20)
                    Console.WriteLine("n is less than 20");
             else if(n < 30)
                Console. WriteLine("n is greater than or equal to 30");
    Here is the error list I am getting,
    Error 1      Method must have a return type        C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\switch_Statement\Program.cs
    12 13
    switch_Statement
    Error 2
    Type expected C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\switch_Statement\Program.cs
    12 24
    switch_Statement
    Error 3
    Method must have a return type C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    12 9
    ifelse_Statement
    Error 4
    Type expected C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    12 20
    ifelse_Statement
    Error 5
    Invalid token 'if' in class, struct, or interface member declaration
    C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    16 9
    ifelse_Statement
    Error 6
    Invalid token '10' in class, struct, or interface member declaration
    C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    16 16
    ifelse_Statement
    Error 7
    Type expected C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    16 16
    ifelse_Statement
    Error 8
    Invalid token '(' in class, struct, or interface member declaration
    C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    18 35
    ifelse_Statement
    Error 9
    A namespace cannot directly contain members such as fields or methods
    C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    20 10
    ifelse_Statement
    Error 10
    Type or namespace definition, or end-of-file expected
    C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
    30 1
    ifelse_Statement
    Error 11
    The type or namespace name 'n' could not be found (are you missing a using directive or an assembly reference?)
    c:\users\pvs\documents\visual studio 2013\projects\lesson01\ifelse_statement\program.cs
    16 12
    ifelse_Statement
    Error 12
    'System.Console.WriteLine(string, params object[])' is a 'method' but is used like a 'type'
    c:\users\pvs\documents\visual studio 2013\projects\lesson01\ifelse_statement\program.cs
    18 26
    ifelse_Statement

    static void Main(string[] args){
    TestIfElse(10);
    public static void TestIfElse(int n)
    if (n < 10)
    Console.WriteLine("n is less than 10");
    else if (n < 20)
    Console.WriteLine("n is less than 20");
    else if (n < 30)
    Console.WriteLine("n is greater than or equal to 30");
    Fouad Roumieh

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • How do I get my tabs back into the main window?

    I've had a problem with an add-on displaying a small extra window every time I open a session for some months now: I know you're supposed to try disabling and re-enabling every add-on you've got to find out which one is responsible, but this is a work computer and with all the add-ons I have, it would take too long, so I've just closed the extra window every time and got on with my work. However, for some reason today my forty-odd tabs have all opened in the small extra window, which has no tab bar, navigation bar or menu button. How do I get my tabs back into the main window of Firefox, or alternatively get that window to behave like a normal Firefox window so I can use it?

    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    *http://kb.mozillazine.org/Multiple_profile_files_created
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder

  • HT1338 How do I copy and paste a flyer from pages to the main body of the e-mail

    How do I copy and paste a flyer that was designed in pages to the main body of the e-mail

    Print or Export to pdf and drag that into your eMail.
    Peter

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How to Place a LOGO on Selection screen & Output list -OO ALV

    Hi,
    I was just wondering can we place a logo on standard Selection screen 1000?
    And also on the Output list . I am using OO ABAP for my ALV.
    regards
    Praveen

    Hi,
    You cannot place a logo in your selection-screen.
    But yes, you can place logos in your OO ALV.
    data:       ws_c_logo      TYPE REF TO cl_dd_area.
                                                      "Instance for the logo
    Split your document container for logo
       CALL METHOD wcl_docum->vertical_split
               EXPORTING split_area  = wcl_docum
                         split_width = '70%'
               IMPORTING right_area  = ws_c_logo.
    then,
      CALL METHOD ws_c_logo->add_picture
              EXPORTING picture_id = c_logo.
    where:      c_logo TYPE sdydo_key VALUE 'CC0040' .  "logo for co.code 0040
    The image should be stored in your business document. You may use BDS_OBJECT_SAVE or BDS_BUSINESSDOCUMENT_CREATEF to store the image in the business document server and then retrieve in your ALV.
    Regards
    Subramanian

  • How to place a table of contents at the end of a document?

    I know how to design a table of contents at the beginning of a Pages document.
    I'd like to place a table of contents at the end of a long Pages book.
    Is there any simple trick to place a table of contents at the end of a Pages document?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

    fruhulda wrote:
    The Table of Contents (TOC) has to be in front of the Chapters it create a TOC from. There is a work around this, but do it first after you have finished the document because you'll loose the automatic update of the TOC.
    Thank you for your attempt to help.
    With TextEdit I loose the formatting of the TOC.
    I found another workaround, I made a printing of the TOC and saved it
    as PDF and included it within an empty page. But this method isn't
    really a simple workaround.
    The conclusion is that there isn't any easy way to place a TOC
    where you want.
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • How can I get a picture to display the date it was taken?

    How can I get a picture taken by my z10 to display the date it was taken?

    Gabrielamck wrote:
    How can I get a picture taken by my z10 to display the date it was taken?
    The only way to do so, is by manually renaming the picture
    Using the Playbook and the Z10 and the Z30 and loving them
    Martin

  • How do i transfer my pictures/music from the ipad to my icloud account

    How do I transfer my pictures/music from my Ipad to my Icloud account to free up some space?

    iCloud isn't designed to free up space on your iPad.  It's designed to sync your data to other devices you have connected to your iCloud account, and to store your backups.  It will only store your pictures as part of your overall iPad backup, but they cannot then be accessed except by restoring the entire backup back to your iPad.  iCloud will only store your music if you subscribe to iTunes Match, which is separate from your iCloud account.
    If you need to free up space on your iPad, you can import your photos to your computer and delete them off your iPad as described here: http://support.apple.com/kb/HT4083.  You can also remove some or all of your music by unchecking the songs you don't want on your iPad on the Music tab of your iTunes sync settings and syncing.

  • How to structure several scenes (in symbols) on the main stage timeline

    Hi,
    I'm new to edge animate but have a Flash background and I'm working in Edge Animate on a game which is structured in several scenes. Each scene I did put in a symbol. Now I wonder how to build the main timeline or the "story - controller" so to speak. I have all the scenes but I do not know how to connect them.
    In Flash it was possible to add keyframes of scenes one after another (like stairs) and jump forward or backward if needed to load the movie clips. In Edge Animate all scenes (or symbols) are in place from the beginning of the timeline and I cannot move the symbol to a later keyframe. Of course I can move animations in the timeline. The only way I think is to hide the symbols first and make them visible if needed. But this does not seem to be the right way and I don't understand the concept of structuring complex animations yet.
    I would like to know how to structure several scenes in Edge Animate properly. Something like a scene loader or unloader would be useful. Highly appriciate any hints to a solution.
    Thank you,
    JP

    resdesign wrote:
    You can also use edgecommons to load edge composition into another edge composition.
    Thank you to your tipp so I try to organize my scenes into compositions. I can successfully load a composition (scene2) into the main container :
    EC.loadComposition("scene2.html", sym.getSymbol("mainContainer"));
    Now I'm facing another situation. At the end of the loaded composition scene2 is a "Next Scene" button suppose to load scene3.html composition into the main container. "Next Scene" is a nested button inside the loaded composition screen2 symbol. How do I load the next compostion from the current one? This code for On Click of course does not work:
    EC.loadComposition("scene3.html", sym.getSymbol("mainContainer"));
    I think the refer to the mainContainer is wrong. Is it just a targeting issue or is it the wrong approach in general?

  • HT4527 I have successfully transferred my iTunes folder from an old pc to my new one.  How do I now make this new computer the main synchronising computer for my iPad.  Thank you.

    I have successfully transferred my iTunes from my old computer to a new one just brought.  However when I tried to synchronise my iPad to new computer I had a message that said there was an upgrade available which I said I would like to proceed with.  However I then had a message that said I would lose all my apps etc if I did this and that I should use the old computer to do all synching.  How do I make the new computer my main computer for synching.  Grateful for any help.   Sez.

    If you migrate your library properly you don't get the wipe & reload problem. If possible revisit your migration, or use the link at the end to associate your device with the new library.
    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    Note if you have iOS devices and haven't moved your contacts and calendar items across then you should create one dummy entry of each in your new profile and iTunes should  merge the existing data from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library or a backup then then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data.
    tt2

Maybe you are looking for

  • How do I fix my floating drop down navigational menu?

    Hello, I am currently reworking my website to make it responsive, but I have hit a roadblock with my navigation menu: My goal for the menu is to have a floating navigational menu in which as the user hovers over the link the image changes. One of the

  • Creation of new MRP Areas.

    Hi All, While creating new MRP areas am facing problem like "ERROR IN CUSTOMIZING:MRP AREA 1002 IN PLANT 1002 DOES NOT EXIST. But I am creating MRP areas for another plant-1003. I didnt understand thatwhy this error is coming and unable to save. Can

  • ICS5.1: Settings in iCS Client are not saved

    Hi, I'm using iCS5.1 on Solaris and the web-client for the users to access the information. There is a point "options" where the users are able to customize the layout, time-zone and many other things. If they change a setting and push the button "Ap

  • RMAN backup taking long time

    Hi Oracle 10.1.0.2.0 OS IBM/AIX RISC/6000 I have a db of around 150GB,Normally i take cold backup (using OS commands) it takes around 4 hours. Today i just wanted to use rman to take online backup on disk it took around 8 hours to complete. i used th

  • Problem playing MPEG1 files

    Hi everybody- Anybody having trouble playing mpeg1 files that they were able to play before? In particular with audio? Any mpeg1 I have played fine a few days ago but all of a sudden the audio won't play. The equalizer shows that sound is supposed to