<?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 File transfer to application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821012#M1314891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;                           I have to &lt;STRONG&gt;transfer a file to application server&lt;/STRONG&gt; and &lt;STRONG&gt;get the file from application server&lt;/STRONG&gt;. After that if the file exist means i have to &lt;STRONG&gt;append  the data to that file in the application server&lt;/STRONG&gt;. Pls help me.&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;Regards,&lt;/P&gt;&lt;P&gt;Ekadevi.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2009 03:44:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-02T03:44:05Z</dc:date>
    <item>
      <title>File transfer to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821012#M1314891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;                           I have to &lt;STRONG&gt;transfer a file to application server&lt;/STRONG&gt; and &lt;STRONG&gt;get the file from application server&lt;/STRONG&gt;. After that if the file exist means i have to &lt;STRONG&gt;append  the data to that file in the application server&lt;/STRONG&gt;. Pls help me.&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;Regards,&lt;/P&gt;&lt;P&gt;Ekadevi.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 03:44:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821012#M1314891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T03:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821013#M1314892</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;*if you want to append to existing file  .&lt;/P&gt;&lt;P&gt; open dataset p_file in text mode for appending.&lt;/P&gt;&lt;P&gt; transfer tab1 to p_file.&lt;/P&gt;&lt;P&gt; sy-subrc ne 0 .                                                                             "if file does not exists .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if you want to create new or replace &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; open dataset p_file in text mode for input.&lt;/P&gt;&lt;P&gt; transfer tab1 to p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_file is file path on appl serever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vinay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vinay kolla on Jul 2, 2009 6:08 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vinay kolla on Jul 2, 2009 6:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 04:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821013#M1314892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T04:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821014#M1314893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;use tcode CG3Z for uploading&lt;/P&gt;&lt;P&gt;and  CG3Y for downloading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter the source file and target file information for the above tcodes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 04:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821014#M1314893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T04:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821015#M1314894</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;&lt;/P&gt;&lt;P&gt; Firstly you upload file to application server using Transaction code " CG3Z ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the in the program ,use following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;open dataset P_File for input in text mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;  read dataset p_file into t_tab(internal table)&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;close dataset p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shambhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 04:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821015#M1314894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T04:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821016#M1314895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;There is a function module - EPS_GET_DIRECTORY_LISTING - it gives the list of directory and its file. Just check whether your given file is there or not. If yes, then use open dataset p_file in text mode for appending&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else   OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt; and then rest code would be same as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_message ASSIGNING &amp;lt;lfs_message&amp;gt; CASTING.&lt;/P&gt;&lt;P&gt;      TRANSFER &amp;lt;lfs_message&amp;gt; TO lv_file.&lt;/P&gt;&lt;P&gt;      CLEAR gs_message.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----Close the file in the application server&lt;/P&gt;&lt;P&gt;    CLOSE DATASET lv_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 04:46:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821016#M1314895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T04:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: File transfer to application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821017#M1314896</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;If you want to transfer the file to App Server through a custom Program, then you need to use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_FILENAME = Complete path with filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open dataset V_FILENAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;if sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;loop at itab into watab.&lt;/P&gt;&lt;P&gt;move watab to V_String.&lt;/P&gt;&lt;P&gt;transfer V_String to V_FILENAME&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to transfer the file to App Server manually then use the transaction.&lt;/P&gt;&lt;P&gt;CG3Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to get the file from App Server through a custom Program, then you need to use&lt;/P&gt;&lt;P&gt;Open dataset V_FILENAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;if SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;Read dataset V_FILENAME INTO V_STRING.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Move this V_string to Wa&lt;/P&gt;&lt;P&gt;append wa to itab&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to Copy the file from App Server manually then use the transaction.&lt;/P&gt;&lt;P&gt;CG3Y&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to append the file , then first find out if the file is present in the asked location or not.&lt;/P&gt;&lt;P&gt;Call the FM to List all the Files in the directory - 'RZL_READ_DIR_LOCAL' and store the data in an internal table&lt;/P&gt;&lt;P&gt;Search this internal table to see if the file already exists.&lt;/P&gt;&lt;P&gt;if it is present use&lt;/P&gt;&lt;P&gt;OPEN dataset V_FILENAME in text mode for appending. &lt;/P&gt;&lt;P&gt;if sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;loop at itab into watab.&lt;/P&gt;&lt;P&gt;move watab to V_String.&lt;/P&gt;&lt;P&gt;transfer V_String to V_FILENAME&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not forget to CLOSE DATEST after opening it.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2009 05:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-to-application-server/m-p/5821017#M1314896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-02T05:04:21Z</dc:date>
    </item>
  </channel>
</rss>

