<?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: Exec a &amp;quot;MV&amp;quot; (move) Linux command from ABAP program using wildcard &amp;quot;*&amp;quot; in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189447#M1625058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forget function modules, SM69 etc. there's an ABAP command in order to perform a SO command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lf_file like rlgrap-filename,&lt;/P&gt;&lt;P&gt;      lf_idx(3) type n,&lt;/P&gt;&lt;P&gt;      cmd(254),&lt;/P&gt;&lt;P&gt;      result(255) occurs 100 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cmd = 'mv /dir_source/* /dir_dest'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call 'SYSTEM' id 'COMMAND' field cmd&lt;/P&gt;&lt;P&gt;                id 'TAB'     field result-&lt;STRONG&gt;sys&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2011 13:03:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-20T13:03:48Z</dc:date>
    <item>
      <title>Exec a "MV" (move) Linux command from ABAP program using wildcard "*"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189446#M1625057</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;I have a problem by using FM "SXPG_COMMAND_EXECUTE", SM49 while i try to move the whole content of a SAP folder into another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Foders are on the same file system:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;source: /tmp/&lt;/P&gt;&lt;P&gt;dest:   /usr/sap/tmp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a command in SM69 named ZMOVE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put OS: Linux (is case sensitive)&lt;/P&gt;&lt;P&gt;        command: "mv"&lt;/P&gt;&lt;P&gt;        parameters: /tmp/* /usr/sap/tmp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hence the final sentence should be "mv /tmp/* /usr/sap/tmp". I did it directly by using program "rsbdcos0" and works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if I try to execute the command ZMOVE from SM49 or using the function module it gives the same error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;mv: cannot stat  /tmp/&lt;/STRONG&gt; ': No such file or directory**&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made several tries by changing the parameter section (also using a script on the same directory).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The permissions are ok, so the only problem seems to be the wildcard (*) character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrizio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 12:46:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189446#M1625057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-19T12:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Exec a "MV" (move) Linux command from ABAP program using wildcard "*"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189447#M1625058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forget function modules, SM69 etc. there's an ABAP command in order to perform a SO command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lf_file like rlgrap-filename,&lt;/P&gt;&lt;P&gt;      lf_idx(3) type n,&lt;/P&gt;&lt;P&gt;      cmd(254),&lt;/P&gt;&lt;P&gt;      result(255) occurs 100 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cmd = 'mv /dir_source/* /dir_dest'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call 'SYSTEM' id 'COMMAND' field cmd&lt;/P&gt;&lt;P&gt;                id 'TAB'     field result-&lt;STRONG&gt;sys&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 13:03:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189447#M1625058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-20T13:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exec a "MV" (move) Linux command from ABAP program using wildcard "*"</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189448#M1625059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing, I was running into the same problem some time ago (with SunOS, not Linux though). The only downside is that this requires a small custom ABAP program, as opposed to a simple job step directly for the external command.&lt;/P&gt;&lt;P&gt;It is still a mystery to me why the external command works for moving single files, but not for multiple files via wildcards.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 13:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exec-a-quot-mv-quot-move-linux-command-from-abap-program-using-wildcard/m-p/8189448#M1625059</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2011-09-20T13:22:34Z</dc:date>
    </item>
  </channel>
</rss>

