Running a DOS program before an ABAP program

Hello
we have Z_Order  ABAP program which load order to SAP, we need to run a DOS program to get file to the correct folder.
Is it possible to run this DOS program every time user run Z_Order program
Thanks

Hello Mohsen,
welcome in the SAP community.
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.
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.
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

Similar Messages

  • Running a dos program on the new intel chip

    I have a dos program that I need to be able to run on the new intel chip.
    Is there a safe and reliable way to do it?
    thanks
    mbs827

    Thanks for your reply.
    Have you used parallels for dos?
    I am considering getting the new mac book but want to make sure that it will run the dos program.
    thanks
    mbs827

  • Old DOS program running in MED-V - WordPerfect 5.0

    I'm struggling with getting an old DOS program, WordPerfect 5 to run in MED-V. I've gotten it to laund when running a workspace in Full Desktop but not in a Seamless configuration. Does anyone have any tips on getting older programs to run happily in Seamless
    mode?Orange County District Attorney

    I realize this is three years late, but maybe you'll see the answer. You can most definitely run MS-DOS programs in seamless mode in Windows Virtual PC, and presumably in MED-V also. You can find the method in this message on another forum:
    http://www.wpuniverse.com/vb/showthread.php?32321-Printing-from-WPDOS-under-Windows-7-XP-Mode&p=246515&viewfull=1#post246515

  • Using DOS programs

    I'm interested in running windows XP Pro on my Macbook Pro, but the only reason I want to is to run an older DOS financial program that I've used for years on a PC. Just wondering if one can run a DOS program on XP installed on a MacBook. Thanks.

    Oskarmini wrote:
    Thanks. I thought it was possible, but not sure since I haven't seen anything that talked about DOS running on a Mac running Windows. Just wondering if anyone out there is doing this?
    To disagree with Mr. Peck, not all DOS programs will run in a GUI interface under XP, even using the "dos prompt" or terminal mode.
    Some will not run because they are 16-bit programs that are not supported by XP's emulator and others will not run because much of the original DOS was dropped in XP.
    I have some older DOS programs that will not run on my PC under XP, and I am positive that they won't run on my Mac's XP.
    Try them, but create a restore point before installing them, because older DOS programs do not always register themselves properly and they are difficult to remove. Creating a restore point makes it easy to simply revert back if you discover it does not run.

  • I have a 486 PC and an old imac -.will my dos  programs work in the new mac

    I mac Other OS
    I mac   Other OS  

    rolandfly
    The new apple machines are built round and Intel processor, therfore there machines can run Windows, either boot into it, or in parallel with Mac OSX. In each case, you have to supply the Windows OS. To boot into Windows you'll need Bootcamp from Apple: http://www.apple.com/macosx/bootcamp/, to run it paralleel you'll need Parallels http://www.parallels.com/
    So the question is: Will Windows run your DOS programs?
    Regards
    TD

  • I am trying to reinstall Windows on my macbook pro.  I downloaded the support files and Windows 7 iso file to a USB drive.  However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode."

    I am trying to reinstall Windows (would not launch).  I removed the partition and started over.  I downloaded the support files and Windows 7 iso file to a USB drive.  However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode."  I was successful before, what am I doing wrong this time?

    Try a restart.
    If that doesn't fix the problem, shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application unistaller. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About
    General information.
    Isolating issues in Mac OS X
    Troubleshooting Permission Issues
    Step by Step to Fix Your Mac

  • Advanced question for running DOS programs on a Mac.

    So what is a simple process on a Windows machine seems to be a challege on my new Mac.
    In summary I have several hard drives laying around that need to be checked for problems before they are used. There are lots of free DOS programs available for PCs that do just that. Many are provided directly by the hard drive manufacturers themselves (ie Segate SeaTools) and they are fantastic. Macs unfortunately can't run DOS programs (without hacks like rEFInd) and none of the manufacturers provide Mac compatible software. Looking on the internet everyone points me to Disk Utility to check drives, but compaired to something like SeaTools, Disk Utility is useless. I found Micromats TechTool Pro 6 which comes close to what I need except its expensive and has lots of features I don't need.
    I want to avoid installing windows in bootcamp or a VM just to do this one simple task. Very frustrating that it seems like im the only one wanting to do this with a Mac.

    Did some more research and figured out these are my options:
    -Find a mac alternative (few out there, most very bacic, or very expensive)
    -use rEFInd (which is in beta, and modifies OSX)
    -bootcamp (which doesnt allow BIOS access to select a dvd DOS program, so doesnt help. Also, mac doesnt use legacy usb and keyboard drivers so you cant use keyboard/mouse in most DOS programs)
    -Vmware
    So to me my best option was to use Vmware. Installed on a USB hard drive to save space and configured VMware bios to boot from selected .iso of a disk and it worked. Successfully ran SeaTools and because VMware emulates legacy mouse/keyboard it worked.
    One problem though. SeaTools for DOS doesnt work from USB sata adapter, and considering its a macbook air im out of luck.

  • Running 10.6.8. Trying to open and view contents of a CD (of an MRI) and getting message 'This program cannot be run in DOS mode' Is there a way? Thanks for the help.

    Running 10.6.8. Trying to open and view contents of a CD (of an MRI) and getting message 'This program cannot be run in DOS mode' Is there a way? Thanks for the help.

    Go to the support site for the provider of the MRI software.
    Sounds like it windows/PC. I have ran across that for the CDs that veterinarians provide for digital x-rays.
    I would try on a PC or on yuur Mac with Windows via BootCamp or a virtual machine like VirtualBox

  • I have a mac osx version 10.6.8 no windows and i am trying to install a program but keep getting can not run in dos mode  ( the disk says on back works on intel mac with parallels or vm fusion) is this program not compatible with my mac?

    i have a mac osx version 10.6.8 no windows installed and i am trying to install a program but keep getting can not run in dos mode  ( the disk says on back works on intel mac with parallels or vm fusion) is this program not compatible with my mac?

    You run Windows in Parallels or Fusion. Then in Windows you install the program.

  • TS4123 When I run autoruns as suggested by TS4123, a DOS program runs but no Windows box opens, so I can't check for LSP conflicts

    I am trying to troubleshoot an iTunes problem, which may be related to the resources issue that has been previously identified. 
    My problem is that once iTunes has been running for more than half a day or so, when I play music the program "skips" through the song, playing snippets a fraction of a second long.  A 4 minute song will be done in a few seconds.  The program then skips to the next song and this repeats.   Rebooting solves the problems for a few hours, then it reoccurs.  Other symptoms include iTunes not responding quickly, especially to closing it. 
    As per TS4123, I tried to rune the Autoruns program to see if I had a conflict.  I launched the program and a DOS box opens and runs some command line items, but nothing else happens.  I don't see a Windows box like I should. 
    Help on either problem?
    I am running Win4, 64bit, on an HP desktop.  I have updated video and audio drivers.  

    You should run the windows based file AUTORUNS.exe instead.

  • When I tried to open a fresh iTunes download my computer gave the error message : 'program cannot run in DOS mode'. Since both items are Apple, why might this be happening?

    When I tried to open a fresh iTunes download my computer gave the error message : 'program cannot run in DOS mode'. Since both items are Apple, why might this be happening?

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99602)

  • Running DOS program from java

    Hi all,
    I'm trying to execute a dos program using:
    runtime.exec("dos_prog.exe")
    THE PROBLEM : in this way I can run only
    WINDOWS programs and NOT DOS progs.
    What to do ???

    Hi all!
    I'm tring to run a file.bat that execute an exp from locale Oracle server. But when I run it, in dos consol it appaire just only the EXP USER/PASS ....., and don't execute never!! Really, the files of .dmp and of .log, they are created, ...but empty!!!! Why???
    ........ source .......
    Runtime rt = Runtime.getRuntime();
    Process rtProcess = rt.exec("cmd.exe /C file.bat");
    // wait for command to terminate
    try      {
         rtProcess.waitFor();
    catch     (InterruptedException ire)
         System.err.println("Thread interrupted " + ire.getMessage());
    // check its exit value
    if (rtProcess.exitValue() != 0)
    System.err.println("exit value was non-zero");
    // close stream
    bReader.close();
    ........ file.bat .......
    @echo off
    EXP USER/PSW FILE=EXPFILE.DMP LOG=FILELOG.LOG OWNER=MYOWNER
    If you want, you car reply me directly at [email protected] - Thanks very much!!!

  • I can't upload a copy I got of Adobe Photoshop CS on my Mac Mini OS X 10.5.8. All I can get for why is this  "This program cannot be run in DOS mode" I have no idea what this means?

    I can't upload a copy I got of Adobe Photoshop CS on my Mac Mini OS X 10.5.8. All I can get for why is this
    "This program cannot be run in DOS mode"
    I have no idea what this means?

    Are you certain the copy of Adobe Photoshop CS is for the Mac OS, not Windows?

  • Run ancient MS-DOS program?

    I'd like to run an MS-DOS version of QuickBooks. Don't ask why. I have a mid-'09 MacBook Pro. with Leopard. What is the simplest, and hopefully, lowest-cost way to run DOS on this computer? Do I have to buy a program like Parallels? At the moment, I have no interest in running/buying Windows.
    Thanks to anyone who has run DOS on a Mac and can help.

    Hi Jonathan,
    DosBox allows you to run MS-Dos on a Mac http://www.macupdate.com/info.php/id/14973/dosbox
    Although for future use of maybe Windows VirtualBox http://www.virtualbox.org/ might worth a look to familiarize.
    Hope it helps
    Stefan

  • Running a java program a set number of times

    This is a general question. Is it possible to make a java program run only 5 times for the sake of arguement.
    Basically I want to write a program that will give the user some flexibility when it will actually run another Java program, but I only want them to be able to say "not now' for a set number of times. When the last time comes the other program will launch. I was initially thinking of the Do Whilw loop, but this needs to work when the program is restarted.
    Program starts, it has 5 times it will run before it does something else(doesn't really matter now I think). User takes option "Not Now" and the program ends, but warns the user this will run 4 more times before you will need to do something.
    This process will repeat until the user takes the option "Ok install now" or the time limit expires and the install occurs anyway. Can someone point me in the right direction.

    ok I see so it's like one those programs that you download for free on the internet and they give you a set amount times to use it before you have to pay for it. but in this case when the number of times you use it equals 5 (or when the user clicks ok) a different java app will open automatically.
    My first thought would be to Write a Serialized object to disk using objectOutputStream that stores the number of times the application has been opened. and each time the program runs it checks for the serialized object and then you can do something like what I posted before. of course if were worried about security the user could always look for the object and erase it, if so then I guess we would have to come up with another plan of attack
    Hope this helps

Maybe you are looking for