Make your own free website on Tripod.com
 

SAP ABAP Programming, Functional and Basis Components Books


Create a Directory in the user local hardisk

When using WS_DOWNLOAD,  if the directory exists on the PC then the download is successful.  However, if the directory does not exist then the download fails.  Therefore, you can use GUI_CREATE_DIRECTORY to create the directory at the begining of your ABAP programs.

Tested in 4.6x

REPORT ZGUI_DIR.

call function 'GUI_CREATE_DIRECTORY'
  exporting
    dirname       = 'C:\TEST'
  EXCEPTIONS
    FAILED        = 1
    OTHERS        = 2.

if sy-subrc <> 0.
  WRITE: / 'Error Code ',SY-SUBRC.
endif.

Back to Previous

Return to SAP Hints and Tips on Configuration and ABAP/4 Programming