HTML attachment in a mail

Hello all,
I'd like to know if it's possible to attach an HTML document to an external mail (or even a work item) in a workflow.
I have a custom container multiline element (type W3CREATPAT-CONTENT) that contains a table of strings (the html file) and I need to attach it to a mail, but I can't use the binding with &attachments& because it's not compatible.
Thanks for your help.
Best regards.
Angelo

Hi Angelo,
<a href="/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface is the blog by Thomas Jung.</a>
You can also make a copy of sample program BCS_EXAMPLE_5 and have it working with some minor changes.
Here is what I did. Changes in bold. I am assuming your SAP sytem is configured to send external mail.
    add attachment to document
    BCS expects document content here e.g. from document upload
    binary_content = ...
<b>DATA: text_content       TYPE soli_tab.</b>
      <b>APPEND 'http://www.google.com/' TO text_content.</b>
      CALL METHOD document->add_attachment
        EXPORTING  i_attachment_type = <b>'HTM'</b>
                   i_attachment_subject = 'My attachment'
<b>*                   i_att_content_hex    = binary_content.
                   i_att_content_text   = text_content.
</b>
<b>*     -
send the message without needing to wait for the batch job
      send_request->set_send_immediately( 'X' ).
</b>
    ---------- send document ---------------------------------------
      CALL METHOD send_request->send(
Have fun!
Ramki Maley.

Similar Messages

  • How to send ALV list report as html attachment in a mail??

    Hi all,
    I have an ALV report which I want to send as an HTML attachment in a mail to an external id. I know that spool can be converted to HTML attachment in a mail. But I don't want to have 2 programs - one for generating ALV and the other to send mail with the spool-converted of the first report as attachment. I want to send the mail in the same program itself. Is it possible? Helpful answers will be suitably rewarded.

    Hi Sandip,
    In your ALV program after the alv output is build in the program do the following steps.
    1). Export the list to memory
    2). Import the list from mempry
    3). Do a COmpress of the data
    4). Send an email as an attachment using the normal FM.
    Take a look at the following links which will explain how to do the above steps.
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    remember to change the doc type as 'HTM' in the FM to send email.
    Cheers
    VJ

  • Russian Character is not displaying Correctly in HTML Attachment

    Hi,
    We are converting the TRIP Details into HTML Format and sending this as attachment by using the function module 'SO_DOCUMENT_SEND_API1'
    It is working fine if the Content are in English, But if there is any Russian characters, Junk character is getting display while opening the HTML attachment in the Mail.
    While debugging we have checked the HTML Content before sending it to the Function Module SO_DOCUMENT_SEND_API1, Which is coming correctly in Russian Character.
    Kindly suggest is there is any specific setting need to added in HTML.
    We are using the CHARSET UTF-8 in the HTML
    Then same scenario we have tested in Spanish (ES), which is also displaying correctly.
    With Regards,
    Subbaraman v

    Hi James
    Oh~ It perfectly works!!
    I've been tried to solve this problem for a long time and
    I really appreciate for your help~
    Thanks~
    Kwangbock.

  • To Send HTML Format and excel file attachment  in same mail

    Dear All,
            Have requerment ,to send a mail options HTML table format and same data in excel file attachement.have capable to do the html format using methods BCS .but how to send excel format attachment in same  mail.
    Please guide me how to do it.
    Regards ,
    Santhu
    Edited by: santosh jajur on Apr 9, 2010 1:54 PM

    Santhosh,
    please check the code:
    report bcs_example_7.
    This report provides an example for sending an Excel
    attachment in Unicode Systems
    constants:
      gc_tab  type c value cl_bcs_convert=>gc_tab,
      gc_crlf type c value cl_bcs_convert=>gc_crlf.
    parameters:
      mailto type ad_smtpadr
       default 'ur mail id'.                    "#EC *
    data send_request   type ref to cl_bcs.
    data document       type ref to cl_document_bcs.
    data recipient      type ref to if_recipient_bcs.
    data bcs_exception  type ref to cx_bcs.
    data main_text      type bcsy_text.
    data binary_content type solix_tab.
    data size           type so_obj_len.
    data sent_to_all    type os_boolean.
    start-of-selection.
      perform create_content.
      perform send.
    form send.
      try.
          send_request = cl_bcs=>create_persistent( ).
        create document object from internal table with text
          append 'Hello world!' to main_text.                   "#EC NOTEXT
          document = cl_document_bcs=>create_document(
            i_type    = 'RAW'
            i_text    = main_text
            i_subject = 'Test Created By BCS_EXAMPLE_7' ).      "#EC NOTEXT
        add the spread sheet as attachment to document object
          document->add_attachment(
            i_attachment_type    = 'xls'                        "#EC NOTEXT
            i_attachment_subject = 'ExampleSpreadSheet'         "#EC NOTEXT
            i_attachment_size    = size
            i_att_content_hex    = binary_content ).
        add document object to send request
          send_request->set_document( document ).
        --------- add recipient (e-mail address) -----------------------
        create recipient object
          recipient = cl_cam_address_bcs=>create_internet_address( mailto ).
        add recipient object to send request
          send_request->add_recipient( recipient ).
        ---------- send document ---------------------------------------
          sent_to_all = send_request->send( i_with_error_screen = 'X' ).
          commit work.
          if sent_to_all is initial.
            message i500(sbcoms) with mailto.
          else.
            message s022(so).
          endif.
      endtry.
    endform.                    "send
    form create_content.
      data lv_string type string.
      data ls_t100 type t100.
    columns are separated by TAB and each line ends with CRLF
      concatenate 'This Is Just Example Text!'                  "#EC NOTEXT
                  gc_crlf gc_crlf
                  into lv_string.
    header line
      concatenate lv_string
                  'MSGID'    gc_tab
                  'MSGNO'    gc_tab
                  'Language' gc_tab                             "#EC NOTEXT
                  'Text'     gc_crlf                            "#EC NOTEXT
                  into lv_string.
    data lines
      select * from t100 into ls_t100
        where arbgb = 'SO' and msgnr = '182'.
        concatenate lv_string
                    ls_t100-arbgb gc_tab
                    ls_t100-msgnr gc_tab
                    ls_t100-sprsl gc_tab
                    ls_t100-text  gc_crlf
                    into lv_string.
      endselect.
      select * from t100 into ls_t100
        where arbgb = 'SO' and msgnr = '316'.
        concatenate lv_string
                    ls_t100-arbgb gc_tab
                    ls_t100-msgnr gc_tab
                    ls_t100-sprsl gc_tab
                    ls_t100-text  gc_crlf
                    into lv_string.
      endselect.
      try.
          cl_bcs_convert=>string_to_solix(
            exporting
              iv_string   = lv_string
              iv_codepage = '4103'  "suitable for MS Excel, leave empty
              iv_add_bom  = 'X'     "for other doc types
            importing
              et_solix  = binary_content
              ev_size   = size ).
        catch cx_bcs.
          message e445(so).
      endtry.
    endform.                    "create_content
    Thanks.

  • Mail having HTML attachment with images

    I am having a problem that when I send a mail which has an attachment report in html format that contains images, the resulting mail does not show the name of HTML attachment filename, even though it contains it
    Message-ID: <1236342.1033132049637.JavaMail.insoft@ins-2k>
    Date: Fri, 27 Sep 2002 14:06:49 +0100 (BST)
    From: [email protected]
    To: [email protected]
    Subject: This is your subject
    Mime-Version: 1.0
    Content-Type: multipart/mixed; boundary="----=_Part_0_2584319.1033132009259"
    X-Mailer: ins
    ------=_Part_0_2584319.1033132009259
    Content-Type: text/html
    Content-Transfer-Encoding: 7bit
    Content-Disposition: inline
    ------=_Part_0_2584319.1033132009259
    Content-Type: multipart/related; name="Report Containing Chart.html";
         boundary="----=_Part_1_2352159.1033132048786"
    Content-Description: this is my related part attachment
    Content-Disposition: attachment; filename="Report Containing Chart.html"
    ------=_Part_1_2352159.1033132048786
    Content-Type: text/html; name="Report Containing Chart.html"
    Content-Transfer-Encoding: quoted-printable
    Content-ID: ttt
    Content-Disposition: attachment; filename="Report Containing Chart.html"
    ------=_Part_1_2352159.1033132048786
    Content-Type: image/png
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment
    Content-ID: attach_1
    Content-Location: cid:attach_1
    Content-Length: 1750
    // thats how it build up
    MimeBodyPart relParent = new MimeBodyPart();
       MimeMultipart relatedBodypart = new MimeMultipart("related");
       MimeBodyPart mainBodypart = new MimeBodyPart();
       mainBodypart.setContent("my html report in text form", "text/html");
       relatedBodypart.addBodyPart(mainBodypart);
       MimeBodyPart inBodyPart = new MimeBodyPart();
       inBodyPart.setDataHandler(new DataHandler(bds));
       relatedBodypart.addBodyPart(inBodyPart);
    relParent.setContent(relatedBodypart);
    relParent.setFileName(relAtt.getName());
    relParent.setDisposition(BodyPart.ATTACHMENT);
    // am i missing something here

    You are getting your file attached correctly, but you still need to reference it within your HTML text so it will be displayed. You can do this with the cid (content-id) tag. Something like this should work:
    <img src="cid:attach_1">
    "attach_1" can be any name you specify when you attach the file to the message.
    Hope this helps.
    --Rick                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HTML tags in text-only e-mail notification (with HTML attachment)

    Greetings,
    Our "Purchase Order Review" e-mail notifications (as generated by the WF-Mailer) have HTML tags in the message body (which is "plain-text" text-only), with an HTML attachment. (The attachment looks good, and is what we are expecting.) All our e-mail notifications are text-only (which is how we want them), and this is the only kind of notification that is generating HTML tags in the 'text-only' message body.
    We'd like to keep the HTML attachment as it is, but we want to have the e-mail message body be text (without any HTML tags). The other option that would be acceptable is to NOT have any message content at all, and only the HTML attachment.
    Can either of these options be done, and how do we go about doing them?? Thanks!! -- Tom
    Tom Buck
    [email protected]
    PS: Here is a partial sample of the "text-only" message content...
    <HTML><HEAD></HEAD>
    <BODY BGCOLOR="#FFFFFF"><b>Oracle Workflow Notification (FYI)</b>
    <br>
    <hr>
    <P><table width=100% border=0 cellpadding=2 cellspacing=1 cols=3 rows=2>
    <!-- header -->
    <tr>
    <!-- ORACLE, ship-to, PURCHASE-ORDER -->
    <td width=45% valign=top>
    <!-- ORACLE -->
    <font color=black size=+2>
    BUTLER MANUFACTURING
    </font><br>
    <font color=black> BUTLER MANUFACTURING COMPANY
    <br> BUTLER MANUFACTURING HEADQUARTERS
    <br> 1540 GENESSEE ST.
    <br> KANSAS CITY
    , MO
    64102
    <br> US
    </font> </br>
    </td>
    <td width=25% valign=top>
    <!-- ship-to -->
    etc..., for another couple hundred lines. -- Tom

    in the notifications properties you will see two tabs, in one you can enter your message in text and in another you can enter in html. not sure if you had tried these.
    hth
    satish paul
    Greetings,
    Our "Purchase Order Review" e-mail notifications (as generated by the WF-Mailer) have HTML tags in the message body (which is "plain-text" text-only), with an HTML attachment. (The attachment looks good, and is what we are expecting.) All our e-mail notifications are text-only (which is how we want them), and this is the only kind of notification that is generating HTML tags in the 'text-only' message body.
    We'd like to keep the HTML attachment as it is, but we want to have the e-mail message body be text (without any HTML tags). The other option that would be acceptable is to NOT have any message content at all, and only the HTML attachment.
    Can either of these options be done, and how do we go about doing them?? Thanks!! -- Tom
    Tom Buck
    [email protected]
    PS: Here is a partial sample of the "text-only" message content...
    <HTML><HEAD></HEAD>
    <BODY BGCOLOR="#FFFFFF"><b>Oracle Workflow Notification (FYI)</b>
    <br>
    <hr>
    <P><table width=100% border=0 cellpadding=2 cellspacing=1 cols=3 rows=2>
    <!-- header -->
    <tr>
    <!-- ORACLE, ship-to, PURCHASE-ORDER -->
    <td width=45% valign=top>
    <!-- ORACLE -->
    <font color=black size=+2>
    BUTLER MANUFACTURING
    </font><br>
    <font color=black> BUTLER MANUFACTURING COMPANY
    <br> BUTLER MANUFACTURING HEADQUARTERS
    <br> 1540 GENESSEE ST.
    <br> KANSAS CITY
    , MO
    64102
    <br> US
    </font> </br>
    </td>
    <td width=25% valign=top>
    <!-- ship-to -->
    etc..., for another couple hundred lines. -- Tom

  • HT1277 Mac Mail previous conversation as HTML attachment

    Receiver using Windows outlook will receive my mail of previous conversation as html attachment. How to change things to conversation format? Anyone can help>?

    Change your Preferences > Composing option to Plain Text, and disable the "Use the same message format as the original message" option in that same window. If you want to always see mail in Plain Text, regardless of how the sender composed it, execute this command in Terminal:
    defaults write com.apple.mail PreferPlainText -bool true
    Then quit Terminal and restart Mail for the change to take effect.
    Mulder

  • How to open a pdf attachment in imac mail

    I am unable to open a PDF attachment in Mac Mail. There is not a PDF Icon in the email message. Is there a setting that should be checked?
    I have a new iMac (less than a month old) with Mountain Lion.
    Help would be greatly appreciated. Thanks

    It is an actual PDF that is an attachment to an email. There is not a link to click on to open the attachment.
    The attachment is a statement that I normally open, then print..
    What I am seeing on the monitor is the heading portion of the email with the statement image, all on one page..It prints exactly as seen on the screen.
    I have checked my Mail>Preferences>Viewing Tab."Display remote images in HTML" messages is checked..
    Thanks for the help.

  • How to send dashboard html & attachment in a single i-bot

    Hello friends,
    I have two questions.
    1.Is it possible to send the multiple reports in a single i-bot?
    For example: I have two reports A & B. I want to send it in a single mail (i-Bot)
    2.Is it possible to send the report as both HTML & attachment?
    For example: I have a report A. I want to send it as both HTML & as an attachment in a single mail (i-Bot)
    Your prompt reply will be greatly appreciated
    Thanks & Regards,
    Satya

    i m not sure, but 1 ibot delivers either a report, or dashboard or brief book, or Condition analysis but not multiple. And only one format can be chosen per delivery.
    just for an idea, Include the 2 reports in a new dashboard and deliver the new dashboard.
    Regards,
    Arjun.

  • Problem wich attach in e-mail

    Hello!
    I have problem with attach in e-mail for bidders.
    I create a bid invitation and attach any document.
    [Attach|http://www.4shared.com/file/67153110/5be21d31/attach01.html]
    So, i publish my bid invitation and a e-mail is send to bidder.
    But, i go to the SOST and view the e-mail and attach not is there.
    [Problem|http://www.4shared.com/file/67153109/3b2594d4/attach02.html]
    Who can i resolve this problem? Are there any configuration for that?
    Tanks!

    Hi Rodrigo
    You are absolutely correct. please refer this link.check the mentioned BADI in your systems controls ?
    Attachment  .PDF in Bid Invitation and Auction e-mail
    regards
    Muthu

  • Send HTML attachment by email

    Hello everybody,
    I made a program to send by email an HTML file as attachment.  All works fine except that the HTML file is not attach to the mail, instead of that the HTML code is inserted in the email body.
    The same code works fine for XLS, PDF format, attachment is created, but not for HTM or TXT format.
    I'm in 4.6C. I think the problem is coming from the configuration of SAPConnect.
    Here is the routine code :
    *&      Form  send_mail
    *       Send mail
    *      -->PT_HTML  Attachment file containing HTML code
    *      -->PW_EMAIL Email address
    *      <--PW_RCODE Return code
    FORM send_mail TABLES   pt_html STRUCTURE w3html
                   USING    pw_email
                            pw_obj_descr
                   CHANGING pw_rcode.
      DATA : lt_file_att TYPE TABLE OF solisti1,
             ls_file_att TYPE solisti1.
      DATA : ls_document_data TYPE sodocchgi1,
             l_cnt   TYPE i.
      DATA : lt_packing_list  TYPE TABLE OF sopcklsti1,
             ls_packing_list  TYPE sopcklsti1,
             lt_contents      TYPE TABLE OF solisti1,
             ls_contents      TYPE solisti1,
             lt_receivers     TYPE TABLE OF somlreci1,
             ls_receivers     TYPE somlreci1,
             lt_object_header TYPE TABLE OF solisti1,
             ls_object_header TYPE solisti1.
      DATA : lt_objtxt TYPE TABLE OF solisti1   WITH HEADER LINE,
             l_lines TYPE i,
             l_sender TYPE so_rec_ext.
      CLEAR pw_rcode.
      lt_file_att[] = pt_html[].
    * Fill the document data and get size of attachment
      CLEAR ls_document_data.
      DESCRIBE TABLE lt_file_att LINES l_lines.
      READ TABLE lt_file_att INTO ls_file_att INDEX l_lines.
      ls_document_data-doc_size =
         ( l_lines - 1 ) * 255 + STRLEN( ls_file_att ).
      ls_document_data-obj_langu  = sy-langu.
      ls_document_data-obj_name   = 'Report to VMI'.
      ls_document_data-obj_descr  = pw_obj_descr.
      ls_document_data-sensitivty = 'F'.
    * Describe and create the body of the message
      CLEAR ls_packing_list.
      REFRESH lt_packing_list.
      ls_packing_list-transf_bin = space.
      ls_packing_list-head_start = 1.
      ls_packing_list-head_num = 0.
      ls_packing_list-body_start = 1.
      ls_packing_list-body_num = 1.
      ls_packing_list-doc_type = 'RAW'.
      APPEND ls_packing_list TO lt_packing_list.
    * Describe and create attachment
      CLEAR ls_packing_list.
      ls_packing_list-transf_bin = ' '.
      ls_packing_list-head_start = 1.
      ls_packing_list-head_num   = 0.
      ls_packing_list-body_start = 1.
      DESCRIBE TABLE lt_file_att LINES ls_packing_list-body_num.
      ls_packing_list-doc_type   =  'HTM'.
      ls_packing_list-obj_descr  =  'TEST1'.
      ls_packing_list-obj_name   =  'TEST1'.
      ls_packing_list-doc_size   =  ls_packing_list-body_num * 255.
      APPEND ls_packing_list TO lt_packing_list.
    * Add the recipient(s) email address
      CLEAR ls_receivers.
      REFRESH lt_receivers.
      ls_receivers-receiver = pw_email.
      ls_receivers-rec_type = 'U'.
      ls_receivers-com_type = 'INT'.
      ls_receivers-notif_del = 'X'.
      ls_receivers-notif_ndel = 'X'.
      APPEND ls_receivers TO lt_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = ls_document_data
                put_in_outbox              = 'X'
                sender_address             = l_sender
                sender_address_type        = 'INT'
           TABLES
                packing_list               = lt_packing_list
                contents_txt               = lt_file_att
    *            contents_bin               = lt_file_att
                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.
      pw_rcode = sy-subrc.
    ENDFORM.                    " send_mail
    Thank you in advance for your answer.

    hi,
    pls use this demo code and reward points if it works -
    REPORT  ZGILL_SENDMAIL_PDF                      .
    INCLUDE ZGILL_INCMAIL.  "SEE BELOW FOR INCLUDE PROGRAM CODE.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case DEFAULT '[email protected]'.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY DEFAULT 'C:\TEMP\SALARY_SLIP1.PDF'.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    *********************iNCLUDE pROGRAM********************************************
    *&  Include           ZGILL_INCMAIL                                    *
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    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 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    **********************INCLUDE END********************************

  • Html attachment issue

    Hi all
    I have a problem using mail on 10.4 The mail client is set to send messages in rich text format. If I send a mail to another user (windows based with outlook) without attachments the content is received in the body of the email with formatting as a html mail. However if I then attach something the text content of the mail is taken and put in a html attachment along with the other attached file. Is this something that can be altered?
    I am presuming its something to do with mac mail sending in rtf rather than html but if anyone could help I would appreciate it.
    Thanks
    Nick

    I hadnt consiously done anything to be honest - just clicked the attachment and then send

  • TB sees my html attachment as a text document

    I recently switched email programs from Outlook Express to Mozilla TB. In Outlook I would get a daily email report with an html attachment. I would double click the attachment and it would open in the web browser. Now, however, TB sees the attachment as a text document and will not open it in a browser.
    If I save the attachment to my desktop and open it from there, it will open correctly in the browser.
    Is there any way to change my settings to have the attachment be recognized as html and open in a browser?

    The mail is probably generated by a script on a web site or router written by an ignorant programmer, quite probably using a script they copied from somewhere else because they know nothing of email.
    If you look in your message source (ctrl+U) and check the encoding of the data and I am guessing your will not see.
    Content-Type: text/html; charset=UTF-8;
    name="DocumentName.html"
    I would expect something like application octet stream if it is as poorly put together as most script generated emails are.
    You may find the add-on [https://nic-nac-project.org/~kaosmos/index-en.html#openattach Open attachments by extension] will work around the deficiencies in the mailers software. But ideally the generating software should be brought up to standard.

  • Attaching photos in mail on ios7

    In the old ios6 when attaching photos to mail you had the choice to resize the photos, this is now not available in ios7, see how it worked in ios6
    http://www.macobserver.com/tmo/article/how-to-email-multiple-images-in-ios
    Can anyone help

    You are right, this option seems to be gone. I am pretty sure this is a bug, though, because the option is not even appearing when I am using cellular data and I can't imagine Apple wants us to sent 3MB images over cellular. You should sent feedback about this ( http://www.apple.com/feedback/iphone.html ).

  • Using header paramter SHeaderX-MS-HAS-ATTACH  in Sender mail adapter

    I am trying to check if an e-mail contains attachment in reciever determintion
    I set the Variable Header XHeaderName1 to be SHeaderX-MS-HAS-ATTACH
    in Sender mail adapter
    I added a condition in the receving determintation
    XHeaderName1 = yes
    I see the DynamicConfiguration tab in sxmb_moni and the value of SHeaderX-MS-HAS-ATTACH is "yes"
    but the message fails with the error
    No receiver could be determined
    any ideas?

    Hi,
    In Receiver determination you need to set SHeaderX-MS-HAS-ATTACH = yes instead of XHeaderName1.
    As far my understanding, in receiver determination you need to verify the condition with  SHeaderX-MS-HAS-ATTACH = yes (check with syntax also ie. case sensitive and all)
    Thanks
    Swarup

Maybe you are looking for

  • Solaris 8 Container in Solaris 10 Zone

    Hi All, one of our customers wants to run Solaris 8 with Oracle 8.1.7 in a BrandZ Zone. Does anybody have an idea about how stable Solaris 8 is in a Zone environment? Are there any known issues with Solaris 8 running in a Zone? Since Solaris 8 is End

  • [kinda solved, hd broken]Salvaged hard drive mounted as read-only

    My old netbook died recently (if a guy in a shady computer store in Edinburgh tells you that "this adapter will surely work" -- what ever you do, don't believe him). Got a new netbook, and an external usb hd case for the old hard drive in the hope of

  • SSL in Oracle SQL Developer?

    PCI DSS (related to protection of credit card data) requires that I have to implement a 2-factor authentication. The 2 factor authentication that I am going to implement is password protection and token encryption like SSL (secure sockets layer). Whe

  • Lov equivalent in jdeveloper

    I have one table(machine_code,machine_no,machine_type....) and another table( test_date,machine_type,machine_no,machine_code,....) I want to create a view based on 1st table that selects machine_code,machine_type,machine_no from that table. Now I wan

  • Inner join need help

    hi I have following data create table test1 (ind int,idd varchar(20), sec int, amt float) create table test2 (ind int, id1 varchar(10), id2 varchar(10), sec int, qty float) insert into test1 values (11, '1aa',1,100); insert into test1 values (12, '1a