‎2008 May 19 12:04 PM
Hi to all,
Can anybody tell me how to use the following function module
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
Thanks in advance
‎2008 May 19 12:09 PM
hi,
check out the below sample code
DATA RC TYPE I.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = 'C:\teste'
CHANGING
RC = RC
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.
‎2008 May 19 12:09 PM
hi,
check out the below sample code
DATA RC TYPE I.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = 'C:\teste'
CHANGING
RC = RC
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.
‎2008 May 19 12:09 PM
Hi,
Please refer the code:
DATA RC TYPE I.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = 'C:\teste'
CHANGING
RC = RC
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.
WRITE RC.
Thanks,
Sriram Ponna.
‎2008 May 19 12:09 PM
Hi abhijeet,
CL_GUI_FRONTEND_SERVICES is a class, not a FM
and creaet a object for the class like
data: o_service type reft to CL_GUI_FRONTEND_SERVICES.
and call the method DIRECTORY_CREATE using the object o_service.
go to se24 and give the calss name, u wil gind the method, and place the curson on the method DIRECTORY_CREATE
and click attributes tab then u can find the attrictues required for the method.
Hope this will help you,
Regards,
Sriram
‎2008 May 19 12:12 PM
Its used to create folder in presentation server.
DATA: W_RC TYPE I.
CALL METHOD cl_gui_frontend_services=>directory_create
EXPORTING
directory = 'C:/RRR'
changing
rc = W_RC.
‎2008 May 19 12:13 PM
Hi,
it is not a function module.
CL_GUI_FRONTEND_SERVICES is a class and DIRECTORY_CREATE is a method in that class.
DATA:ret_code TYPE I,
dir TYPE string value 'C:\test1'."ur directory path
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = dir
CHANGING
RC = ret_code.
rgds,
bharat.