<?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: Reading file from Application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316079#M507885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is fixed length file, you have declare an internal table which is inline with your flatfile. Here atleast you have to know the exact lenght of the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this way you can solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2007 08:03:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-22T08:03:05Z</dc:date>
    <item>
      <title>Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316074#M507880</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;       i need to read a file from application server ,, the file format is fixed one (i.e. no space between fields,,) how to read the file..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz through some idea..&lt;/P&gt;&lt;P&gt;thanks in advance ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:44:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316074#M507880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316075#M507881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can use the DATASET concept(OPEN DATASET, READ DATASET) to read the application server file.&lt;/P&gt;&lt;P&gt;But how to separate the fields from that file? there should be some separators(delimitors) used if it have number of fields in it.&lt;/P&gt;&lt;P&gt;Is it a text file  without any fields.&lt;/P&gt;&lt;P&gt;The you can read it as it is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:48:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316075#M507881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316076#M507882</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 the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- read file, split lines into fields and put data into table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET v_file_listings FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "Opening the files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ DATASET v_file_listings INTO single_line. "Reading the content of file into line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-index &amp;gt; 1. "skip header-line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT "Split the content of line into work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;single_line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT k_split&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append wa to Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:49:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316076#M507882</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-05-22T07:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316077#M507883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you probably would to it using OPEN and READ DATASET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at this thread: &lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="185920"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316077#M507883</guid>
      <dc:creator>oliver</dc:creator>
      <dc:date>2007-05-22T07:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316078#M507884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no separators between fields ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (e.g.)&lt;/P&gt;&lt;P&gt;     0012356east&lt;/P&gt;&lt;P&gt;i need to read as 001 &lt;/P&gt;&lt;P&gt;                         123 &lt;/P&gt;&lt;P&gt;                         56east ,, it fixed length file without any seperators ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:59:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316078#M507884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316079#M507885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is fixed length file, you have declare an internal table which is inline with your flatfile. Here atleast you have to know the exact lenght of the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this way you can solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 08:03:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316079#M507885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T08:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316080#M507886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;USE  OPEN DATASET STATEMENT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 09:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316080#M507886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T09:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316081#M507887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you probably don't know that it's good practice to close a thread once it's answered. Please also consider giving points for helpful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; best regards,&lt;/P&gt;&lt;P&gt;  ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 12:41:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316081#M507887</guid>
      <dc:creator>oliver</dc:creator>
      <dc:date>2007-05-23T12:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316082#M507888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   Check whether file exists&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OPEN DATASET c_filepath FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  File c_filepath already exists then read that file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  READ DATASET c_filepath.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;error message.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 10:26:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316082#M507888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T10:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316083#M507889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this fn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    i_file_front_end          = client_path&lt;/P&gt;&lt;P&gt;    i_file_appl               = server_path&lt;/P&gt;&lt;P&gt;   I_FILE_OVERWRITE          = 'X'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      FE_FILE_OPEN_ERROR        = 1&lt;/P&gt;&lt;P&gt;      FE_FILE_EXISTS            = 2&lt;/P&gt;&lt;P&gt;      FE_FILE_WRITE_ERROR       = 3&lt;/P&gt;&lt;P&gt;      AP_NO_AUTHORITY           = 4&lt;/P&gt;&lt;P&gt;      AP_FILE_OPEN_ERROR        = 5&lt;/P&gt;&lt;P&gt;      AP_FILE_EMPTY             = 6&lt;/P&gt;&lt;P&gt;      OTHERS                    = 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Maharshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 11:23:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316083#M507889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-03T11:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reading file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316084#M507890</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;Check this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3c7f358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3c7f358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vadi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 11:41:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-file-from-application-server/m-p/2316084#M507890</guid>
      <dc:creator>i048168</dc:creator>
      <dc:date>2008-01-03T11:41:52Z</dc:date>
    </item>
  </channel>
</rss>

