<?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 Getting .CSV file from sap server, using Logical File and module FILE_GET_NAME to retrieve in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-csv-file-from-sap-server-using-logical-file-and-module-file-get/m-p/11909773#M1963079</link>
    <description>&lt;P&gt;Hi &lt;/P&gt;
  &lt;P&gt;I have googled but cannot find an example of how to get a .csv file from the SAP server (AL11) into an internal table in my program. I want to use Logical File transaction FILE to specify where the file path. Then I assume I would use function FILE_GET_NAME to get the file before using open_dataset etc.&lt;/P&gt;
  &lt;P&gt;The problem is I cannot get the Logical File to work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 14:00:48 GMT</pubDate>
    <dc:creator>former_member201275</dc:creator>
    <dc:date>2019-05-29T14:00:48Z</dc:date>
    <item>
      <title>Getting .CSV file from sap server, using Logical File and module FILE_GET_NAME to retrieve</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-csv-file-from-sap-server-using-logical-file-and-module-file-get/m-p/11909773#M1963079</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;
  &lt;P&gt;I have googled but cannot find an example of how to get a .csv file from the SAP server (AL11) into an internal table in my program. I want to use Logical File transaction FILE to specify where the file path. Then I assume I would use function FILE_GET_NAME to get the file before using open_dataset etc.&lt;/P&gt;
  &lt;P&gt;The problem is I cannot get the Logical File to work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 14:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-csv-file-from-sap-server-using-logical-file-and-module-file-get/m-p/11909773#M1963079</guid>
      <dc:creator>former_member201275</dc:creator>
      <dc:date>2019-05-29T14:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting .CSV file from sap server, using Logical File and module FILE_GET_NAME to retrieve</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-csv-file-from-sap-server-using-logical-file-and-module-file-get/m-p/11909774#M1963080</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To read the file path used bellow link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/questions/10308209/fm-to-read-a-file-path-based-on-al11-profile.html"&gt;https://answers.sap.com/questions/10308209/fm-to-read-a-file-path-based-on-al11-profile.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To read the CSV file, use bellow&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN DATASET filename FOR INPUT IN TEXT MODE
                ENCODING DEFAULT MESSAGE msg.   
IF SY-SUBRC EQ 0.
DO.
   READ DATASET filename INTO l_string.
   IF sy-subrc NE 0.
     EXIT.
   ELSE.
     SPLIT l_string AT ',' INTO WA-FIELD1  WA-FIELD2 ..... WA-FIELDn.
     APPEND wa to datatab.
   ENDIF.
ENDDO.
  CLOSE DATASET filename.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 15:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-csv-file-from-sap-server-using-logical-file-and-module-file-get/m-p/11909774#M1963080</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2019-05-29T15:30:54Z</dc:date>
    </item>
  </channel>
</rss>

