<?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: running a DOS program before an ABAP program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-a-dos-program-before-an-abap-program/m-p/10276896#M1831691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mohsen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;welcome in the SAP community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If you don't have the possibility to change your ABAP report Z_Order you can do this:&lt;BR /&gt;Download the COM Connector from &lt;A href="http://cco.stschnell.de/"&gt;here&lt;/A&gt;. Look at example 0108_ABAPReport.vbs. It is a VBScript to implement and execute and ABAP Report via VBScript. Change the report inside the VBScript like this:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Dim ABAP(2)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ABAP(0) = "Report z_myreport Line-Size 256."&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ABAP(1) = "Submit Z_Order."&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;Now write a batch file like this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;BR /&gt;MyDOSProg.exe&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;wscript.exe 0108_ABAPReport.vbs&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;In the first step your DOS program is executed and in the second step the VBScript implements and executes the ABAP program to run your Z_Order report. You can start your batch file from your presentation server. But you need one the one hand rights for RFC connection and on the other hand a developer key.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Another way is to go to your developer and talk to him about a RFC function module, which calls the report Z_Order via Submit. Now you can call this RFC function module as in the CCo example 0103_Ping.vbs as I described above. Here you need only the rights for RFC connection.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;If you have the possibility to change your ABAP report, you can do that:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;Call Method cl_gui_frontend_services=&amp;gt;execute&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Exporting&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DOCUMENT = 'cmd MyDOSProg.exe'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SYNCHRONOUS = 'X'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Exceptions&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Others = 1.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;Call the method execute in front of all other commands inside your Z_Order report.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Apr 2014 07:01:31 GMT</pubDate>
    <dc:creator>Stefan-Schnell</dc:creator>
    <dc:date>2014-04-11T07:01:31Z</dc:date>
    <item>
      <title>running a DOS program before an ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-a-dos-program-before-an-abap-program/m-p/10276895#M1831690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;we have Z_Order&amp;nbsp; ABAP program which load order to SAP, we need to run a DOS program to get file to the correct folder.&lt;/P&gt;&lt;P&gt;Is it possible to run this DOS program every time user run Z_Order program&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 16:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-a-dos-program-before-an-abap-program/m-p/10276895#M1831690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-10T16:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: running a DOS program before an ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-a-dos-program-before-an-abap-program/m-p/10276896#M1831691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mohsen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;welcome in the SAP community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If you don't have the possibility to change your ABAP report Z_Order you can do this:&lt;BR /&gt;Download the COM Connector from &lt;A href="http://cco.stschnell.de/"&gt;here&lt;/A&gt;. Look at example 0108_ABAPReport.vbs. It is a VBScript to implement and execute and ABAP Report via VBScript. Change the report inside the VBScript like this:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Dim ABAP(2)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ABAP(0) = "Report z_myreport Line-Size 256."&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ABAP(1) = "Submit Z_Order."&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;Now write a batch file like this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;BR /&gt;MyDOSProg.exe&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;wscript.exe 0108_ABAPReport.vbs&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;In the first step your DOS program is executed and in the second step the VBScript implements and executes the ABAP program to run your Z_Order report. You can start your batch file from your presentation server. But you need one the one hand rights for RFC connection and on the other hand a developer key.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Another way is to go to your developer and talk to him about a RFC function module, which calls the report Z_Order via Submit. Now you can call this RFC function module as in the CCo example 0103_Ping.vbs as I described above. Here you need only the rights for RFC connection.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;If you have the possibility to change your ABAP report, you can do that:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;Call Method cl_gui_frontend_services=&amp;gt;execute&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Exporting&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DOCUMENT = 'cmd MyDOSProg.exe'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SYNCHRONOUS = 'X'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Exceptions&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Others = 1.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;Call the method execute in front of all other commands inside your Z_Order report.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 07:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-a-dos-program-before-an-abap-program/m-p/10276896#M1831691</guid>
      <dc:creator>Stefan-Schnell</dc:creator>
      <dc:date>2014-04-11T07:01:31Z</dc:date>
    </item>
  </channel>
</rss>

