<?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: Match code for getting file names from SAP App Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228809#M138676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frinee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may try to use this FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RZL_READ_DIR&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RZL_READ_DIR_LOCAL&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Read a directory on the Application Server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2006 15:22:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-14T15:22:51Z</dc:date>
    <item>
      <title>Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228804#M138671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I build a match code that retrieve the files from the SAP application server????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;P&gt;Frinee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 14:27:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228804#M138671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T14:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228805#M138672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so you've to create and fill a customer table with your file  names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or try to work with logical filenames (transaction: 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;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 14:37:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228805#M138672</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-03-14T14:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228806#M138673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the class/method as below.  You just have to point it to the correct path.  Here I am access my sneak preview file system,  you can do the same across the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.


parameters: p_file type localfile.


at selection-screen on value-request for p_file.


  data: ifile type filetable.
  data: xfile like line of ifile.
  data: rc type i.

  call method cl_gui_frontend_services=&amp;gt;file_open_dialog
    exporting
       initial_directory       = 'usrsapnsp'
    changing
      file_table              = ifile
      rc                      = rc.

  read table ifile into xfile index 1.
  check sy-subrc = 0.
  p_file = xfile-filename.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 14:37:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228806#M138673</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-14T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228807#M138674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, here I am accessing our test system's application layer thru the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.


parameters: p_file type localfile.


at selection-screen on value-request for p_file.


  data: ifile type filetable.
  data: xfile like line of ifile.
  data: rc type i.

  call method cl_gui_frontend_services=&amp;gt;file_open_dialog
    exporting
       initial_directory
        = '\&amp;lt;ip_address&amp;gt;qfilesvr400&amp;lt;as400_name&amp;gt;usrsapTST'
    changing
      file_table              = ifile
      rc                      = rc.

  read table ifile into xfile index 1.
  check sy-subrc = 0.
  p_file = xfile-filename.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 14:41:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228807#M138674</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-14T14:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228808#M138675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!!! thanks for your quick answers!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich, I tried your solution, I copied and pasted the code and the match code pointed to my local files in my C drive. I don't understand why because the method has an initial directory directly to SAP server, I tried it using \tmp, it didn't work...&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Frinee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 15:16:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228808#M138675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T15:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228809#M138676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frinee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may try to use this FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RZL_READ_DIR&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RZL_READ_DIR_LOCAL&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Read a directory on the Application Server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 15:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228809#M138676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T15:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228810#M138677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must use the full path to your application server, notice my second example program,  I have to point to the IP address, AS400 system name, etc.  Using \tmp will not get you there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 15:25:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228810#M138677</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-14T15:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228811#M138678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answers!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't use Rich's solution because I don't have the server information (IP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I user this function modules I luckely found:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RFC_SYSTEM_INFO&lt;/P&gt;&lt;P&gt;F4_DXFILENAME_TOPRECURSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They worked fine!!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frinee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 17:50:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228811#M138678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T17:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228812#M138679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice find.  But it does not allow to go to other specific directories?  Here is an example program using this function(for all others benefit).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001.


parameters: p_file type  dxfields-longpath.

at selection-screen on value-request for p_file.

  call function 'F4_DXFILENAME_TOPRECURSION'
       importing
            o_path   = p_file.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 17:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228812#M138679</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-14T17:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Match code for getting file names from SAP App Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228813#M138680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich!!! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Frinee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 18:05:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/match-code-for-getting-file-names-from-sap-app-server/m-p/1228813#M138680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T18:05:49Z</dc:date>
    </item>
  </channel>
</rss>

