<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SO_DOCUMENT_SEND_API1 send body image in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790712#M1586291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to have a look at this thread: &lt;SPAN __jive_macro_name="thread" id="1355872"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't necessarily agree with the attachment approach but it apparently works.  What you really need is to reference an externally accessible location (outside your firewall) where the image is stored with your IMG tag (this is how 'normal' HTML code is written).  There are other ways to do it but not really as easy as the MIME folder approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2011 18:56:44 GMT</pubDate>
    <dc:creator>brad_bohn</dc:creator>
    <dc:date>2011-03-31T18:56:44Z</dc:date>
    <item>
      <title>SO_DOCUMENT_SEND_API1 send body image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790708#M1586287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to send an image into the mail's body, using the FM SO_DOCUMENT_SEND_API1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a standard text using the transaction SO10 and read it in to my program using the FMs READ_TEXT (to read it), TEXT_SYMBOL_REPLACE (to replace variables into the text) and CONVERT_ITF_TO_ASCII (to format the text), then I pass the text to the FM SO_DOCUMENT_SEND_API1 through the &lt;STRONG&gt;CONTENTS_TXT&lt;/STRONG&gt; parameter. It works fine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I've introduced a graphic into the text with the line &lt;STRONG&gt;BITMAP 'LOGO' OBJECT GRAPHICS ID BMAP TYPE BCOL&lt;/STRONG&gt; and I want that this graphic could be introduced into the mail's body. Right now it is sending a blank line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? If so, how can I do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I get an HTML code from a standard SO10 text ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Gregory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gregory Mayorga on Mar 28, 2011 8:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 13:06:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790708#M1586287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-28T13:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: SO_DOCUMENT_SEND_API1 send body image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790709#M1586288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tried it myself, but I think it's possible to send an HTML email and, essentially, put whatever you need in it. Not sure if it could be done using SO10 texts (storing images as text is already obsolete even for the forms, by the way). For HTML the image would need to reside somewhere and you'll need a web link to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a question about an image in the email just a few posts higher.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 17:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790709#M1586288</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2011-03-29T17:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: SO_DOCUMENT_SEND_API1 send body image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790710#M1586289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First you need to place your logo using OAER tcode. Once it is there (on application serv) you need to create an url from it. &lt;/P&gt;&lt;P&gt;Then simply add this url to html tab &amp;lt;&amp;lt; img src="url" &amp;gt;&amp;gt; . When creating bcs document, pass HTML type as message type and html tab as email body.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: pick_data TYPE TABLE OF w3mime,
          it_query TYPE TABLE OF w3query,
          wa_query TYPE w3query,
          it_html TYPE TABLE OF w3html,
          return_code TYPE  w3param-ret_code,
          content_type TYPE  w3param-cont_type,
          content_length TYPE  w3param-cont_len,
          url(255) TYPE c,
          pic_size TYPE i.
 
 
    REFRESH it_query.
    wa_query-name = '_OBJECT_ID'.
    wa_query-value = 'ENJOYSAP_LOGO'.   "node name in OAER where your picture was placed
    APPEND wa_query TO it_query.
 
 
    CALL FUNCTION 'WWW_GET_MIME_OBJECT'
      TABLES
        query_string        = it_query
        html                = it_html
        mime                = pick_data
      CHANGING
        return_code         = return_code
        content_type        = content_type
        content_length      = content_length
      EXCEPTIONS
        invalid_table       = 1
        parameter_not_found = 2
        OTHERS              = 3.
    IF sy-subrc = 0.
      pic_size = content_length.
    ENDIF.
 
    CLEAR url.
    CALL FUNCTION 'DP_CREATE_URL'
      EXPORTING
        type     = 'image'
        subtype  = 'X-UNKNOWN'
        size     = pic_size
        lifetime = 'T'
      TABLES
        data     = pick_data
      CHANGING
        url      = url
      EXCEPTIONS
        OTHERS   = 1.
 
"2. ------------------------------ adding html tags
data: lt_message TYPE bcsy_text with header line.
 
concatenate: '&amp;lt;&amp;lt;img src="' url '"&amp;gt;&amp;gt;' to lt_message.  "use "&amp;lt;"&amp;gt;" only once (it can't be displayed here correctly)
append lt_message.
 
"3. ------------------------------ setting message type in email body
data lr_email TYPE REF TO cl_bcs,
 
        lr_email_body = cl_document_bcs=&amp;gt;create_document(
                                         i_type = 'HTM'
                                         i_text = lt_message
                                         i_subject = l_subject ).
 
        lr_email-&amp;gt;set_document( lr_email_body ).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 07:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790710#M1586289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T07:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: SO_DOCUMENT_SEND_API1 send body image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790711#M1586290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've uploaded my image through T-OAER with code ZTEST and it has been uploaded fine, but when I call the FM &lt;STRONG&gt;WWW_GET_MIME_OBJECT&lt;/STRONG&gt; manually with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;QUERY_STRING-VALUE = 'ZTEST'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It returns me the exception &lt;STRONG&gt;OBJECT_NOT_FOUND&lt;/STRONG&gt; with the message &lt;STRONG&gt;SWWW021&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try manually with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;QUERY_STRING-VALUE = 'ENJOYSAP_LOGO'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The FM works fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything else that I have to do into T-OAER that allows me to read the image using the FM you suggest?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also trying to send the email using &lt;STRONG&gt;ENJOYSAP_LOGO&lt;/STRONG&gt; and it takes HTML format send ok, but does not shows the image. Show the space for the image but with an 'X' like a web page does it when not found an image. I guess it is not showing the image because the protocol is &lt;EM&gt;SAPR3&lt;/EM&gt; I mean the URL to image is &lt;EM&gt;sapr3://E05AD88B498849F1BAF9000C291A14EF/&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try generating the URL calling FM BDS_BUSINESSDOCUMENT_GET_URL that generates an HTTP URL and shows the image but after giving it the user and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Gregory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gregory Mayorga on Mar 30, 2011 12:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 14:09:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790711#M1586290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: SO_DOCUMENT_SEND_API1 send body image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790712#M1586291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to have a look at this thread: &lt;SPAN __jive_macro_name="thread" id="1355872"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't necessarily agree with the attachment approach but it apparently works.  What you really need is to reference an externally accessible location (outside your firewall) where the image is stored with your IMG tag (this is how 'normal' HTML code is written).  There are other ways to do it but not really as easy as the MIME folder approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 18:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790712#M1586291</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2011-03-31T18:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: SO_DOCUMENT_SEND_API1 send body image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790713#M1586292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, sorry about the delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was very busy with others requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont like an attachment either and now is when I'm gonna do the test. I have one question:&lt;/P&gt;&lt;P&gt;Considering that I'm using the FM &lt;EM&gt;SO_DOCUMENT_SEND_API1&lt;/EM&gt; If I already am attaching one file (SAP transaction shortcut) what do I have to do to attach the picture?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gregory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 18:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1-send-body-image/m-p/7790713#M1586292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-08T18:59:49Z</dc:date>
    </item>
  </channel>
</rss>

