<?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 PDF file write to application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048860#M1611629</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 write PDF file to application server while downloading its writing but in this manner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%PDF-1.6#%####&lt;/P&gt;&lt;P&gt;108 0 obj#&amp;lt;&amp;lt;/First 17/Length 108/Filter/FlateDecode/N 3/Type/ObjStm&amp;gt;&amp;gt;stream&lt;/P&gt;&lt;P&gt;xڲT0P04Q07W05#2,#ll##K#J*#R#C####Sbq#[&lt;SUB&gt;^##GjNYjIfr##S&lt;/SUB&gt;N##k&lt;SUP&gt;r~Jf&lt;/SUP&gt;#~xf#c^q&amp;amp;##Ҧ##agG#a####X###T##XR### ##b#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know where i am doing wrong.&lt;/P&gt;&lt;P&gt;Please see below my code .&lt;/P&gt;&lt;P&gt;(the scenario is when i download the pdf file i want to write the same file in to app server )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call function fm_name
    exporting
      /1bcdwb/docparams  = fp_docparams "
      ls_header          = ls_waste
      lt_item            = gt_rkpf
      aufnr              = lv_aufnr
    importing
      /1bcdwb/formoutput = fp_formoutput
    exceptions
      usage_error        = 1
      system_error       = 2
      internal_error     = 3
      others             = 4.
 
 concatenate 'D:\temp\PROCESSORDER_' ls_waste-rsnum   '.PDF' into lv_file.
    pr_file = lv_file.
 
  open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
  if sy-subrc  0.
    exit.
  endif.
  transfer fp_formoutput-pdf  to pr_file.
  close dataset pr_file.
  clear :fp_formoutput-pdf,lv_file.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please any one help me thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jul 2011 07:46:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-26T07:46:21Z</dc:date>
    <item>
      <title>PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048860#M1611629</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 write PDF file to application server while downloading its writing but in this manner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%PDF-1.6#%####&lt;/P&gt;&lt;P&gt;108 0 obj#&amp;lt;&amp;lt;/First 17/Length 108/Filter/FlateDecode/N 3/Type/ObjStm&amp;gt;&amp;gt;stream&lt;/P&gt;&lt;P&gt;xڲT0P04Q07W05#2,#ll##K#J*#R#C####Sbq#[&lt;SUB&gt;^##GjNYjIfr##S&lt;/SUB&gt;N##k&lt;SUP&gt;r~Jf&lt;/SUP&gt;#~xf#c^q&amp;amp;##Ҧ##agG#a####X###T##XR### ##b#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know where i am doing wrong.&lt;/P&gt;&lt;P&gt;Please see below my code .&lt;/P&gt;&lt;P&gt;(the scenario is when i download the pdf file i want to write the same file in to app server )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call function fm_name
    exporting
      /1bcdwb/docparams  = fp_docparams "
      ls_header          = ls_waste
      lt_item            = gt_rkpf
      aufnr              = lv_aufnr
    importing
      /1bcdwb/formoutput = fp_formoutput
    exceptions
      usage_error        = 1
      system_error       = 2
      internal_error     = 3
      others             = 4.
 
 concatenate 'D:\temp\PROCESSORDER_' ls_waste-rsnum   '.PDF' into lv_file.
    pr_file = lv_file.
 
  open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
  if sy-subrc  0.
    exit.
  endif.
  transfer fp_formoutput-pdf  to pr_file.
  close dataset pr_file.
  clear :fp_formoutput-pdf,lv_file.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please any one help me thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 07:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048860#M1611629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-26T07:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048861#M1611630</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;can you explain what exactly the problem? Do you have the file on the application server after execution your program is complete? How do you manage to see the file with these symbols?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 08:57:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048861#M1611630</guid>
      <dc:creator>AlexanderOv</dc:creator>
      <dc:date>2011-07-26T08:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048862#M1611631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't tranfer the whole PDF data with just one transfer statement, instead you have to loop that table and transfer the data to the file until you reach the last row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
  if sy-subrc  0.
    exit.
  endif.
  loop at fp_formoutput-pdf  *****************
    transfer fp_formoutput-pdf  to pr_file. 
  endloop.
  close dataset pr_file.
  clear :fp_formoutput-pdf,lv_file.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048862#M1611631</guid>
      <dc:creator>former_member209703</dc:creator>
      <dc:date>2011-07-26T09:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048863#M1611632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after writing my file i can see using AL11 transaction , why i want to see is after writer user want to change that data and he want to move that file into archive folder in server then i have to read right now they can't modify becz it is not in text mode it is like symbols they don't no where they want to modify.&lt;/P&gt;&lt;P&gt;please tell me what i  have to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048863#M1611632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-26T09:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048864#M1611633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jose ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply, fp_formoutput-pdf is structure not a table from fm i am getting only one string not a table i changed to table and loop and transferd but the problem is same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me what i have to do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:08:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048864#M1611633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-26T09:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048865#M1611634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to try checking you file, if it is correct. If the file on server is not correct, you need to add catching exceptions (like CX_SY_FILE_OPEN, CX_SY_CODEPAGE_CONVERTER_INIT  etc.).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048865#M1611634</guid>
      <dc:creator>AlexanderOv</dc:creator>
      <dc:date>2011-07-26T09:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048866#M1611635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I still don't know what is wrong, if the PDF file is created succesfully and you can see it in the AL11, I don't see where the problem is. Obviously you won't get to see the PDF file via AL11 to check whether the file is corrupted or not after creating it.&lt;/P&gt;&lt;P&gt;One thing you can do to check that out is using the standard FM ARCHIVEFILE_SERVER_TO_CLIENT. This way you can download the file you've just created to your PC and open it there, so you can check if the file in the server is OK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:19:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048866#M1611635</guid>
      <dc:creator>former_member209703</dc:creator>
      <dc:date>2011-07-26T09:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048867#M1611636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander and Jose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for quick reply , where i have to pass these exceptions right now i am passing to fm call function fm_name but in debug i can see sy-subrc = 0 and is there any other way to write file to server. &lt;/P&gt;&lt;P&gt;And one more thing i am wondering is i downloaed the file using cg3y from server it is showing correct data and in pdf format &lt;/P&gt;&lt;P&gt;but after upload why it is showing in correct format (not readable format) ,&lt;/P&gt;&lt;P&gt;can you please help me is there any other way i can write pdf file to application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048867#M1611636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-26T09:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048868#M1611637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jose,&lt;/P&gt;&lt;P&gt;i can't se this FM in my system ARCHIVEFILE_SERVER_TO_CLIENT (ECC 6)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 09:46:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048868#M1611637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-26T09:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048869#M1611638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As &lt;SPAN __jive_macro_name="user" id="3582362"&gt;&lt;/SPAN&gt; said you won't see pdf via AL11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a thought, try to write extension "pdf" in lower case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 10:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048869#M1611638</guid>
      <dc:creator>AlexanderOv</dc:creator>
      <dc:date>2011-07-26T10:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048870#M1611639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry&lt;/P&gt;&lt;P&gt;ARCHIVFILE_SERVER_TO_CLIENT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 10:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048870#M1611639</guid>
      <dc:creator>former_member209703</dc:creator>
      <dc:date>2011-07-26T10:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048871#M1611640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 02:21:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048871#M1611640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-28T02:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file write to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048872#M1611641</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 am also facing the same problem can you give me some idea how you solved.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 05:40:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-write-to-application-server/m-p/8048872#M1611641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-13T05:40:00Z</dc:date>
    </item>
  </channel>
</rss>

