<?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: PDF to Binary in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533732#M850159</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;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 19:26:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T19:26:49Z</dc:date>
    <item>
      <title>PDF to Binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533730#M850157</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;I create a Adobe Interactive Form, I need to display this PDF in SAP portal, then I need to develop a RFC to return this PDF file, I read in other post that the way is to convert de PDF to binary file a return this binary file like a paremeter in the RFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone have an example about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eduardo Campos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 14:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533730#M850157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T14:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to Binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533731#M850158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 16:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533731#M850158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to Binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533732#M850159</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;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 19:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533732#M850159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T19:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to Binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533733#M850160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works for me, it copies an excel file into another excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can keep the binary information as long as you want and later download the file to another place.&lt;/P&gt;&lt;P&gt;You can try it to see if it works for you.&lt;/P&gt;&lt;P&gt;Remember to keep the file lenght.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types: stringa(4096).
data: tabla type standard table of stringa.
DATA: FILE TYPE STRING.
DATA: LENGHT TYPE I.
fILE = 'C:\DOCUMENTS AND SETTINGS\myuser\MY DOCUMENTS\BOOK1.XLS'.

CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = FILE
   FILETYPE                      = 'BIN'
*   HAS_FIELD_SEPARATOR           = ' '
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
*   DAT_MODE                      = ' '
 IMPORTING
   FILELENGTH                    = LENGHT
*   HEADER                        =
  TABLES
    DATA_TAB                      = tabla.
BREAK RJESCISL.

fILE = 'C:\DOCUMENTS AND SETTINGS\myuser\MY DOCUMENTS\BOOK2.XLS'.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
   BIN_FILESIZE                  = LENGHT
    FILENAME                      = file
   FILETYPE                      = 'BIN'
*   APPEND                        = ' '
*   WRITE_FIELD_SEPARATOR         = ' '
*   HEADER                        = '00'
*   TRUNC_TRAILING_BLANKS         = ' '
*   WRITE_LF                      = 'X'
*   COL_SELECT                    = ' '
*   COL_SELECT_MASK               = ' '
*   DAT_MODE                      = ' '
* IMPORTING
*   FILELENGTH                    =
  TABLES
    DATA_TAB                      = TABLA
 EXCEPTIONS
   FILE_WRITE_ERROR              = 1
   NO_BATCH                      = 2
   GUI_REFUSE_FILETRANSFER       = 3
   INVALID_TYPE                  = 4
   NO_AUTHORITY                  = 5
   UNKNOWN_ERROR                 = 6
   HEADER_NOT_ALLOWED            = 7
   SEPARATOR_NOT_ALLOWED         = 8
   FILESIZE_NOT_ALLOWED          = 9
   HEADER_TOO_LONG               = 10
   DP_ERROR_CREATE               = 11
   DP_ERROR_SEND                 = 12
   DP_ERROR_WRITE                = 13
   UNKNOWN_DP_ERROR              = 14
   ACCESS_DENIED                 = 15
   DP_OUT_OF_MEMORY              = 16
   DISK_FULL                     = 17
   DP_TIMEOUT                    = 18
   FILE_NOT_FOUND                = 19
   DATAPROVIDER_EXCEPTION        = 20
   CONTROL_FLUSH_ERROR           = 21
   OTHERS                        = 22.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Sorry, didn't read the question right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, is almost the same way, just use Open dataset dsn in binary mode. That way you'll get your file in binary mode.&lt;/P&gt;&lt;P&gt;I was supossing you were usen a local file but now I see you want it in the application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramiro Escamilla on Feb 29, 2008 10:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 21:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-binary/m-p/3533733#M850160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T21:04:54Z</dc:date>
    </item>
  </channel>
</rss>

