SAP Basis, Functional and ABAP Programming Reference Books
To execute a dos command from ABAP
*
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*              http://www.sap-img.com
*
* To execute a dos command from ABAP, you need to create a bat file.
*
* Use the windows notepad to create this bat file in c:\ :-
*
* test.bat
* c:\
* cd\temp
* dir /p
*
REPORT ZDOSCOMMAND NO STANDARD PAGE HEADING.

PARAMETERS: DOSCMD(30) DEFAULT 'c:\test.bat' LOWER CASE.

call function 'GUI_EXEC'
  exporting
    command          = DOSCMD.

*-- End of program.