‎2007 Apr 05 12:51 PM
Hi all,
Is there any FM or class/method to create a folder in the C directory...
Pls help
I have a found class CL_GUI_FRONTEND_SERVICES->DIRECTORY_CREATE
i think it will create directory...i want only to create a folder in a directory..
‎2007 Apr 05 12:55 PM
Directory and a Folder mean the same.
If you pass the DIRECTORY name as C:/Test/TEST/TEst, then it wil create a folder called TEST in a folder TEST in a folder TEST in the C drive.
Message was edited by:
Ravi Kanth Talagana
‎2007 Apr 05 12:55 PM
Directory and a Folder mean the same.
If you pass the DIRECTORY name as C:/Test/TEST/TEst, then it wil create a folder called TEST in a folder TEST in a folder TEST in the C drive.
Message was edited by:
Ravi Kanth Talagana
‎2007 Apr 05 1:00 PM
Is it???
but when i write code as below it is giving error ::
CREATE OBJECT v_guiobj.
CALL METHOD V_GUIOBJ->DIRECTORY_CREATE
IMPORTING
VALUE = 'C:\PO PDFs'
CHANGING
RC = V_RETURN_CODE
EXCEPTIONS
DIRECTORY_CREATE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
DIRECTORY_ACCESS_DENIED = 4
DIRECTORY_ALREADY_EXISTS = 5
PATH_NOT_FOUND = 6
UNKNOWN_ERROR = 7
NOT_SUPPORTED_BY_GUI = 8
WRONG_PARAMETER = 9.
Error as :: "" the field 'C:\PO PDFs' cannot be chnaged -""
‎2007 Apr 05 1:06 PM
This works like magic for me:
REPORT ZTEST.
data: v_subrc type i.
CALL METHOD cl_gui_frontend_services=>directory_create
EXPORTING
directory = 'C:/PO PDFs'
changing
rc = v_subrc
EXCEPTIONS
DIRECTORY_CREATE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
DIRECTORY_ACCESS_DENIED = 4
DIRECTORY_ALREADY_EXISTS = 5
PATH_NOT_FOUND = 6
UNKNOWN_ERROR = 7
NOT_SUPPORTED_BY_GUI = 8
WRONG_PARAMETER = 9
others = 10
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ravi