To execute a dos command from ABAP
*
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*              http://www.erpgreat.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.

Fast Links:
Example of Report Tree
Reporting Tree in ABAP

SAP Books
SAP Certification, Functional, Basis Administration and ABAP Programming Reference Books

ABAP Tips
ABAP and Samples Program Codes for Abapers

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.