<?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 Picture to binary in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421892#M540772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How I get the binary text of an picture?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to transfer it in a xml file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jul 2007 16:07:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-03T16:07:06Z</dc:date>
    <item>
      <title>Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421892#M540772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How I get the binary text of an picture?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to transfer it in a xml file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 16:07:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421892#M540772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T16:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421893#M540773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Check the Tcode&lt;/P&gt;&lt;P&gt;SMW0&lt;/P&gt;&lt;P&gt;to convert to Binary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 16:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421893#M540773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T16:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421894#M540774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Helo Darley...&lt;/P&gt;&lt;P&gt;How are you??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try to use the command open dataset? It has a property binary mode.&lt;/P&gt;&lt;P&gt;Try this and let me know what happened.&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;Mineiro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 17:19:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421894#M540774</guid>
      <dc:creator>rodrigo_paisante3</dc:creator>
      <dc:date>2007-07-03T17:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421895#M540775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good idea Mineiro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got de bytes of a image with GUI_UPLOAD function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i want send this image in a xml message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According with w3c, this images must be in a base 64 encoded image.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 20:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421895#M540775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-03T20:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421896#M540776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;XML?&lt;/P&gt;&lt;P&gt;I am trying to do this but the code not works in my minisap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; see my opened question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="460507"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe this help you, and if you know other way to manipulate xml, please answer my question too.&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;Mineiro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 11:20:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421896#M540776</guid>
      <dc:creator>rodrigo_paisante3</dc:creator>
      <dc:date>2007-07-04T11:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421897#M540777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF y_byte,
         byte(65534) TYPE x,
       END OF y_byte.

DATA: o_encryptor     TYPE REF TO cl_hard_wired_encryptor,
      t_bytes         TYPE TABLE OF y_byte,
      wa_byte         LIKE LINE OF t_bytes,
      v_byte_array    TYPE xstring,
      v_encoded_bytes TYPE string.

CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename = 'C:Sunset.jpg'
    filetype = 'BIN'
  TABLES
    data_tab = t_bytes.

CREATE OBJECT o_encryptor.

LOOP AT t_bytes INTO wa_byte.
  CONCATENATE v_byte_array wa_byte-byte INTO v_byte_array IN BYTE MODE.
ENDLOOP.

v_encoded_bytes = o_encryptor-&amp;gt;base64_encode( v_byte_array ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 12:35:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421897#M540777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-04T12:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Picture to binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421898#M540778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the steps you would need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. gui_upload with 'BIN'  as file type which would result in a image content in Binary table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. use FM SCMS_BINARY_TO_STRING to convert this binary to string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. use CL_HTTP_UTILITY=&amp;gt;IF_HTTP_UTILITY~ENCODE_BASE64 method to encode the string to base64.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. now you can use this string to set it in XML&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 12:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/picture-to-binary/m-p/2421898#M540778</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2007-07-04T12:42:09Z</dc:date>
    </item>
  </channel>
</rss>

