<?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: Calling External EXE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671491#M296747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't follow.&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>Mon, 20 Nov 2006 19:09:04 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-11-20T19:09:04Z</dc:date>
    <item>
      <title>Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671479#M296735</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 requirement to call NOTEPAD.exe and call a TXT file from one local directory and save it in another local directory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 18:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671479#M296735</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T18:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671480#M296736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to create an external command in SM49 which calls notepad.exe . Then from the ABAP program, use function module SXPG_CALL_SYSTEM to invoke the command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 18:22:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671480#M296736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T18:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671481#M296737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you would like to open a .txt file using notepad,  all you need to do is this.  Then you can save where ever.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

call method cl_gui_frontend_services=&amp;gt;execute
   EXPORTING
     DOCUMENT               = 'c:file.txt'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want?  Or do you want to save in another directory automatically?&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>Mon, 20 Nov 2006 18:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671481#M296737</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T18:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671482#M296738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you simply want to copy the file without opening it, you can do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

call method cl_gui_frontend_services=&amp;gt;file_copy
  exporting
    source             = 'C:file.txt'
    destination        = 'c:sapfile.txt'.

&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>Mon, 20 Nov 2006 18:31:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671482#M296738</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T18:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671483#M296739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to save automatically to another directory, User interaction is not needed. and also i need not use FTP to move the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 18:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671483#M296739</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T18:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671484#M296740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why i tried to use NOTEPAD.exe and save to another directory is of formating. Initially TXT files are not formatted by using NOTEPAD.exe and save i am getting proper formated text. But simply copying the files formatting not happended properly using "frontend-&amp;gt;file_copy"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 18:37:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671484#M296740</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T18:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671485#M296741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, then you can use the FILE_COPY method of the class CL_GUI_FRONTEND_SERVICES.  See the post above.  It's that simple.&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>Mon, 20 Nov 2006 18:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671485#M296741</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T18:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671486#M296742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm curious, what is the formatting that is happening when opening in notepad and saving?&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>Mon, 20 Nov 2006 18:40:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671486#M296742</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T18:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671487#M296743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you were to upload it and download it, would the formatting happen then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: istr type table of string.
data: str_file type string.

parameters: p_file1 type localfile default 'C:file.txt'.
parameters: p_file2 type localfile default 'C:sapfile.txt'.

str_file = p_file1.

call method cl_gui_frontend_services=&amp;gt;gui_upload
  exporting
    filename                = str_file
  changing
    data_tab                = istr.

str_file = p_file2.

call method cl_gui_frontend_services=&amp;gt;gui_download
  exporting
    filename                = str_file
  changing
    data_tab                = istr.

&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>Mon, 20 Nov 2006 18:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671487#M296743</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T18:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671488#M296744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had a customised NOTEPAD.exe (written a new notepad.exe in Visual C++)  that truncated the txt string to 132, and special characters get converted while saving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 18:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671488#M296744</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T18:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671489#M296745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see,  so in other words, you must open notepad in order to have the formatting happen.   So if that is the case, you can use the EXECUTE method that I mentioned above, but the user will need to save it to the directory.  I don't think that you can manipulate Notepad via OLE programming.&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>Mon, 20 Nov 2006 18:57:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671489#M296745</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T18:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671490#M296746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for functionality like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DIR &amp;gt; T.TXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here t.txt have all dir entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible same functionality if am calling this exe and results will go another file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your replies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 19:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671490#M296746</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T19:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671491#M296747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't follow.&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>Mon, 20 Nov 2006 19:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671491#M296747</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-20T19:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671492#M296748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i am calling the EXE file like this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appl = 'cmd'.&lt;/P&gt;&lt;P&gt;param = '/c YNOTEPAD.exe c:\test1.txt &amp;gt; c:\temp\test1.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method cl_gui_frontend_services=&amp;gt;execute&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;application = appl&lt;/P&gt;&lt;P&gt;parameter = param&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried like this way. but result not coming. Is anything i have to add to paramter statement here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 19:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671492#M296748</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T19:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671493#M296749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oops I misspelled the paramters while typing here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;param = '/c YNOTEPAD.exe c:\test1.txt &amp;gt; c:\temp\test1.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am giving like this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;param = 'c:\YNOTEPAD.exe c:\test1.txt &amp;gt; c:\temp\test1.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 19:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671493#M296749</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2006-11-20T19:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calling External EXE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671494#M296750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you want to pass the contents of c:\text1.txt as input to  c:\YNOTEPAD.exe and capture the formatted version into c:\temp\test1.txt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like your YNOTEPAD program is still a text editor and that the formatting occurs on the save.  The addition of "&amp;gt; c:\temp\test1.txt" is used to capture standard output.  Unless the command line execution of "c:\ynotepad.exe c:\test1.txt" generates standard output, the "&amp;gt; c:\temp\test1.txt" addition won't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 20:04:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-external-exe/m-p/1671494#M296750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T20:04:01Z</dc:date>
    </item>
  </channel>
</rss>

