Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

Re: running a DOS program before an ABAP program

$
0
0

Hello Mohsen,

 

welcome in the SAP community.

 

  1. If you don't have the possibility to change your ABAP report Z_Order you can do this:
    Download the COM Connector from here. 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:

    Dim ABAP(2)
    ABAP(0) = "Report z_myreport Line-Size 256."
    ABAP(1) = "Submit Z_Order."

    Now write a batch file like this:

    MyDOSProg.exe
    wscript.exe 0108_ABAPReport.vbs

    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.

  2. 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.
  3. If you have the possibility to change your ABAP report, you can do that:

    Call Method cl_gui_frontend_services=>execute
      Exporting
        DOCUMENT = 'cmd MyDOSProg.exe'
        SYNCHRONOUS = 'X'
      Exceptions
        Others = 1.

    Call the method execute in front of all other commands inside your Z_Order report.

 

Cheers

Stefan


Viewing all articles
Browse latest Browse all 3125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>