Friday, November 23, 2007

To execute a dos command from ABAP

* 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.

No comments:

Blog Archive