<?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: Function module to get files from application server into internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721620#M33710</link>
    <description>&lt;P&gt;Hi Sahoo,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Try this FM TXW_FILE_OPEN_FOR_READ or creating "Z" Class~method or FM with below ABAP code.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;...
OPEN DATASET &amp;lt;filename&amp;gt; FOR ... IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.
   MESSAGE or EXCEPTION...
ELSE.
   DO.
      READ DATASET &amp;lt;filename&amp;gt; INTO work-area.
      IF sy-subrc NE 0.
         EXIT.
      ELSE.
         APPEND work-area TO internal table.
      ENDIF.
      CLEAR: work-area.
   ENDDO.
ENDIF.

CLOSE DATASET &amp;lt;filename&amp;gt;.
IF sy-subrc NE 0.
   MESSAGE or EXCEPTION...
ENDIF.
...&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 16:33:04 GMT</pubDate>
    <dc:creator>roberto_forti</dc:creator>
    <dc:date>2018-07-26T16:33:04Z</dc:date>
    <item>
      <title>Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721607#M33697</link>
      <description>&lt;P&gt;Hello Friends,&lt;/P&gt;
  &lt;P&gt;I am looking function modules for get files from application server path to internal table, I got some function modules but it is not working. Please suggest.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;RZL_READ_DIR_LOCAL&lt;/P&gt;
  &lt;P&gt;EPS_GET_DIRECTORY_LISTING&lt;/P&gt;
  &lt;P&gt;both are giving error file not found, but if I go with same path in AL11, I can see the files.&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 07:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721607#M33697</guid>
      <dc:creator>ram_sahoo</dc:creator>
      <dc:date>2018-07-26T07:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721608#M33698</link>
      <description>&lt;P&gt;I don't know of any function modules but here's something I've seen used in the past.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;data: begin of lt_tabl occurs 0,
 line type c length 2000,
 end of lt_tabl.
data: ls_line type c length 2000.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;data: i_tab type table of string.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;data: l_f_dir type c length 128,
 l_t_dir type c length 128,
 l_dir type c length 128,
 l_file type c length 30.
 
 l_file = '*.*'.
 l_t_dir = '/usr/sap/trans/log/'.
 concatenate l_t_dir l_file into l_f_dir.

* get files in directory.
 clear: l_dir.
 l_dir(7) = 'ls -ld '.
 l_dir+7(45) = l_f_dir.

 refresh lt_tabl.
 call 'SYSTEM' id 'COMMAND' field l_dir
 id 'TAB' field lt_tabl-*sys*.

 loop at lt_tabl into ls_line.
 refresh i_tab.
 clear l_file.
 split ls_line at '/' into table i_tab.
 check not i_tab[] is initial.
 loop at i_tab into l_file.
 endloop.

 endloop.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 08:51:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721608#M33698</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2018-07-26T08:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721609#M33699</link>
      <description>&lt;P&gt;Very bad idea!&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2013/03/06/a-word-about-call-system/" target="test_blank"&gt;https://blogs.sap.com/2013/03/06/a-word-about-call-system/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:38:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721609#M33699</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-07-26T09:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721610#M33700</link>
      <description>&lt;P&gt;R.t.fantastic.m.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenabap_language_files.htm"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenabap_language_files.htm&lt;/A&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;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:39:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721610#M33700</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-07-26T09:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721611#M33701</link>
      <description>&lt;P&gt;Hi Horst,&lt;/P&gt;
  &lt;P&gt;Thanks for the warning. As I said in my answer, it's something I came across in the past that fulfilled the purpose. Knowing the possible issues thanks to your link will have me looking for alternatives.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Regards,&lt;BR /&gt;Arthur&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:51:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721611#M33701</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2018-07-26T09:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721612#M33702</link>
      <description>&lt;P&gt;The link you provided is for presentation server not application server.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 11:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721612#M33702</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2018-07-26T11:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721613#M33703</link>
      <description>&lt;P&gt;"Not working"&lt;/P&gt;
  &lt;P&gt;Is that the actual error message you get? &lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 12:15:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721613#M33703</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-26T12:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721614#M33704</link>
      <description>&lt;P&gt;got solution I was trying in SE37, If we try with program level these function modules will work fine.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 12:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721614#M33704</guid>
      <dc:creator>ram_sahoo</dc:creator>
      <dc:date>2018-07-26T12:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721615#M33705</link>
      <description>&lt;P&gt;I Suppose lowercase checkbox in SE37 test mode... (again)&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 13:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721615#M33705</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-07-26T13:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721616#M33706</link>
      <description>&lt;P&gt;You only read the 2 or 3 first lines?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 13:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721616#M33706</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-07-26T13:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721617#M33707</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;
  &lt;P&gt;Now i got new requirement while collecting files from path should filter with date as per user entered. Any one can suggest how to achieve this kind of requirement.&lt;/P&gt;
  &lt;P&gt;Thanks. &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 13:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721617#M33707</guid>
      <dc:creator>ram_sahoo</dc:creator>
      <dc:date>2018-07-26T13:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721618#M33708</link>
      <description>&lt;P&gt;Looks like you were right Raymond!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:53:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721618#M33708</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-26T14:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721619#M33709</link>
      <description>&lt;P&gt;Ask a new question as a new question. Don't continue this one. Though you might confirm that your problem was caused because you didn't check the "lower case" check box when testing in SE37.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721619#M33709</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-26T14:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get files from application server into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721620#M33710</link>
      <description>&lt;P&gt;Hi Sahoo,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Try this FM TXW_FILE_OPEN_FOR_READ or creating "Z" Class~method or FM with below ABAP code.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;...
OPEN DATASET &amp;lt;filename&amp;gt; FOR ... IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.
   MESSAGE or EXCEPTION...
ELSE.
   DO.
      READ DATASET &amp;lt;filename&amp;gt; INTO work-area.
      IF sy-subrc NE 0.
         EXIT.
      ELSE.
         APPEND work-area TO internal table.
      ENDIF.
      CLEAR: work-area.
   ENDDO.
ENDIF.

CLOSE DATASET &amp;lt;filename&amp;gt;.
IF sy-subrc NE 0.
   MESSAGE or EXCEPTION...
ENDIF.
...&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 16:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-files-from-application-server-into-internal-table/m-p/721620#M33710</guid>
      <dc:creator>roberto_forti</dc:creator>
      <dc:date>2018-07-26T16:33:04Z</dc:date>
    </item>
  </channel>
</rss>

