<?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: Problem in uploading file from Application Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002313#M407760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You can also use to move the file like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: COMMAND(200).&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF TABL OCCURS 0, &lt;/P&gt;&lt;P&gt;LINE(255), &lt;/P&gt;&lt;P&gt;END OF TABL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;command = 'mv /home/prd/file.in /home/prd/processed/file.out'.&lt;/P&gt;&lt;P&gt;CALL 'SYSTEM' ID 'COMMAND' FIELD COMMAND ID 'TAB' FIELD TABM-&lt;STRONG&gt;SYS&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2007 03:47:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-22T03:47:58Z</dc:date>
    <item>
      <title>Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002308#M407755</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 got a problem in uplaoding a file from application server.i am having two folder (one folder name is current and another one is processed)in application server. In current folder i am having N no of files.I want to upload all the files names into one internal table and i want to process one by one file.After processing each file the file should be moved to processed folder and the files should not exist in current folder.All these process must be done everyday.Please rectify my problem asap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 15:10:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002308#M407755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T15:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002309#M407756</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; You have to write few lines of code to meet your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EPS_GET_DIRECTORY_LISTING gives the list of fiels in a specified direcotry.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  you can process one by one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 15:15:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002309#M407756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T15:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002310#M407757</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 i am using this FM after executing it is going to dump giving the error as NO AUTHORIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ramesh kodavati&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 03:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002310#M407757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T03:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002311#M407758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That means you don't have authorization. You have to use that function module to get the list of files, so get your basis people add that authority to your user profile.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 03:38:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002311#M407758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T03:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002312#M407759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take authorization from basis guy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the below code to get the list of files from require directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZDIRFILES                                                   *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZDIRFILES    .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER: p_fdir            type pfeflnamel DEFAULT '/usr/sap/tmp'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_filedir occurs 10.&lt;/P&gt;&lt;P&gt;        include structure salfldir.&lt;/P&gt;&lt;P&gt;data: end of it_filedir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Current Directory Listing for OUT Dir&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'RZL_READ_DIR_LOCAL'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            name     = p_fdir&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            file_tbl = it_filedir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in internal table "it_filedir"  will have all your files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For moving and deleting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0001.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Parameters: d1 type localfile default '/usr/sap/TST/SYS/fld1/Data1.txt',&lt;/P&gt;&lt;P&gt;            d2 type localfile default '/usr/sap/TST/SYS/fld2/Data1.txt'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      rec(20) type c,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;data: wa(20) type c.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  open dataset d1 for input in text mode.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    do.&lt;/P&gt;&lt;P&gt;      read dataset d1 into wa.&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;      itab-rec = wa.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  close dataset d1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  open dataset d2 for output in text mode.&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;P&gt;    transfer itab to d2.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  close dataset d2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  delete dataset d1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below FM if required &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To move the file to archive directoryuse FMs 'PFL_COPY_OS_FILE' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Delete 'EPS_DELETE_FILE'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forgot to reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 03:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002312#M407759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T03:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002313#M407760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  You can also use to move the file like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: COMMAND(200).&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF TABL OCCURS 0, &lt;/P&gt;&lt;P&gt;LINE(255), &lt;/P&gt;&lt;P&gt;END OF TABL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;command = 'mv /home/prd/file.in /home/prd/processed/file.out'.&lt;/P&gt;&lt;P&gt;CALL 'SYSTEM' ID 'COMMAND' FIELD COMMAND ID 'TAB' FIELD TABM-&lt;STRONG&gt;SYS&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 03:47:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002313#M407760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T03:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in uploading file from Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002314#M407761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.dalestech.com/Media/files/docs/file/Programming_with_file_class_100.pdf" target="test_blank"&gt;http://www.dalestech.com/Media/files/docs/file/Programming_with_file_class_100.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 03:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-uploading-file-from-application-server/m-p/2002314#M407761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T03:48:07Z</dc:date>
    </item>
  </channel>
</rss>

