07-09-2007 8:34 AM
Hi guys,
Can anyone please let me know how to create a directory in an ABAP program???
07-09-2007 8:36 AM
07-09-2007 8:36 AM
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. If the directory or folder already exists on the personal computer, the command will just be ignored.
Test this code
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.
Regards,
Pavan P.
07-09-2007 8:36 AM