<?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: Rename file on application server using Call 'Systemcommand not successful. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459247#M216914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minami&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could program a "normal" BAT file with the command to rename the file: rename &amp;lt;drive&amp;gt;:\&amp;lt;old file&amp;gt; &amp;lt;new file&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have created the BAT file you create an external command via transaction SM69 where execute the BAT file you have just created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have 2 ways of executing your external command: either online via transaction SM49 or you can code an ABAP program to execute the external command via submitting a batchjob. You do this by calling the following functions in the listed order:&lt;/P&gt;&lt;P&gt;1. JOB_OPEN&lt;/P&gt;&lt;P&gt;2. JOB_SUBMIT&lt;/P&gt;&lt;P&gt;2a. If the submit function fails you execute function: BP_JOB_DELETE&lt;/P&gt;&lt;P&gt;3. JOB_CLOSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Arne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jul 2006 07:18:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-05T07:18:40Z</dc:date>
    <item>
      <title>Rename file on application server using Call 'Systemcommand not successful.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459244#M216911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Does anybody know what the return code (sy-subrc = 1-) mean when calling external command using:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call 'SYSTEM' id 'COMMAND' field cmd id 'TAB'   field  ITAB-*SYS*.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;where the cmd is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cp &amp;lt;old file name including full directory address&amp;gt; &amp;lt;new file name in the same directory&amp;gt; ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The goal is the copy the old file to a new file and both exists in the same directory on the application server. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have check the authorization and get the sy-subrc = 0 for both of the following checks:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AUTHORITY-CHECK OBJECT 'S_C_FUNCT' ID 'PROGRAM' FIELD SY-REPID ID 'ACTVT'     FIELD '16' ID 'CFUNCNAME' FIELD 'C_DIR_READ_START'.

AUTHORITY-CHECK OBJECT 'S_C_FUNCT' ID 'PROGRAM'   FIELD SY-REPID ID 'ACTVT' FIELD '16' ID 'CFUNCNAME' FIELD 'SYSTEM'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the file will be huge, OPEN another dataset is&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 18:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459244#M216911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T18:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rename file on application server using Call 'Systemcommand not successful.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459245#M216912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Continue....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the file is huge, open another dataset for the new file is not preferable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose is to rename a file (or copy) a file to a new file name after the data is extraction completely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Minami&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 18:28:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459245#M216912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-28T18:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rename file on application server using Call 'Systemcommand not successful.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459246#M216913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure about call statements, but you can create an external command at OS level with 'MV' command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And execute the same using SXGP~&lt;STRONG&gt;EXECUTE&lt;/STRONG&gt;COMMAND FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then delete the old file after successfully execute of the above FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2006 19:03:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459246#M216913</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-06-28T19:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rename file on application server using Call 'Systemcommand not successful.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459247#M216914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minami&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could program a "normal" BAT file with the command to rename the file: rename &amp;lt;drive&amp;gt;:\&amp;lt;old file&amp;gt; &amp;lt;new file&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have created the BAT file you create an external command via transaction SM69 where execute the BAT file you have just created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have 2 ways of executing your external command: either online via transaction SM49 or you can code an ABAP program to execute the external command via submitting a batchjob. You do this by calling the following functions in the listed order:&lt;/P&gt;&lt;P&gt;1. JOB_OPEN&lt;/P&gt;&lt;P&gt;2. JOB_SUBMIT&lt;/P&gt;&lt;P&gt;2a. If the submit function fails you execute function: BP_JOB_DELETE&lt;/P&gt;&lt;P&gt;3. JOB_CLOSE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Arne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2006 07:18:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459247#M216914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-05T07:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rename file on application server using Call 'Systemcommand not successful.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459248#M216915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minami,&lt;/P&gt;&lt;P&gt;I need to rename the file on Appl server in my program please tell me how did you do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dany&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 14:33:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rename-file-on-application-server-using-call-systemcommand-not-successful/m-p/1459248#M216915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-20T14:33:54Z</dc:date>
    </item>
  </channel>
</rss>

