<?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 application server using FTP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511029#M17999</link>
    <description>&lt;P&gt;You are overcomplexifying. Do everything in binary, because PDF is said to be a "binary" file:&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;FTP_COMMAND: don't ascii&lt;/LI&gt;
   &lt;LI&gt;FTP_SERVER_TO_R3: use binary (character mode = abap_false, and take BLOB parameter into a variable TABLE OF x255 (255 bytes) for instance)&lt;/LI&gt;
   &lt;LI&gt;concatenate lines of blob into xstring in byte mode&lt;/LI&gt;
   &lt;LI&gt;xstring = xstring(bloblength)&lt;/LI&gt;
   &lt;LI&gt;after the OPEN DATASET IN BINARY MODE, do only one TRANSFER xstring, followed by CLOSE DATASET&lt;/LI&gt;
  &lt;/UL&gt;</description>
    <pubDate>Tue, 28 Nov 2017 18:09:19 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2017-11-28T18:09:19Z</dc:date>
    <item>
      <title>PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511028#M17998</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I have this scenario. I have a report that connects to a url via FTP, there we have some files (XML or pdf) corresponding to sales invoices. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;For the PDF files (for XML it's now working fine), I get the file, parse the result and then I fill some custom tables. The user also needs the file to be upload to an application server (I can check it in AL11). &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I'm having problems while uploading to application server. That's what I do., for example with XML files:&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;HTTP_SCRAMBLE&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;FTP_CONNECT&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;[here I do FTP_COMMAND set passive off, ascii, cd DIR, dir]&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;FTP_SERVER_TO_R3 -&amp;gt; I get the file in table g_t_xml_tab (g_t_xml_tab TYPE TABLE OF ty_xml INITIAL SIZE 0)&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I convert the file using &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; data: g_xmldata TYPE xstring,&lt;/P&gt;
  &lt;P&gt;g_str TYPE string. &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; CONCATENATE LINES OF g_t_xml_tab&lt;BR /&gt; INTO g_str SEPARATED BY space.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;CALL FUNCTION 'SCMS_STRING_TO_XSTRING'&lt;BR /&gt; EXPORTING&lt;BR /&gt; text = g_str&lt;BR /&gt; IMPORTING&lt;BR /&gt; buffer = g_xmldata&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; failed = 1&lt;BR /&gt; OTHERS = 2.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;And then to move the file to the server:&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;data: fichero_out LIKE rlgrap-filename,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;resto TYPE i,&lt;BR /&gt; n_veces TYPE i,&lt;BR /&gt; size TYPE i.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; DATA: BEGIN OF tab_bin OCCURS 0.&lt;BR /&gt; INCLUDE STRUCTURE sdokcntbin.&lt;BR /&gt; DATA: END OF tab_bin.&lt;BR /&gt; &lt;BR /&gt; CLEAR tab_bin.&lt;BR /&gt; REFRESH tab_bin.&lt;BR /&gt; CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'&lt;BR /&gt; EXPORTING&lt;BR /&gt; buffer = g_xmldata&lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt; IMPORTING&lt;BR /&gt; output_length = size&lt;/P&gt;
  &lt;P&gt;TABLES&lt;BR /&gt; binary_tab = tab_bin.&lt;BR /&gt; CLEAR carpeta.&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE dirname INTO carpeta FROM user_dir&lt;BR /&gt; WHERE aliass = 'EFACTURASPROV'.&lt;BR /&gt; CONCATENATE&lt;BR /&gt; carpeta '\' zfe_fracab-cif zfe_fracab-num_fra '.pdf' INTO fichero_out.&lt;BR /&gt; OPEN DATASET fichero_out FOR OUTPUT IN BINARY MODE.&lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt; IF sy-subrc = 0.&lt;BR /&gt; CLEAR: n_veces, resto.&lt;BR /&gt; n_veces = size DIV 1022.&lt;BR /&gt; resto = size MOD 1022.&lt;BR /&gt; LOOP AT tab_bin.&lt;BR /&gt; IF sy-tabix &amp;lt;= n_veces.&lt;BR /&gt; TRANSFER tab_bin-line TO fichero_out.&lt;BR /&gt; ELSE.&lt;BR /&gt; EXIT.&lt;BR /&gt; ENDIF.&lt;BR /&gt; ENDLOOP.&lt;BR /&gt; IF resto &amp;gt; 0.&lt;BR /&gt; TRANSFER tab_bin-line(resto) TO fichero_out.&lt;BR /&gt; ENDIF.&lt;BR /&gt; CLOSE DATASET fichero_out.&lt;BR /&gt; ENDIF.&lt;/P&gt;
  &lt;P&gt;I can now see the file in AL11 but it is wrong created. Maybe I'm missing something?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks in advance!&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Maria&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 13:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511028#M17998</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-11-28T13:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511029#M17999</link>
      <description>&lt;P&gt;You are overcomplexifying. Do everything in binary, because PDF is said to be a "binary" file:&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;FTP_COMMAND: don't ascii&lt;/LI&gt;
   &lt;LI&gt;FTP_SERVER_TO_R3: use binary (character mode = abap_false, and take BLOB parameter into a variable TABLE OF x255 (255 bytes) for instance)&lt;/LI&gt;
   &lt;LI&gt;concatenate lines of blob into xstring in byte mode&lt;/LI&gt;
   &lt;LI&gt;xstring = xstring(bloblength)&lt;/LI&gt;
   &lt;LI&gt;after the OPEN DATASET IN BINARY MODE, do only one TRANSFER xstring, followed by CLOSE DATASET&lt;/LI&gt;
  &lt;/UL&gt;</description>
      <pubDate>Tue, 28 Nov 2017 18:09:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511029#M17999</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-28T18:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511030#M18000</link>
      <description>&lt;P&gt;Thanks for your answer, but I'm not able to reach to the solution.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 16:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511030#M18000</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-12-28T16:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511031#M18001</link>
      <description>&lt;P&gt;How do you know that "it's wrong created" ? Maybe it's correctly created, but you &lt;STRONG&gt;incorrectly&lt;/STRONG&gt; read/use it...&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 16:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511031#M18001</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-28T16:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511032#M18002</link>
      <description>&lt;P&gt;I understand that "it doesn't work". What did you try, what did you get, what was incorrect?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 16:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511032#M18002</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-28T16:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511033#M18003</link>
      <description>&lt;P&gt;I agree with Sandra that you might be complicating this. Try separating the FTP piece from the rest and it'd be much easier to see what the problem is exactly. Please also post more details.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 21:54:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511033#M18003</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-12-28T21:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511034#M18004</link>
      <description>&lt;P&gt;I tried like this (in a new program just to do some tests..) but it doesn't work&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;TYPES: BEGIN OF text,&lt;BR /&gt; line(400) TYPE c,&lt;BR /&gt; END OF text.&lt;BR /&gt; TYPES: BEGIN OF ty_xml,&lt;BR /&gt; raw(4000) TYPE c,&lt;BR /&gt; END OF ty_xml.&lt;BR /&gt; &lt;BR /&gt; DATA: user(30) TYPE c ,&lt;BR /&gt; pwd(30) TYPE c ,&lt;BR /&gt; host(64) TYPE c ,&lt;BR /&gt; slen TYPE i,&lt;BR /&gt; key TYPE i VALUE 26101957,&lt;BR /&gt; hdl TYPE i,&lt;BR /&gt; dest TYPE rfcdes-rfcdest,&lt;BR /&gt; g_str TYPE string,&lt;BR /&gt; g_xmldata TYPE xstring,&lt;BR /&gt; l_lin(2048),&lt;BR /&gt; extension(100).&lt;BR /&gt; DATA: bindata TYPE TABLE OF blob WITH HEADER LINE,&lt;BR /&gt; result TYPE TABLE OF text WITH HEADER LINE,&lt;BR /&gt; chardata TYPE TABLE OF text WITH HEADER LINE,&lt;BR /&gt; g_t_xml_tab TYPE TABLE OF ty_xml INITIAL SIZE 0,&lt;BR /&gt; i_fich TYPE TABLE OF epsfili WITH HEADER LINE,&lt;BR /&gt; blob_length TYPE i,&lt;BR /&gt; l_xstring TYPE xstring,&lt;BR /&gt; fichero_out LIKE rlgrap-filename,"(255),&lt;BR /&gt; carpeta LIKE user_dir-dirname.&lt;BR /&gt; &lt;BR /&gt; START-OF-SELECTION.&lt;BR /&gt; &lt;BR /&gt; pwd = xxxxxxxxxxx.&lt;BR /&gt; user = xxxxxxxxxxxxxxx.&lt;BR /&gt; host = xxxxxx.&lt;BR /&gt; &lt;BR /&gt; slen = strlen( pwd ) .&lt;BR /&gt; * SAP Application Server -&amp;gt; FTP Server&lt;BR /&gt; dest = 'SAPFTPA'.&lt;BR /&gt; &lt;BR /&gt; * La contraseña hay que formatearla&lt;BR /&gt; CALL FUNCTION 'HTTP_SCRAMBLE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; source = pwd&lt;BR /&gt; sourcelen = slen&lt;BR /&gt; key = key&lt;BR /&gt; IMPORTING&lt;BR /&gt; destination = pwd.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'&lt;BR /&gt; EXPORTING&lt;BR /&gt; text = 'Connect to FTP Server'.&lt;BR /&gt; &lt;BR /&gt; * Conectamos al directorio FTP&lt;BR /&gt; CALL FUNCTION 'FTP_CONNECT'&lt;BR /&gt; EXPORTING&lt;BR /&gt; user = user&lt;BR /&gt; password = pwd&lt;BR /&gt; host = host&lt;BR /&gt; rfc_destination = dest&lt;BR /&gt; IMPORTING&lt;BR /&gt; handle = hdl&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; not_connected = 1&lt;BR /&gt; OTHERS = 2.&lt;BR /&gt; &lt;BR /&gt; IF sy-subrc = 0.&lt;BR /&gt; &lt;BR /&gt; * Ponemos modo pasivo&lt;BR /&gt; CALL FUNCTION 'FTP_COMMAND'&lt;BR /&gt; EXPORTING&lt;BR /&gt; handle = hdl&lt;BR /&gt; command = 'set passive off'&lt;BR /&gt; TABLES&lt;BR /&gt; data = result&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; OTHERS = 1.&lt;BR /&gt; CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'&lt;BR /&gt; EXPORTING&lt;BR /&gt; text = 'Create file on FTP Server'.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'FTP_COMMAND'&lt;BR /&gt; EXPORTING&lt;BR /&gt; handle = hdl&lt;BR /&gt; command = 'ascii'&lt;BR /&gt; TABLES&lt;BR /&gt; data = result&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; tcpip_error = 1&lt;BR /&gt; command_error = 2&lt;BR /&gt; data_error = 3.&lt;BR /&gt; &lt;BR /&gt; * Nos movemos a la carpeta DOWNLOAD&lt;BR /&gt; CALL FUNCTION 'FTP_COMMAND'&lt;BR /&gt; EXPORTING&lt;BR /&gt; handle = hdl&lt;BR /&gt; command = 'cd DOWNLOAD'&lt;BR /&gt; TABLES&lt;BR /&gt; data = result&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; tcpip_error = 1&lt;BR /&gt; command_error = 2&lt;BR /&gt; data_error = 3.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'FTP_COMMAND'&lt;BR /&gt; EXPORTING&lt;BR /&gt; handle = hdl&lt;BR /&gt; command = 'dir'&lt;BR /&gt; TABLES&lt;BR /&gt; data = result&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; tcpip_error = 1&lt;BR /&gt; command_error = 2&lt;BR /&gt; data_error = 3.&lt;BR /&gt; &lt;BR /&gt; LOOP AT result.&lt;BR /&gt; IF result CS 'pdf' .&lt;BR /&gt; i_fich-name = result+62(50).&lt;BR /&gt; APPEND i_fich.&lt;BR /&gt; ENDIF.&lt;BR /&gt; ENDLOOP.&lt;BR /&gt; LOOP AT i_fich.&lt;BR /&gt; * Se descarga el archivo del servidor&lt;BR /&gt; CALL FUNCTION 'FTP_SERVER_TO_R3'&lt;BR /&gt; EXPORTING&lt;BR /&gt; handle = hdl&lt;BR /&gt; fname = i_fich-name&lt;BR /&gt; * character_mode = 'X'&lt;BR /&gt; character_mode = abap_false&lt;BR /&gt; IMPORTING&lt;BR /&gt; blob_length = blob_length&lt;BR /&gt; TABLES&lt;BR /&gt; blob = bindata&lt;BR /&gt; text = g_t_xml_tab&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; tcpip_error = 1&lt;BR /&gt; command_error = 2&lt;BR /&gt; data_error = 3&lt;BR /&gt; OTHERS = 4.&lt;BR /&gt; LOOP AT bindata.&lt;BR /&gt; CONCATENATE bindata-content l_xstring&lt;BR /&gt; INTO l_xstring IN BYTE MODE.&lt;BR /&gt; ENDLOOP.&lt;BR /&gt; SELECT SINGLE dirname INTO carpeta FROM user_dir&lt;BR /&gt; WHERE aliass = 'EFACTURASPROV'.&lt;BR /&gt; CONCATENATE&lt;BR /&gt; carpeta '\' 'XXXX' '.pdf' INTO fichero_out.&lt;BR /&gt; OPEN DATASET fichero_out FOR OUTPUT IN BINARY MODE.&lt;BR /&gt; TRANSFER l_xstring TO fichero_out.&lt;BR /&gt; &lt;BR /&gt; CLOSE DATASET fichero_out.&lt;BR /&gt; &lt;BR /&gt; ENDLOOP.&lt;BR /&gt; &lt;BR /&gt; ENDIF.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 09:04:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511034#M18004</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-12-29T09:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511035#M18005</link>
      <description>&lt;P&gt;How do you know that "it's wrong created" ? Maybe it's correctly created, but you &lt;STRONG&gt;incorrectly&lt;/STRONG&gt; read/use it...&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;"it doesn't work" should be banned from language, if you don't explain what you tried, what you got, what is incorrect versus what you expect.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 11:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511035#M18005</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-29T11:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511036#M18006</link>
      <description>&lt;P&gt;I think I did what you told me (code below), I can see the file in AL11 but when I open I get a wrong file error.&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Maria&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 11:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511036#M18006</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-12-29T11:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511037#M18007</link>
      <description>&lt;P&gt;Sandra, I think I have explained what I tried (code attached), and "it doesn't work" is perfectly used in this case. &lt;/P&gt;
  &lt;P&gt;Once the pdf is in R3 it should be displayed from another transaction created for this purpose. &lt;/P&gt;
  &lt;P&gt;If I upload the file using CG3Z it works ok. &lt;/P&gt;
  &lt;P&gt;If I do it from my program connecting to FTP I think I'm missing something in my code because I get an error saying the file is damaged or not admitted. &lt;/P&gt;
  &lt;P&gt;So, I really appreciate your help as long as it is well-intentioned, I only use SCN to ask for some help when I've done my best to solve something and I can't reach to a solution, and that's what I'm doing. Any help will be appreciated, we are not in this community to criticize. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 12:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511037#M18007</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2017-12-29T12:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511038#M18008</link>
      <description>&lt;P&gt;Why are you (still) using ASCII FTP command?&lt;/P&gt;
  &lt;P&gt;And you also forgot to "cut" xstring to the correct length (blob_length) of file as Sandra already told you.&lt;/P&gt;
  &lt;P&gt;After these two problems I think it might be OK and file readable.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 14:09:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511038#M18008</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2017-12-29T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511039#M18009</link>
      <description>&lt;P&gt;Thank you for telling about CG3Z and your custom program to display the file, this is very helpful as it answers my question about how you know whether the issue is about writing the file versus reading the file.&lt;/P&gt;
  &lt;P&gt;Thank you for telling about the file is "damaged or not admitted", because one of the well-known reasons is that the file contains erroneous extra null bytes, and I see that you don't take into account the size of the file transmitted (parameter BLOB_LENGTH). You may use:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TRANSFER l_xstring TO fichero_out LENGTH blob_length.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So, the issue is not about FTP, but how you create the file on the ABAP server.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 15:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511039#M18009</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-29T15:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511040#M18010</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/11727/mariamerino.html"&gt;Maria Merino&lt;/A&gt; &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I am facing the same issue as you, followed the procedure provided by &lt;A href="https://answers.sap.com/users/1091/sandrarossi.html"&gt;Sandra Rossi&lt;/A&gt; still I get the below error &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Did you solve the issue?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Code Snippet:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;OPEN DATASET filnm FOR OUTPUT IN BINARY MODE.&lt;BR /&gt; TRANSFER l_xstring TO filnm LENGTH blob_length.&lt;BR /&gt; CLOSE DATASET filnm.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Error message:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/128397-pdf-msg1.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 12:05:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511040#M18010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-02T12:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511041#M18011</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/1059/tomasburyanek.html"&gt;Tomas Buryanek&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Even after both steps, it doesn't work...do you have any other solution?&lt;/P&gt;
  &lt;P&gt;Would be helpful if you can share&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 02:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511041#M18011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-03T02:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: PDF to application server using FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511042#M18012</link>
      <description>&lt;P&gt;Hey guys, &lt;/P&gt;
  &lt;P&gt;Solved it myself.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;By adding casting before Xstring byte mode conversion.&lt;/P&gt;
  &lt;P&gt;Thanks for the above posts, quite helpful.&lt;/P&gt;
  &lt;P&gt;Cheers,&lt;/P&gt;
  &lt;P&gt;Kishore&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 02:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-to-application-server-using-ftp/m-p/511042#M18012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-03T02:28:26Z</dc:date>
    </item>
  </channel>
</rss>

