<?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: Preferred data type for attachments in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009359#M1967628</link>
    <description>&lt;P&gt;So to reduce payload I have to convert hex to base64 and the other system has to decode and convert to binary ? Please confirm&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 12:57:43 GMT</pubDate>
    <dc:creator>kjyothiraditya</dc:creator>
    <dc:date>2019-07-26T12:57:43Z</dc:date>
    <item>
      <title>Preferred data type for attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009355#M1967624</link>
      <description>&lt;P&gt;hi experts,&lt;/P&gt;
  &lt;P&gt;Can you please let me know the preferred data type to be used for reading binary data of files from bds attachments. By default it is mostly hexadecimal. If I am using scms*xstringto*binary,the conversion isn't happening in my program. The data is still in hexadecimal. When I send this data after conversion to other system, the document is corrupted. If the other system converts from hex to binary, it is working fine. Can you let me know best practice method ? I have used scms* FM in the past like for email attachment and it worked fine. &lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 13:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009355#M1967624</guid>
      <dc:creator>kjyothiraditya</dc:creator>
      <dc:date>2019-07-25T13:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Preferred data type for attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009356#M1967625</link>
      <description>&lt;P&gt;Hexadecimal is just a way of showing the values of bytes in a human-readable format (2 hexa characters = the value of 1 byte).&lt;/P&gt;&lt;P&gt;If you're talking about the contents of a XSTRING variable, prefer the term "byte string".&lt;/P&gt;&lt;P&gt;SCMS_XSTRING_TO_BINARY only transfers bytes from a XSTRING variable to an internal table with lines of type X (or more precisely whose 1st component has a type which can be casted to X, and if the table has unstructured lines the whole line has a type which can be casted to X).&lt;/P&gt;&lt;P&gt;Concerning how the files are to be transmitted via BDS API or BCS API (email), the API is to be used differently of course, but there's nothing really special about the handling of bytes/binary/hexadecimal.&lt;/P&gt;&lt;P&gt;I would say that your code is buggy somewhere, and that you don't understand a few important things (no offense!). Let's discuss.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 18:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009356#M1967625</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-07-25T18:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Preferred data type for attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009357#M1967626</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Thanks for replying. I am trying to understand if we can get the file in binary format. Also I am sending this data to other system in an idoc.so is it ok if I sending hexadecimal format or do I have to send in binary. Also I am using idoc as the container and pi is the middle communication agent. My idea is to skip the conversion from hex to bin at the other system. &lt;/P&gt;&lt;P&gt;Can you also suggest if any better way to send files to other system?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 04:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009357#M1967626</guid>
      <dc:creator>kjyothiraditya</dc:creator>
      <dc:date>2019-07-26T04:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Preferred data type for attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009358#M1967627</link>
      <description>&lt;P&gt;You can't avoid the conversion.&lt;/P&gt;&lt;P&gt;IDocs can transfer only characters (but any data type can be represented via characters so this "limit" is not really a problem). These other data types must be "encoded" into characters and "decoded" at the other side. The encoding is as simple as doing a WRITE of the variable. For bytes, I would prefer base64 over hexadecimal because it takes less characters (# of bytes * 4 / 3, rounded up to a multiple of 4, versus # of bytes * 2 for hexadecimal).&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 07:38:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009358#M1967627</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-07-26T07:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Preferred data type for attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009359#M1967628</link>
      <description>&lt;P&gt;So to reduce payload I have to convert hex to base64 and the other system has to decode and convert to binary ? Please confirm&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 12:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/preferred-data-type-for-attachments/m-p/12009359#M1967628</guid>
      <dc:creator>kjyothiraditya</dc:creator>
      <dc:date>2019-07-26T12:57:43Z</dc:date>
    </item>
  </channel>
</rss>

