<?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: execute external operating system command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374453#M810274</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;The usual way of writing this in ABAP is to use;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
constants: c_command(90) value '/usr/sap/bin/convert.pl'.
call 'SYSTEM' id 'COMMAND' field comm.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jan 2008 15:46:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-22T15:46:50Z</dc:date>
    <item>
      <title>execute external operating system command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374452#M810273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to run a script file with extention '.PL' on the application server using ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have sample how to run it in XI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XI3.0 provides a very simple way of handling this using the "Operating System Command" in the File Adapter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I post my output file in the following folder,&lt;/P&gt;&lt;P&gt;/usr/sap/sapout/test/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The shell script is available in the following path,&lt;/P&gt;&lt;P&gt;/usr/sap/bin/convert.pl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The figure below explains as to how we call the shell script using "Operating System Command".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File Acess parameters&lt;/P&gt;&lt;P&gt;      Target Directory      = /usr/sap/sapout/test/&lt;/P&gt;&lt;P&gt;      File Name Scheme = TestOutput.txt&lt;/P&gt;&lt;P&gt;Processing Parameters&lt;/P&gt;&lt;P&gt;     File Construction Mode          = Add Time Stamp&lt;/P&gt;&lt;P&gt;     File Type                              = Binary&lt;/P&gt;&lt;P&gt;     Operating System Command = /usr/sap/bin/convert.pl %F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to do the same thing in ABAP as it has been done for XI as mentioned in the above example.&lt;/P&gt;&lt;P&gt;My operating system is UNIX.&lt;/P&gt;&lt;P&gt;If any one can give me a sample it would be really helpful to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Arundhathi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 15:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374452#M810273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T15:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: execute external operating system command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374453#M810274</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;The usual way of writing this in ABAP is to use;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
constants: c_command(90) value '/usr/sap/bin/convert.pl'.
call 'SYSTEM' id 'COMMAND' field comm.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 15:46:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374453#M810274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T15:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: execute external operating system command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374454#M810275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arundhati,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can run operating system commands from ABAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. If you want to change UNIX right for any file, you can use following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_ucomm  = 'chmod a+rwx 123.txt'.&lt;/P&gt;&lt;P&gt;CALL 'SYSTEM' ID 'COMMAND' FIELD lv_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whatever command you provide in Field parameter ( lv_ucomm in the above case ), ABAP run that command at operating system level. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, you can provide command in lv_ucomm to run script at operating system level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 17:17:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-operating-system-command/m-p/3374454#M810275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T17:17:18Z</dc:date>
    </item>
  </channel>
</rss>

